emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orgmode] C-M-a, C-M-e


From: Carsten Dominik
Subject: Re: [Orgmode] C-M-a, C-M-e
Date: Mon, 3 Aug 2009 06:39:18 +0200

Hi Jeremie,

On Jul 31, 2009, at 2:42 AM, Bastien wrote:

Jeremie Knuesel <address@hidden> writes:

A keybinding suggestion: wouldn't it make sense to have C-M-a (C-M- e) go to the
first (last) line of a top-level heading?

Here are the functions:

--8<---------------cut here---------------start------------->8---
(defun org-back-to-top-level-heading ()
 "Go back to the top-level heading."
 (interactive)
 (if (re-search-backward "^\\* " nil t)
     (goto-char (match-beginning 0))
   (message "No previous top-level heading")))

(defun org-next-top-level-heading ()
 "Go to the next top-level heading."
 (interactive)
 (if (re-search-forward "^\\* " nil t)
     (goto-char (match-beginning 0))
   (message "No next top-level heading")))
--8<---------------cut here---------------end--------------->8---

Not sure they deserve keybindings though.


I am not convinced that top-level heading is the right paradigm for
"beginning-of-defun" in Org.  I guess that subtrees of any level
could be contenders for this as well.  So I am not implementing
this right now, but you can bind Bastien's functions to keys.

- Carsten





reply via email to

[Prev in Thread] Current Thread [Next in Thread]