From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bernt Hansen Subject: Re: How to move up/down a headline but not the subtree? Date: Tue, 10 Jul 2018 13:51:25 -0400 Message-ID: <87o9ffm12a.fsf@norang.ca> References: <23357.59250.52090.498378@frac.u-strasbg.fr> <87lgaq0xke.fsf@ossau.homelinux.net> <23358.220.12819.903256@frac.u-strasbg.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50193) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fcwnf-0005ZO-62 for emacs-orgmode@gnu.org; Tue, 10 Jul 2018 13:51:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fcwna-00040I-AR for emacs-orgmode@gnu.org; Tue, 10 Jul 2018 13:51:43 -0400 Received: from outbound1b.ore.mailhop.org ([54.200.247.200]:10299) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fcwna-0003xa-4N for emacs-orgmode@gnu.org; Tue, 10 Jul 2018 13:51:38 -0400 In-Reply-To: <23358.220.12819.903256@frac.u-strasbg.fr> (Alain Cochard's message of "Thu, 5 Jul 2018 13:28:28 +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" To: alain.cochard@unistra.fr Cc: Neil Jerram , emacs-orgmode@gnu.org Alain.Cochard@unistra.fr writes: > Neil Jerram writes on Thu 5 Jul 2018 11:46: > > > > What I would like to do is to be able to move a headline with > > > everything up to (but not including) its first subheading. > > > > > > Does anyone know how to do that? > > > > > > I am also interested in knowing if there are specific (deep?) > > > reasons why this seemingly basic operation, which I see as the > > > analogous of org-do-promote/demote and perform very often with > > > standard (but tedious) emacs editing commands, is not already > > > implemented. This only works if the task you want to deal with is level 2 or greater (i.e. there is a level 1 task above it) M-S-left M-right C-c C-w (use refile to move this heading somewhere else) This promotes all the subheadings one level and detaches the head from the following stuff so you can move it alone. Is that what you are looking for? I regularly capture single level tasks and refile things into trees later. If it's filed wrong changing the structure isn't all that hard with the above commands. You just don't want to leave the subtasks orphaned without a parent task (by skipping a level) so that is why I promote with sublevels first and then demote just the parent task so it becomes the same level as the subtasks. Hope that helps. Regards, Bernt