From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Abrahamsen Subject: Re: M-RET and C-RET turn current line of text into a heading? Date: Thu, 16 May 2013 11:17:03 +0800 Message-ID: <878v3fzk9c.fsf@ericabrahamsen.net> References: <87r4h83kld.fsf@ericabrahamsen.net> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:37650) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ucogx-0004b4-MI for emacs-orgmode@gnu.org; Wed, 15 May 2013 23:17:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ucogs-0000n3-SQ for emacs-orgmode@gnu.org; Wed, 15 May 2013 23:17:19 -0400 Received: from plane.gmane.org ([80.91.229.3]:59226) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ucogs-0000my-Lo for emacs-orgmode@gnu.org; Wed, 15 May 2013 23:17:14 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Ucogq-00066k-Eu for emacs-orgmode@gnu.org; Thu, 16 May 2013 05:17:12 +0200 Received: from 114.250.129.45 ([114.250.129.45]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 16 May 2013 05:17:12 +0200 Received: from eric by 114.250.129.45 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 16 May 2013 05:17:12 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Samuel Wales writes: > 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? Yes, that was part of the problem -- too many keys doing the same thing. I still think it's pretty important to have an option for creating a new headline *below* all the contents of the current subtree -- what C-RET used to do. Also, the above provides a whole lot of options for creating a new headline/item above the current line -- is that really such a common thing to do? And the variable `org-M-RET-may-split-line' is still not taken into account... Eric