From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Sebastien Vauban" Subject: Re: [ANN] BREAKING CHANGE -- removing #+BABEL file-wide property lines Date: Mon, 24 Oct 2011 14:11:44 +0200 Message-ID: <808voaoagv.fsf@somewhere.org> References: <87pqhrih3s.fsf@gmail.com> <30891.1319141196@alphaville.dokosmarshall.org> <87fwinifqu.fsf@gmail.com> <32184.1319143892@alphaville.dokosmarshall.org> <87zkgvgxe7.fsf@gmail.com> <1405.1319147324@alphaville.dokosmarshall.org> <87zkgvfhra.fsf@gmail.com> <2127.1319148505@alphaville.dokosmarshall.org> <87vcrjfgt1.fsf@gmail.com> <80sjmmvm60.fsf@somewhere.org> <4EA129DB.4070006@christianmoe.com> <8762ji5jr6.fsf@gmail.com> <87fwil10o2.fsf@gmail.com> <4EA31457.3090800@christianmoe.com> <4EA54DF9.40307@christianmoe.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: 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-mXXj517/zsQ@public.gmane.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org To: emacs-orgmode-mXXj517/zsQ@public.gmane.org Hi all, Christian Moe wrote: >> This all sounds very interesting, but I have problems understanding >> the advantages - possibly because I only had one coffee this morning. > > I think some of the advantages should be clear. > > A second advantage: > ------------------- > > It would allow a great deal of flexibility in passing variables > according to position in the outline hierarchy. > > #+BEGIN_EXAMPLE > * Some default settings > :PROPERTIES: > :x: 1 > :y: 2 > :z: -3 > :var: x, y, z > :END: > > ** For all cases where y=5 > :PROPERTIES: > :y: 5 > :END: > > *** A case where x=1, y=5, z=-3 > > #+begin_src R > (...) > #+end_src > > *** A case where x=1, y=5, z=8: no need to specify y again > > #+begin_src R :var z=8 > (...) > #+end_src > > (z could alternatively have been specified as a property, same as y > above) > #+END_EXAMPLE > > This modular re-use of values from higher up in the outline, on any > number of levels, should more than compensate for the loss of > buffer-wide assignments with the #+BABEL header. > > With a single :var: property for passing arguments, on the other hand, > this is not possible. You have to re-assign values to all three > variables on each level. (Note: Eric's idea for accumulative > properties, on the other hand, /would/ allow you to do this with a > single :var: property.) I think discussing all of this is beneficial and can lead to very interesting solutions. But I just have a comment on your second advantage, something that can render your example inefficient: inheritance is not on by default, and you need to enable if for *specific properties*. Make it on by default would be a very bad idea -- just think at examples of the mails sent through Org-mime: what about setting a Cc or To somewhere and inheriting that in all the file/subtree/etc. May be scary or inefficient performance-wise? Anyway, setting inheritance of properties to on, means you should declare the behavior for vars x, y and z, ie declaring it 3 times... Except, maybe, if you say that "var: x, y, z" does that too (then you've two things in one shot -- why not?). Best regards, Seb -- Sebastien Vauban