From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: outline-demote incorrectly demotes leaf nodes Date: Tue, 18 Oct 2011 14:57:25 -0400 Message-ID: <8875.1318964245@alphaville.americas.hpqcorp.net> References: <20111018105406.921@usenet.piggo.com> <4E9D4E10.6070606@christianmoe.com> Reply-To: nicholas.dokos@hp.com Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([140.186.70.92]:34546) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RGF0w-0005wf-E2 for emacs-orgmode@gnu.org; Tue, 18 Oct 2011 15:07:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RGEqt-0006rP-Rt for emacs-orgmode@gnu.org; Tue, 18 Oct 2011 14:57:29 -0400 Received: from g1t0026.austin.hp.com ([15.216.28.33]:21820) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RGEqt-0006rE-JZ for emacs-orgmode@gnu.org; Tue, 18 Oct 2011 14:57:27 -0400 In-Reply-To: Message from Sanjoy Mahajan of "Tue\, 18 Oct 2011 18\:03\:01 -0000." 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: Sanjoy Mahajan Cc: nicholas.dokos@hp.com, emacs-orgmode@gnu.org Sanjoy Mahajan wrote: > Christian Moe christianmoe.com> writes: >=20 > > The Org manual (2.5 Structure editing) says to use M-S-=E2=89=A4right>= =20 > > (org-demote-subtree) for what the submitter wants to do. >=20 > (I am the original reporter of the issue on the Debian BTS.) That is use= ful > information for me, and I will use those keys. >=20 > I do worry about one point, namely that C-c C-> (outline-demote) should s= till > work. That seems like an unreasonable expectation to me. Despite the similarities, it's a completely different function, with different pre- and post- conditi= ons and different assumptions about what the data looks like. [Warning: stupid analogy ahead] When you need to turn a screw, you look at the head and choose the right screwdriver for it. If you use a Philips screwdriver to turn a square-drive screw, you'll damage the screw even if you do manage to turn it a bit. > And it does work in regular outline mode. For example, if I rename my > test file to c.otl and then use C-c C-> on the main heading, all the subt= rees > are demoted as I expected. Whereas in org mode the leaf subtree gets a s= pace > instead of a * when it is being demoted. >=20 To continue the analogy: sure, if you replace the square drive screw with a Philips screw, you can turn it with the Philips screwdriver. > So, I wonder whether org mode is somehow messing up outline-demote without > meaning to? I am far from an expert on the org.el lisp code, and maybe t= he > current org-mode behavior is the intended result. But I worry that it is= not > intended and instead is an accidental side effect of something else. >=20 No: orgmode uses a small subset of outline-* functions, mostly to navigate = between headings, but it does not use outline-demote at all. Nick