emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Bastien <bastienguerry@googlemail.com>
To: Jeremie Knuesel <knuesel@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: C-M-a, C-M-e
Date: Fri, 31 Jul 2009 08:42:20 +0800	[thread overview]
Message-ID: <87skgdk5ku.fsf@bzg.ath.cx> (raw)
In-Reply-To: <89197d780907300152g57afefabjd12b1fefb6e92ae3@mail.gmail.com> (Jeremie Knuesel's message of "Thu, 30 Jul 2009 10:52:14 +0200")

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.  

-- 
 Bastien

  reply	other threads:[~2009-07-31  1:24 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 [this message]
2009-08-03  4:39   ` Carsten Dominik
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=87skgdk5ku.fsf@bzg.ath.cx \
    --to=bastienguerry@googlemail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=knuesel@gmail.com \
    /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).