From: Carsten Dominik <carsten.dominik@gmail.com>
To: Bastien <bastienguerry@googlemail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: C-M-a, C-M-e
Date: Mon, 3 Aug 2009 06:39:18 +0200 [thread overview]
Message-ID: <F6471CE9-959A-4771-AA46-FBA854A6DA69@gmail.com> (raw)
In-Reply-To: <87skgdk5ku.fsf@bzg.ath.cx>
Hi Jeremie,
On Jul 31, 2009, at 2:42 AM, Bastien wrote:
> Jeremie Knuesel <knuesel@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
next prev parent reply other threads:[~2009-08-03 4:39 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-30 8:52 C-M-a, C-M-e Jeremie Knuesel
2009-07-31 0:42 ` Bastien
2009-08-03 4:39 ` Carsten Dominik [this message]
2009-08-03 11:31 ` Jeremie Knuesel
2009-08-03 11:11 ` Jeremie Knuesel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=F6471CE9-959A-4771-AA46-FBA854A6DA69@gmail.com \
--to=carsten.dominik@gmail.com \
--cc=bastienguerry@googlemail.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).