From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: how can I insert a new heading after all at this level? Date: Tue, 19 Feb 2013 17:36:08 -0500 Message-ID: <8116.1361313368@alphaville> References: Reply-To: nicholas.dokos@hp.com Return-path: Received: from eggs.gnu.org ([208.118.235.92]:56803) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U7vnM-0006Xt-8S for emacs-orgmode@gnu.org; Tue, 19 Feb 2013 17:36:22 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U7vnH-0006oH-Sk for emacs-orgmode@gnu.org; Tue, 19 Feb 2013 17:36:16 -0500 Received: from g5t0008.atlanta.hp.com ([15.192.0.45]:12031) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U7vnH-0006nr-LI for emacs-orgmode@gnu.org; Tue, 19 Feb 2013 17:36:11 -0500 In-Reply-To: Message from David Naumann of "Tue, 19 Feb 2013 14:53:58 EST." 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: David Naumann Cc: emacs-orgmode@gnu.org David Naumann wrote: > I'm a happy, frequent user of org mode but there's something I can't > figure out from the manual. > > What I would like to be able to do is insert a new heading at the same > level as current, _following_ all the others. For example, with the > cursor on the A in this tree: > > * top > -> ** A > ** B > ** C > * next > > I would like to insert a last sibling and move to it: > > * top > ** A > ** B > ** C > -> ** > * next > > Use case: adding to a very long chronological list. I have not seen a > quick way to do this using the structure motion/editing commands in > the manual, without scrolling in one way or another. > > If you have a hint, please reply to my address; I'm not on this > mailing list. > >From somewhere in the second level (but not in the third or higher levels, if such exist), you can go up to the higher-level heading (what you call top), then to the next heading at the same level (next), open a line before that and insert a heading: C-c C-u C-c C-f C-o M-RET If typing all that is objectionable, you can define a keyboard macro to do it. Or you can define a command to do it (I just looked up the above key bindings to find the functions to call and looked up the docs of the various functions for the arguments): (defun my-org-insert-heading-at-end-of-current-level () (interactive) (outline-up-heading 1) (org-forward-heading-same-level 1) (open-line 1) (org-meta-return)) and either call it with M-x my-org-insert-heading-at-end-of-current-level RET or bind it to a key. Nick