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: Tue, 25 Oct 2011 12:06:19 +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> <87fwil10o2.fsf@gmail.com> <80pqhltnvc.fsf@somewhere.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=0016369fa10adf6c2a04b01cb060 Return-path: Received: from eggs.gnu.org ([140.186.70.92]:38875) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RIdtq-0002e2-M0 for emacs-orgmode@gnu.org; Tue, 25 Oct 2011 06:06:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RIdtk-0007wu-PV for emacs-orgmode@gnu.org; Tue, 25 Oct 2011 06:06:26 -0400 Received: from mail-qw0-f41.google.com ([209.85.216.41]:60562) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RIdtk-0007wq-LX for emacs-orgmode@gnu.org; Tue, 25 Oct 2011 06:06:20 -0400 Received: by qadc11 with SMTP id c11so321966qad.0 for ; Tue, 25 Oct 2011 03:06:19 -0700 (PDT) In-Reply-To: <80pqhltnvc.fsf@somewhere.org> 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: Sebastien Vauban Cc: emacs-orgmode@gnu.org --0016369fa10adf6c2a04b01cb060 Content-Type: text/plain; charset=ISO-8859-1 On Tue, Oct 25, 2011 at 11:35 AM, Sebastien Vauban < wxhgmqzgwmuf@spammotel.com> wrote: > Hi Eric, > > Eric Schulte wrote: > >> #+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) > >> > >> which would look horrible in one line and a nightmare to edit. > > > > I can think of three options for how to handle this situation. > > > > 1. If it turns out to be possible/desirable my preferred solution here > > would be to add general property support for appending values to > > properties when properties are over specified rather than simply > > replacing the value. Perhaps this could be done with a variable like > > org-accumulating-properties which could hold a list of those > > properties which should accumulate values rather than overwriting > > them. > > > > 2. Adding a "#+PROPERTY:" line authoring helper similar to the table > > formula helper making it more natural to edit such long property > > lines. > > > > 3. It may be possible to add syntax for extending #+PROPERTY: > > specifications across multiple lines, something like > > > > #+PROPERTY: SVNVERSION=(vc-working-revision (buffer-file-name)), > > #+PROPERTY+: SVNSTATE=( symbol-name (vc-state (or (buffer-file-name) > org-current-export-file))), > > #+PROPERTY+: SVNSTATENUM=(if (eq (vc-state (or (buffer-file-name) > org-current-export-file)) 'up-to-date) 0 13), > > > > FWIW I would like to have a similar extender for #+TBLFM: lines. > > Actually this choice may be my preferred solution. > > > > What do you think? > > I think that makes sense. > > While thinking about all of this, and working in real-life documents, I > just > came back to a suggestion which I made some time ago. It goes about this > enhancement: > > Would it be possible to specify "buffer-wide language specific" header > arguments? > > That is, be able to say: > > "In this document, I want to: > - tangle all my .sql chunks, but no other; > - eval all the elisp chunks with query, but no other." > > Something we could write quite easily along the lines: > > #+PROPERTY: tangle no > #+PROPERTY: eval never > #+PROPERTY[SQL]: tangle yes > #+PROPERTY[EMACS-LISP]: eval query > > (the syntax used here is just a draft sample!) > > What do you think about this feature? If you feel it can be something > interesting to have, this is surely to incorporate in the current syntax > debate. If not... never mind. > I am not Eric, but I think that would be a good idea. Bu there needs to be a way of specifying more then one property, either by #+PROPERTY+: or by any other way -I acually luike the #+PROPERTY+: . Thinking about it, it should be possible without the +: #+PROPERTY[R]: tangle no #+PROPERTY[R]: export both The more I see it, the more I like it - also the [] Cheers, Rainer > Best regards, > Seb > > -- > Sebastien Vauban > > > -- 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 --0016369fa10adf6c2a04b01cb060 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

On Tue, Oct 25, 2011 at 11:35 AM, Sebast= ien Vauban <wxhgmqzgwmuf@spammotel.com> wrote:
Hi Eric,

Eric Schulte wrote:
>> #+BABEL: :var SVNVERSION=3D(vc-working-rev= ision (buffer-file-name))
>> #+BABEL: :var SVNSTATE=3D( symbol-name (vc-state (or (buffer-file-= name) org-current-export-file)))
>> #+BABEL: :var SVNSTATENUM=3D(if (eq (vc-state (or (buffer-file-nam= e) org-current-export-file)) 'up-to-date) 0 13)
>>
>> which would look horrible in one line and = a nightmare to edit.
>
> I can think of three options for how to handle= this situation.
>
> 1. If it turns out to be possible/desirable my preferred solution here=
> =A0 =A0would be to add general property support for appending values t= o
> =A0 =A0properties when properties are over specified rather than simpl= y
> =A0 =A0replacing the value. =A0Perhaps this could be done with a varia= ble like
> =A0 =A0org-accumulating-properties which could hold a list of those > =A0 =A0properties which should accumulate values rather than overwriti= ng
> =A0 =A0them.
>
> 2. Adding a "#+PROPERTY:" line authoring helper similar to t= he table
> =A0 =A0formula helper making it more natural to edit such long propert= y
> =A0 =A0lines.
>
> 3. It may be possible to add syntax for extending #+PROPERTY:
> =A0 =A0specifications across multiple lines, something like
>
> =A0 =A0#+PROPERTY: SVNVERSION=3D(vc-working-revision (buffer-fil= e-name)),
> =A0 =A0#+PROPERTY+: SVNSTATE=3D( symbol-name (vc-sta= te (or (buffer-file-name) org-current-export-file))),
> =A0 =A0#+PROPERTY+: SVNSTATENUM=3D(if (eq (vc-state (or (buffer-file-n= ame) org-current-export-file)) 'up-to-date) 0 13),
>
> =A0 =A0FWIW I would like to have a similar ext= ender for #+TBLFM: lines.
> =A0 =A0Actually this choice may be my preferred solution.
>
> What do you think?

I think that makes sense.

While thinking about all of this, and working in real-life documents, I jus= t
came back to a suggestion which I made some time ago. It goes about this enhancement:

=A0 =A0Would it be possible to specify "buffer-wide language specific= " header
=A0 =A0arguments?

That is, be able to say:

=A0 =A0"In this document, I want to:
=A0 =A0- tangle all my .sql chunks, but no other;
=A0 =A0- eval all the elisp chunks with query, but no other."

Something we could write quite easily along the lines:

=A0 =A0#+PROPERTY: =A0 =A0 =A0 =A0 =A0 =A0 =A0 tangle no
=A0 =A0#+PROPERTY: =A0 =A0 =A0 =A0 =A0 =A0 =A0 eval never
=A0 =A0#+PROPERTY[SQL]: =A0 =A0 =A0 =A0 =A0tangle yes
=A0 =A0#+PROPERTY[EMACS-LISP]: =A0 eval query

=A0 =A0(the syntax used here is just a draft sample!)

What do you think about this feature? If you feel it can be something
interesting to have, this is surely to incorporate in the current syntax debate. If not... never mind.

I am not Eric, but I= think that would be a good idea. Bu there needs to be a way of specifying = more then one property, either by #+PROPERTY+: or by any other way -I acual= ly luike the #+PROPERTY+: .
Thinking about it, it should be possible without the +:

#+PROPERTY[R= ]: tangle no
#+PROPERTY[R]: export both

The more I see it, the more I like it - a= lso the []

Cheers,

Rainer


Best regards,
=A0Seb

--
Sebastien Vauban





--
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

--0016369fa10adf6c2a04b01cb060--