Hi Jeremie,
On Jul 31, 2009, at 2:42 AM, Bastien wrote:
Jeremie Knuesel <knue...@gmail.com> 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
_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode