From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: C-M-a, C-M-e Date: Mon, 3 Aug 2009 06:39:18 +0200 Message-ID: References: <89197d780907300152g57afefabjd12b1fefb6e92ae3@mail.gmail.com> <87skgdk5ku.fsf@bzg.ath.cx> Mime-Version: 1.0 (Apple Message framework v935.3) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MXpKY-0001hc-Qk for emacs-orgmode@gnu.org; Mon, 03 Aug 2009 00:39:26 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MXpKT-0001fc-Rb for emacs-orgmode@gnu.org; Mon, 03 Aug 2009 00:39:26 -0400 Received: from [199.232.76.173] (port=33795 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MXpKT-0001fW-JN for emacs-orgmode@gnu.org; Mon, 03 Aug 2009 00:39:21 -0400 Received: from mail-ew0-f211.google.com ([209.85.219.211]:49806) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MXpKT-00033a-5R for emacs-orgmode@gnu.org; Mon, 03 Aug 2009 00:39:21 -0400 Received: by mail-ew0-f211.google.com with SMTP id 7so1040643ewy.42 for ; Sun, 02 Aug 2009 21:39:20 -0700 (PDT) In-Reply-To: <87skgdk5ku.fsf@bzg.ath.cx> 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: Bastien Cc: emacs-orgmode@gnu.org Hi Jeremie, On Jul 31, 2009, at 2:42 AM, Bastien wrote: > 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. 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