From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rainer M Krug Subject: Re: [ANN] BREAKING CHANGE -- removing #+BABEL file-wide property lines Date: Fri, 21 Oct 2011 20:40:20 +0200 Message-ID: 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> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=0016e6551eb2c0227804afd3677e Return-path: Received: from eggs.gnu.org ([140.186.70.92]:49117) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RHK11-0005aG-AB for emacs-orgmode@gnu.org; Fri, 21 Oct 2011 14:40:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RHK0z-0003L2-8y for emacs-orgmode@gnu.org; Fri, 21 Oct 2011 14:40:23 -0400 Received: from mail-qy0-f176.google.com ([209.85.216.176]:37058) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RHK0y-0003Kx-UZ for emacs-orgmode@gnu.org; Fri, 21 Oct 2011 14:40:21 -0400 Received: by qyk30 with SMTP id 30so4557151qyk.0 for ; Fri, 21 Oct 2011 11:40:20 -0700 (PDT) In-Reply-To: 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: Eric Schulte Cc: Sebastien Vauban , emacs-orgmode@gnu.org, mail@christianmoe.com --0016e6551eb2c0227804afd3677e Content-Type: text/plain; charset=ISO-8859-1 On Fri, Oct 21, 2011 at 8:35 PM, Rainer M Krug wrote: > > > On Fri, Oct 21, 2011 at 7:37 PM, Eric Schulte wrote: > >> Christian Moe writes: >> >> > Hi again, >> > >> > I can quickly think of two advantages of the late lamented (if only by >> > me) #+BABEL header over using properties. >> > >> > 1. Allowing you to specify multiple buffer-wide options on the same >> > line (keeping things short), in the same colon :syntax as used in a >> > src block header (keeping things consistent and easy to copy back and >> > forth). None of this makes a substantive difference. >> > >> >> Understood, the new method will require multiple lines. Everything is a >> trade-off... >> >> > >> > 2. Allowing you to pass multiple buffer-wide arguments with :var. This >> > could make a substantive difference in some applications. The >> > following will work: >> > >> > #+BABEL: :var euro=1.3791 :var salestax=.15 >> > >> > The following will not, since it tries to set the same property: >> > >> > #+PROPERTY: var euro=1.3791 >> > #+PROPERTY: var salestax=.15 >> > >> > If BABEL is dropped for PROPERTY, it would be good for the :var: >> > property to support multiple arguments (comma-separated would be good >> > for consistency with passing arguments through the SRCNAME). E.g.: >> > >> > #+PROPERTY: var euro=1.3791, salestax=.15 >> > >> > I think I'd like this better in any case. >> > >> >> Nice idea. This same issue with "var" arose when we first started >> allowing header arguments to be specified inside subtree properties. >> I've just implemented your suggestion so the following are now possible. >> >> #+PROPERTY: var foo=1, bar=2 >> #+PROPERTY: cache yes >> >> #+begin_src emacs-lisp >> (+ foo bar) >> #+end_src >> >> #+results[be32e67491d4e92f75769aebe423c20ca01626fe]: >> : 3 >> >> > Will > > #+PROPERTY: var foo=1 > #+PROPERTY: var bar=2 > > also work, or result in one variable not signed? > > Rainer > Just to add to it: at the moment I have e.g: #+BABEL: :var MAINVERSION=0 #+BABEL: :var SVNVERSION=(vc-working-revision (buffer-file-name)) #+BABEL: :var SVNSTATE=( symbol-name (vc-state (or (buffer-file-name) org-current-export-file))) #+BABEL: :var SVNSTATENUM=(if (eq (vc-state (or (buffer-file-name) org-current-export-file)) 'up-to-date) 0 13) #+BABEL: :var DISP_PACKAGE="seedDisp_0.4-13.tar.gz" which would look horrible in one line and a nightmare to edit. Any suggestions how this cold be changed? In addition: I would like to have a warning if #+BABEL is present in the org file, so that one remembers that it has to be changed. Cheers, Rainer > > >> and >> >> #+begin_src emacs-lisp :var foo="this", bar="that" >> (concat foo " " bar) >> #+end_src >> >> #+results[3cde077efa81f1ca24a62ac264dbd5776b6e0054]: >> : this that >> >> Thanks for the suggestion and I hope the above is a sufficient >> replacement for the now-missing #+BABEL: syntax. >> >> Cheers -- Eric >> >> -- >> Eric Schulte >> http://cs.unm.edu/~eschulte/ >> >> > > > -- > Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, > UCT), Dipl. Phys. (Germany) > > Centre of Excellence for Invasion Biology > Stellenbosch University > South Africa > > Tel : +33 - (0)9 53 10 27 44 > Cell: +33 - (0)6 85 62 59 98 > Fax (F): +33 - (0)9 58 10 27 44 > > Fax (D): +49 - (0)3 21 21 25 22 44 > > email: Rainer@krugs.de > > Skype: RMkrug > > -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Stellenbosch University South Africa Tel : +33 - (0)9 53 10 27 44 Cell: +33 - (0)6 85 62 59 98 Fax (F): +33 - (0)9 58 10 27 44 Fax (D): +49 - (0)3 21 21 25 22 44 email: Rainer@krugs.de Skype: RMkrug --0016e6551eb2c0227804afd3677e Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

On Fri, Oct 21, 2011 at 8:35 PM, Rainer = M Krug <r.m.krug= @gmail.com> wrote:


On Fri= , Oct 21, 2011 at 7:37 PM, Eric Schulte <schulte.eric@gmail.com&g= t; wrote:
Christian Moe <mail@christianmoe.com> writes:

> Hi again,
>
> I can quickly think of two advantages of the late lamented (if only by=
> me) #+BABEL header over using properties.
>
> 1. Allowing you to specify multiple buffer-wide options on the same > line (keeping things short), in the same colon :syntax as used in a > src block header (keeping things consistent and easy to copy back and<= br> > forth). None of this makes a substantive difference.
>

Understood, the new method will require multiple lines. =A0Everything= is a
trade-off...

>
> 2. Allowing you to pass multiple buffer-wide arguments with :var. This=
> could make a substantive difference in some applications. The
> following will work:
>
> =A0 =A0#+BABEL: :var euro=3D1.3791 :var salestax=3D.15
>
> The following will not, since it tries to set the same property:
>
> =A0 =A0#+PROPERTY: var euro=3D1.3791
> =A0 =A0#+PROPERTY: var salestax=3D.15
>
> If BABEL is dropped for PROPERTY, it would be good for the :var:
> property to support multiple arguments (comma-separated would be good<= br> > for consistency with passing arguments through the SRCNAME). E.g.:
>
> =A0 =A0#+PROPERTY: var euro=3D1.3791, salestax=3D.15
>
> I think I'd like this better in any case.
>

Nice idea. =A0This same issue with "var" arose when we firs= t started
allowing header arguments to be specified inside subtree properties.
I've just implemented your suggestion so the following are now possible= .

#+PROPERTY: var foo=3D1, bar=3D2
#+PROPERTY: cache yes

#+begin_src emacs-lisp
=A0(+ foo bar)
#+end_src

#+results[be32e67491d4e92f75769aebe423c20ca01626fe]:
: 3


Will

#+PROPERTY: var foo=3D1#+PROPERTY: var bar=3D2

also work, or result in one variable not s= igned?

Rainer

Just to add to it: at the moment I have e.g:

#+BABEL: :var = MAINVERSION=3D0
#+BABEL: :var SVNVERSION=3D(vc-working-revision (buffer-= file-name))
#+BABEL: :var SVNSTATE=3D( symbol-name (vc-state (or (buffe= r-file-name) org-current-export-file)))
#+BABEL: :var SVNSTATENUM=3D(if (eq (vc-state (or (buffer-file-name) org-cu= rrent-export-file)) 'up-to-date) 0 13)
#+BABEL: :var DISP_PACKAGE=3D= "seedDisp_0.4-13.tar.gz"

which would look horrible in one = line and a nightmare to edit.

Any suggestions how this cold be changed?

In addition: I would l= ike to have a warning if #+BABEL is present in the org file, so that one re= members that it has to be changed.

Cheers,

Rainer


=A0
and

#+begin_src emacs-lisp :var foo=3D"this", bar=3D"that"<= br> =A0(concat foo " " bar)
#+end_src

#+results[3cde077efa81f1ca24a62ac264dbd5776b6e0054]:
: this that

Thanks for the suggestion and I hope the above is a sufficient
replacement for the now-missing #+BABEL: syntax.

Cheers -- Eric


=

--
Rainer M. Krug, PhD (Conservation Ecology, SUN= ), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany)

Centre of = Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel : =A0 =A0 =A0 +33 - (0)9 53 = 10 27 44
Cell: =A0 =A0 =A0 +33 - (0)6 85 62 5= 9 98
Fax (F): =A0 =A0 =A0 +33 - (0)9 58 10 27 44
<= br>Fax (D): =A0 =A0+49 - (0)3 21 21 25 22 44<= /a>

email: =A0 =A0 =A0
= Rainer@krugs.de

Skype: =A0 =A0 =A0RMkrug




--
Rainer M. K= rug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl= . Phys. (Germany)

Centre of Excellence for Invasion Biology
Stell= enbosch University
South Africa

Tel : =A0 =A0 =A0 +33 - (0)9 53 10 27 44
Cell: =A0 = =A0 =A0 +33 - (0)6 85 62 59 98
Fax (F): =A0 =A0 =A0 +33 - (0)9 58 10 27 = 44

Fax (D): =A0 =A0+49 - (0)3 21 21 25 22 44

email: =A0 =A0 = =A0Rainer@krugs.de=

Skype: =A0 =A0 =A0RMkrug

--0016e6551eb2c0227804afd3677e--