From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: "Create new heading after this one" command Date: Tue, 18 Sep 2007 19:38:56 +0200 Message-ID: <532f1c40df3bc78dbc4255f25df4e5e3@science.uva.nl> References: <87y7f4t1s8.fsf@aka.i.naked.iki.fi> Mime-Version: 1.0 (Apple Message framework v624) Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IXh2M-0008Jf-4i for emacs-orgmode@gnu.org; Tue, 18 Sep 2007 13:39:02 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IXh2L-0008JT-FM for emacs-orgmode@gnu.org; Tue, 18 Sep 2007 13:39:01 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IXh2L-0008JQ-BP for emacs-orgmode@gnu.org; Tue, 18 Sep 2007 13:39:01 -0400 Received: from korteweg.uva.nl ([146.50.98.70]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IXh2K-0006um-Vn for emacs-orgmode@gnu.org; Tue, 18 Sep 2007 13:39:01 -0400 In-Reply-To: <87y7f4t1s8.fsf@aka.i.naked.iki.fi> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Nuutti Kotivuori Cc: emacs-orgmode@gnu.org On Sep 18, 2007, at 17:45, Nuutti Kotivuori wrote: > > For this, all, I have two alternative suggestions: > > Either: Make C-e M-RET consistently make a new heading below the > current one - regardless of folding and leaving any text associated > with the current heading alone. But this may be difficult, considering > that folding seems to be a bit troublesome at times. > > Or, simply: Add a new command which creates a new heading after the > current one, regardless where the point is on the line, at the same > level the current heading is. This command could work also in the text > part of headings, like lists - always creating headings, unlike > M-RET. Prefix argument on this command could create the heading before > the current one, though I'm not sure if it would be terribly useful. A > variation, creating a subheading (one level deeper) of the current > item could be useful, but since that can be achieved with the former > by just pressing M-right after the command, I don't think this one is > too useful either. I guess this would be as easy as (defun org-new-heading-after-current () "Insert a new heading with same level as current, after current subtree." (interactive) (org-back-to-heading) (org-insert-heading) (org-move-subtree-down) (end-of-line 1)) Any suggestions for a keybinding? - Carsten