emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* C-M-a, C-M-e
@ 2009-07-30  8:52 Jeremie Knuesel
  2009-07-31  0:42 ` Bastien
  0 siblings, 1 reply; 5+ messages in thread
From: Jeremie Knuesel @ 2009-07-30  8:52 UTC (permalink / raw)
  To: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 393 bytes --]

Hi,

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?

* top level                      <- go to this line with C-M-a
** second level
*** third level

    text...                      <- starting from here...


    more text...                 <- go to this or the next line with C-M-e

* another top level


Jeremie K.

[-- Attachment #1.2: Type: text/html, Size: 1261 bytes --]

[-- Attachment #2: Type: text/plain, Size: 204 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: C-M-a, C-M-e
  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
  2009-08-03 11:11   ` Jeremie Knuesel
  0 siblings, 2 replies; 5+ messages in thread
From: Bastien @ 2009-07-31  0:42 UTC (permalink / raw)
  To: Jeremie Knuesel; +Cc: emacs-orgmode

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: C-M-a, C-M-e
  2009-07-31  0:42 ` Bastien
@ 2009-08-03  4:39   ` Carsten Dominik
  2009-08-03 11:31     ` Jeremie Knuesel
  2009-08-03 11:11   ` Jeremie Knuesel
  1 sibling, 1 reply; 5+ messages in thread
From: Carsten Dominik @ 2009-08-03  4:39 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: C-M-a, C-M-e
  2009-07-31  0:42 ` Bastien
  2009-08-03  4:39   ` Carsten Dominik
@ 2009-08-03 11:11   ` Jeremie Knuesel
  1 sibling, 0 replies; 5+ messages in thread
From: Jeremie Knuesel @ 2009-08-03 11:11 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode

On Fri, Jul 31, 2009 at 2:42 AM, Bastien<bastienguerry@googlemail.com> wrote:

> Here are the functions:

Thanks!

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: C-M-a, C-M-e
  2009-08-03  4:39   ` Carsten Dominik
@ 2009-08-03 11:31     ` Jeremie Knuesel
  0 siblings, 0 replies; 5+ messages in thread
From: Jeremie Knuesel @ 2009-08-03 11:31 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: Bastien, emacs-orgmode

On Mon, Aug 3, 2009 at 6:39 AM, Carsten
Dominik<carsten.dominik@gmail.com> wrote:

> 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.

OK. I thought it would make sense since tree navigation is already
possible with C-c C-p, C-c C-n and C-c C-u, and I often want to jump
to the previous or next top-level entry.

Jeremie

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-08-03 11:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2009-08-03 11:31     ` Jeremie Knuesel
2009-08-03 11:11   ` Jeremie Knuesel

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).