From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: C-M-a, C-M-e Date: Fri, 31 Jul 2009 08:42:20 +0800 Message-ID: <87skgdk5ku.fsf@bzg.ath.cx> References: <89197d780907300152g57afefabjd12b1fefb6e92ae3@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MWgrG-0006MD-39 for emacs-orgmode@gnu.org; Thu, 30 Jul 2009 21:24:30 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MWgrB-0006KQ-Fv for emacs-orgmode@gnu.org; Thu, 30 Jul 2009 21:24:29 -0400 Received: from [199.232.76.173] (port=49476 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MWgrB-0006KK-6S for emacs-orgmode@gnu.org; Thu, 30 Jul 2009 21:24:25 -0400 Received: from rv-out-0708.google.com ([209.85.198.247]:38883) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MWgrA-0000QL-PM for emacs-orgmode@gnu.org; Thu, 30 Jul 2009 21:24:24 -0400 Received: by rv-out-0708.google.com with SMTP id f25so822004rvb.6 for ; Thu, 30 Jul 2009 18:24:24 -0700 (PDT) In-Reply-To: <89197d780907300152g57afefabjd12b1fefb6e92ae3@mail.gmail.com> (Jeremie Knuesel's message of "Thu, 30 Jul 2009 10:52:14 +0200") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Jeremie Knuesel Cc: emacs-orgmode@gnu.org Jeremie Knuesel 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