From mboxrd@z Thu Jan 1 00:00:00 1970 From: Neil Jerram Subject: Re: How to move up/down a headline but not the subtree? Date: Thu, 05 Jul 2018 11:46:41 +0100 Message-ID: <87lgaq0xke.fsf@ossau.homelinux.net> References: <23357.59250.52090.498378@frac.u-strasbg.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:34637) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fb1mj-0003UW-2E for emacs-orgmode@gnu.org; Thu, 05 Jul 2018 06:46:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fb1mf-00036V-5t for emacs-orgmode@gnu.org; Thu, 05 Jul 2018 06:46:49 -0400 Received: from ossau.homelinux.net ([18.217.239.99]:52754 helo=ip-172-31-40-63.us-east-2.compute.internal) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fb1me-00035K-WB for emacs-orgmode@gnu.org; Thu, 05 Jul 2018 06:46:45 -0400 In-Reply-To: <23357.59250.52090.498378@frac.u-strasbg.fr> 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, emacs-orgmode@gnu.org Alain.Cochard@unistra.fr writes: > Hello. > > I am aware of org-move-subtree-up/down, which moves the entire > subtree. > > I am also aware of org-shiftmetaup/down which moves the line[fn:1] (also > works for a headline). > > 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. My view/guess: because the subheadings are an integral part of the content of the containing item. Wouldn't you agree? It seems to me like a fairly fundamental aspect of the Org model. That said, perhaps your use case is one where you've realized that subheadings don't actually belong to the containing item? In that case, what could make more sense is to promote (or kill and yank elsewhere) all of the wrongly placed subheadings. You could promote an individual subheading with M-S-left, or kill and yank it with C-c C-x C-w and C-c C-x C-y, but I don't know if there's an easy way to repeat that over all subheadings. Another possible approach: what about demoting just the containing heading with M-left and then killing/yanking that elsewhere? Regards, Neil