From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Clemente Subject: Re: demoting a heading inserts spaces in column-0 text Date: Sat, 13 Dec 2014 17:28:06 +0700 Message-ID: <87lhmbrgi1.wl-n142857@gmail.com> References: <87k326i71d.wl-n142857@gmail.com> <871tod3bu5.fsf@nicolasgoaziou.fr> <87388mvxgd.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40563) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xzjvz-0007lF-VO for emacs-orgmode@gnu.org; Sat, 13 Dec 2014 05:28:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xzjvp-0002sf-2l for emacs-orgmode@gnu.org; Sat, 13 Dec 2014 05:28:23 -0500 Received: from mail-pd0-x22b.google.com ([2607:f8b0:400e:c02::22b]:39810) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xzjvo-0002sZ-R3 for emacs-orgmode@gnu.org; Sat, 13 Dec 2014 05:28:13 -0500 Received: by mail-pd0-f171.google.com with SMTP id y13so8724296pdi.30 for ; Sat, 13 Dec 2014 02:28:11 -0800 (PST) Received: from cil.gmail.com ([114.199.127.98]) by mx.google.com with ESMTPSA id ud7sm3856977pbc.11.2014.12.13.02.28.09 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 13 Dec 2014 02:28:10 -0800 (PST) In-Reply-To: <87388mvxgd.fsf@nicolasgoaziou.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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Org-mode Org-Mode El Fri, 12 Dec 2014 19:25:25 +0100 Nicolas Goaziou va escriure: >=20 > > Of course everything's text, but if there's no distinction between > > drawers/headers and text, that's the problem. Those headers are metadata > > written and managed by org and must follow some rules, >=20 > This is incorrect. >=20 > :CLOCK: or :LOGBOOK: or whatever the value of `org-clock-into-drawer' > is, are regular drawers conveniently provided to collect clocks and > allow to hide them away. They have no special meaning in Org, and may > not even exist (i.e., when `org-clock-into-drawer' is nil). There is no > reason to treat them specially. >=20 > OTOH, clocks themselves are pure metadata. They could be indented > specifically, but since they are allowed anywhere in a section, it might > be dangerous to do so (e.g. it could break a list). Actually, this is > true for anything that need to appear at the very beginning of the > section, i.e., anything but planning info and properties drawers. > > > [=E2=80=A6] > This is also wrong. PROPERTIES drawer, which is metadata, has to be > moved before anything else in the section (with the exception of > planning info). This has nothing to do with CLOCK drawers, which are not > even considered in the process. >=20 > > So, I think org should detect its own syntax (:CLOCK: ... :END: etc.)= , and > > do automatic changes only to its own syntax, not to text typed by the u= ser > > unless the user asks for it. >=20 > Again, :CLOCK:...:END: is user's decision, not Org's. So are all > drawers, but, of course, PROPERTIES. The latter is the exception, not > the rule. But these are technical details, not relevant to a non-programmer. What a= new user sees with the default settings as of today is: - he writes a new tree and some text inside - he clocks in - he demotes the tree (shift+right) because he wants to change the tree str= ucture. Result: his text also is modified This breaks user's expectations. At least it breaks my expectations, beca= use in a logical tree of nodes, demoting does not mean =E2=80=9Eshift conte= nts=E2=80=9C. And I thought org was supposed not to break my content. I also lose controllability because I have no way to rearrange nodes with= out side effects. =20 I suggest: 1. New default for org-adapt-indentation =3D 'partial, which shifts every l= ine until the first line which starts at column 0. This may not shift all d= rawers in complex cases where you have them in the bottom of the tree; ther= efore it's called partial. This is handling the most common cases. And in c= ase you had indentation in all lines, all lines will be shifted. 2. With org-adapt-indentation =3D 'partial, new lines added by org (:CLOCK:= drawer, CLOCK lines etc) appear at the same column as the heading, not at = column 0 3. The other options stay the same: org-adapt-indentation=3Dt means everyth= ing will be shifted, org-adapt-indentation=3Dnil means nothing will be shif= ted (new text starts at column 0) -- Daniel