From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Schulte Subject: Re: [ANN] BREAKING CHANGE -- removing #+BABEL file-wide property lines Date: Sat, 22 Oct 2011 09:25:33 -0600 Message-ID: <87r52510od.fsf@gmail.com> 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> <6106.1319220584@alphaville.americas.hpqcorp.net> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([140.186.70.92]:47437) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RHdub-0004Mb-BN for emacs-orgmode@gnu.org; Sat, 22 Oct 2011 11:55:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RHduZ-0007vp-Rj for emacs-orgmode@gnu.org; Sat, 22 Oct 2011 11:55:05 -0400 Received: from mail-iy0-f169.google.com ([209.85.210.169]:41924) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RHduZ-0007vC-Og for emacs-orgmode@gnu.org; Sat, 22 Oct 2011 11:55:03 -0400 Received: by mail-iy0-f169.google.com with SMTP id f6so7387593iag.0 for ; Sat, 22 Oct 2011 08:55:03 -0700 (PDT) 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: nicholas.dokos@hp.com Cc: Sebastien Vauban , emacs-orgmode@gnu.org, mail@christianmoe.com > > Just to clarify my understanding: on a #+PROPERTY line, you *have* to > say > > #+PROPERTY: var a=1, b=2 > > but in the code block itself, you can say *either* > > #+begin_src emacs-lisp :var a=1, b=2 > ... > > > *or* > > #+begin_src emacs-lisp :var a=1 :var b=2 > ... > correct > > Experimentally, both of these currently work: do you have any plans to > outlaw the last form? > no > > Also, how does the comma-separated list of variable assignments interact > with a language where comma has syntactic significance? I was primarily > thinking of python where e.g. a=[1,2,3] or a=(1,2) is a legal > construct. AFAICT, that never worked in babel[fn:1], so it may not > matter much, but it may be a good idea to come up with a quoting > mechanism so things like that can be added in the future if necessary. > The syntax of the language is not used in the header argument form, only code-block constructs are used here, which largely amounts to data and code block references, indexing into variables, and emacs-lisp forms. There are cases where the above do contain ", " but they are parsed correctly, e.g., #+headers: :var data=foo(bar=1, baz=2), fuz=5 and #+headers: :var data=table[0,0] will both be parsed correctly. > > Thanks, > Nick > > Footnotes: > > [fn:1] I checked in 7.7 to avoid the recent churn with the following > code block > > > #+begin_src python :var a='(1,2)' > len(a) > #+end_src > > and I get > > ,---- > | File "", line 3 > | a=[1, [\,, 2]] > | ^ > | SyntaxError: unexpected character after line continuation character > `---- > > in the org babel error output buffer. you can use elisp in assignment forms, but not syntax from the language of the code block, so the above could be re-written as #+begin_src python :var a='(1 2) len(a) #+end_src -- Eric Schulte http://cs.unm.edu/~eschulte/