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: Bastien
Subject: Re: [Orgmode] C-M-a, C-M-e
Date: Fri, 31 Jul 2009 08:42:20 +0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)

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.  

-- 
 Bastien




reply via email to

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