[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] [PATCH] Make lexical eval default for elisp src blocks

From: John Kitchin
Subject: Re: [O] [PATCH] Make lexical eval default for elisp src blocks
Date: Mon, 18 Apr 2016 13:56:07 -0400

thanks. I think I have addressed these in a new patch I just submitted.


Professor John Kitchin 
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213

On Mon, Apr 18, 2016 at 1:41 PM, Nicolas Goaziou <address@hidden> wrote:
John Kitchin <address@hidden> writes:

> I just put it in because it is an option for the eval function, and it was
> not difficult to implement. It might be useful for debugging.

Fair enough.

> Are you suggesting use defconst instead of defvar? Does it really need all
> the things in org-babel-header-args:R? Or just the required default for
> lexical?

Two variables are needed: `org-babel-default-header-args:emacs-lisp' and
`org-babel-header-args:emacs-lisp'. The latter is used, e.g., in linting
to know what keywords are allowed in an emacs-lisp block and, if
possible, the possible values for it.

> no problem. Should all the assocs be replaced by assq, or just these
> ones?

I usually replace (assoc/member KEYWORD ...) with (assq/memq KEYWORD
...) whenever I modify a S-exp around it. You don't need to change this
for parts you don't alter.

>> > +                                 "(with-output-to-string %s)"
>> > +                               "(progn %s)")
>> > +                             (org-babel-expand-body:emacs-lisp
>> > +                              body params)))
>> > +
>> > +               (if (listp lexical)
>> > +                   lexical
>> > +                 (string= "yes" lexical)))))
>> There is no support for t. I think we should allow both :lexical
>> t and :lexical yes.
> something like (member lexical '("yes" "t"))?

Honestly, I don't remember how Babel handles parameters. It could also
be '("yes" t) if the latter is recognized as a keyword. You get the
idea :)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]