emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Samuel Wales <samologist@gmail.com>
To: Eric Abrahamsen <eric@ericabrahamsen.net>
Cc: emacs-orgmode@gnu.org
Subject: Re: M-RET and C-RET turn current line of text into a heading?
Date: Wed, 15 May 2013 11:39:32 -0700	[thread overview]
Message-ID: <CAJcAo8uixc0VdFJJzEPAZgt14ZiY0rQP81mN18XiT4=eZKK+wA@mail.gmail.com> (raw)
In-Reply-To: <87r4h83kld.fsf@ericabrahamsen.net>

How about this?  IMO this would be ideal.

  - M-RET is for the current context
  - C-RET is for a new context

|-------------+------------------+--------+------------------------------|
| command     | context          | pos    | action                       |
|-------------+------------------+--------+------------------------------|
| c-ret       | any              | any    | create headline above ENTRY  |
| m-ret       | headline or item | beg    | create new above header/item |
| m-ret       | headline or item | middle | split                        |
| m-ret       | headline or item | end    | create new below header/item |
| m-ret       | line             | beg    | create headline above LINE   |
| m-ret twice | line             | beg    | create item above line       |
| m-ret       | line             | middle | turn line into a headline    |
| m-ret twice | line             | middle | turn line into an item       |
| m-ret       | line             | end    | create headline below line   |
| m-ret twice | line             | end    | create item below line       |
|-------------+------------------+--------+------------------------------|

Notes:

  - C-RET (in all contexts) creates new headline ABOVE (not
    below) the current entry

  - "beg" does not only refer to beginning of line.  it also
    refers to the blank spaces before a list item or stars
    and space in a headline

I should mention that M-RET still takes several seconds.

Also, C-RET and M-RET currently seem to be identical?

Samuel

-- 
The Kafka Pandemic: http://thekafkapandemic.blogspot.com

The disease DOES progress.  MANY people have died from it.  ANYBODY can get it.

  parent reply	other threads:[~2013-05-15 18:39 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-15  4:58 M-RET and C-RET turn current line of text into a heading? Eric Abrahamsen
2013-05-15  7:54 ` Christian Moe
2013-05-15  8:22   ` Eric Abrahamsen
2013-05-15  9:01     ` Christian Moe
2013-05-15  9:30       ` Eric Abrahamsen
2013-05-20 15:54   ` John Hendy
2013-05-20 16:00     ` John Hendy
2013-05-20 16:14       ` Matt Lundin
2013-05-20 18:41         ` John Hendy
2013-05-15 18:39 ` Samuel Wales [this message]
2013-05-16  3:17   ` Eric Abrahamsen
2013-05-16  3:42     ` Samuel Wales
2013-05-16 11:49       ` Eric Abrahamsen
2013-05-16  7:22     ` Daniel Bausch
2013-05-16  9:21       ` Detlef Steuer
2013-05-16 13:48     ` Rick Frankel
2013-05-16 16:10     ` Eric S Fraga
2013-05-16  6:21   ` Bastien
2013-05-16  9:23     ` Miro Bezjak
2013-05-16 19:11     ` Jason F. McBrayer
2013-05-17 11:20       ` Carsten Dominik
2013-05-17 13:42         ` Jason F. McBrayer
2013-05-17 13:26     ` Carsten Dominik
2013-05-17 19:07       ` Rick Frankel

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='CAJcAo8uixc0VdFJJzEPAZgt14ZiY0rQP81mN18XiT4=eZKK+wA@mail.gmail.com' \
    --to=samologist@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=eric@ericabrahamsen.net \
    /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).