From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Brand Subject: Re: M-RET and C-RET Date: Fri, 2 Dec 2011 17:13:22 +0100 Message-ID: References: <20111126195304.61776.qmail@rage.so36.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Return-path: Received: from eggs.gnu.org ([140.186.70.92]:52822) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RWVjp-0001Pa-VU for emacs-orgmode@gnu.org; Fri, 02 Dec 2011 11:13:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RWVjo-0003G0-HL for emacs-orgmode@gnu.org; Fri, 02 Dec 2011 11:13:25 -0500 Received: from mail-ww0-f49.google.com ([74.125.82.49]:55315) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RWVjo-0003Fg-AA for emacs-orgmode@gnu.org; Fri, 02 Dec 2011 11:13:24 -0500 Received: by wgbdt11 with SMTP id dt11so1130210wgb.30 for ; Fri, 02 Dec 2011 08:13:22 -0800 (PST) In-Reply-To: <20111126195304.61776.qmail@rage.so36.net> 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: Org Mode Cc: sindikat Hi all Now that I use M-RET more often when editing lists I was about trying to make a patch to remove what seems to me an inconsistency between headings and list items. But after I have read the docstrings of org-insert-item and org-list-insert-item the current behavior seems so intentional that I must have just missed some good reasons. Which are they? With #+begin_src org ,*** abc ,*** def , - ghi , - jkl #+end_src M-RET on "e" or on "k" splits the line, ok. M-RET on the first "*" (here also C-RET) or on "-" inserts a line above, ok. M-RET on "d" inserts a line _below_ (and C-RET _below_ the end of the whole entry), ok. M-RET on "j" inserts a line above but I expected it below. If I want a line above I would move the point to "-" before doing M-RET like I do on a heading where I move to the first "*" to get the insert above. Changing to the behavior expected by me would make it possible to add a new list item below the last one in a list (a very frequent task) without caring about configuring org-M-RET-may-split-line away from its default. I configured it to nil for headline and item only to be able to insert a new list item below the current with M-RET where I am forced to be on or at right of "k" which by default splits which I want only in very rare cases. And one should not be invited to avoid M-RET and edit lists with "-" and TAB as illustrated in the thread "org-list-indent-offset only works partially": http://thread.gmane.org/gmane.emacs.orgmode/47954 Another inconsistency in my view: Since M-RET inserts above when on "-" or before I would like to see M-RET and C-RET also insert above when on the last "*" (or single visible "*" when hidestars) or before, not only on the first "*" of the line. Michael On Sat, Nov 26, 2011 at 20:53, sindikat wrote: >> You can use M-RET-may-split-line, to make it respect content in lists, > > more or less. I would guess the reason that they are different is to be > able to always easily start a new heading. > This is very helpful, thank you. But how to make it so M-RET will: > 1. not split line; > 2. add new list item while on plain list; > AND > 3. add new heading after content of the current heading? > Maybe there should be a variable in addition to 'org-M-RET-may-split-line' > such as 'org-M-RET-add-after-content'. > [...]