From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sebastian Miele Subject: Re: [RFC] Document level property drawer Date: Wed, 15 Jan 2020 08:18:20 +0000 Message-ID: <87lfq9gmk3.fsf@gmail.com> References: <87eezxrcwv.fsf@alphapapa.net> <84tv8tjywm.fsf@gmail.com> <87k19ovdxn.fsf@gmail.com> <847e1vf2ic.fsf@gmail.com> Reply-To: sebastian.miele@gmail.com Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:44602) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1irdsf-0007xy-F6 for emacs-orgmode@gnu.org; Wed, 15 Jan 2020 03:18:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1irdse-0000XY-3K for emacs-orgmode@gnu.org; Wed, 15 Jan 2020 03:18:25 -0500 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]:55993) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1irdsd-0000Wu-RF for emacs-orgmode@gnu.org; Wed, 15 Jan 2020 03:18:24 -0500 Received: by mail-wm1-x32a.google.com with SMTP id q9so16788077wmj.5 for ; Wed, 15 Jan 2020 00:18:23 -0800 (PST) In-reply-to: <847e1vf2ic.fsf@gmail.com> 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-mx.org@gnu.org Sender: "Emacs-orgmode" To: Marco Wahl Cc: emacs-orgmode@gnu.org Marco Wahl writes: > Sebastian Miele writes: > >> But for such properties to satisfactorily work for me, they would have >> to be visible by default. E.g. I would want the header-args to be >> immediately visible just like they are when they are written after >> #+BEGIN_SRC or #+HEADER. Otherwise I would find myself constantly >> wondering whether this or that property drawer contains something >> essential and every TAB on a collapsed headline would have be followed >> by an accompanying move to the property drawer and a TAB there. >> >> On the other hand, there are properties that are very good candidates >> for remaining hidden by default, like ID. >> >> I would like to be able to make a clear distinction between properties >> that are visible by default and properties that are not. Maybe it would >> be possible to allow some #+.. syntax following headings for subtree >> properties that are visible by default. A requirement could be made that >> such property specifications always have to be followed by a property >> drawer, even if that is empty. Then everything #+.. that is before the >> property drawer would belong to the heading/subtree, and everything #+.. >> that follows the drawer would be treated as it is until now. >> >> Please tell me if I missed something and Org is already capable of >> something like that. If not, are there others who would like >> visible-by-default property specifications for headings/subtrees in >> addition to invisible-by-default property specifications in drawers, >> too? > > I don't think Org is capable of this out of the box right now. Further > I don't feel the need for a visible-by-default property, but that's just > me. After a few more months of living without that feature I must say that I basically live perfectly well without that, too. I just do not define source block header args in property drawers. It gets a bit verbose at times. But not to the degree of being painful. >> Finally, I would like to state an opinion: If there is >> visible-by-default (by #+..) and invisible-by-default (by drawers) >> syntax for headings/subtrees, including level 0, it may be viable to >> require them to be disjoint for each heading/subtree. Most probably it >> would be good practice, anyway. And the precedence question raised >> previously in this thread would be eliminated. > > I may not feel the need for the visible/invisible-by-default properties > but actually I like the idea of #+ properties parallel to the property > drawers as visible by default properties. But since the #+ properties > may appear anywhere in the Org file and affect the whole file it would > be difficult or even impossible to give them reliable meaning for > subtrees AFAICS. In the meantime I had a look into worg/dev/org-syntax.org. From the document: "Property drawers are a special type of drawer containing properties attached to a headline. They are located right after a headline and its planning information." So, currently, #+ properties may not appear between a heading and a property drawer. At least not without turning the property drawer into a non-special drawer. So, in principle, it would be possible to change the syntax of Org to allow #+ properties between headings and (possibly empty) property drawers in order to denote visible-by-default properties attached to a heading. Moreover, this change probably would introduce very little to no backwards incompatibility. With the change it would not be possible to turn property drawers into non-special drawers by putting a #+ property before them. Now it is possible to sort of uncomment property drawers by putting #+ properties before them. This "feature" probably is hardly used, if at all.