[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] [PATCH] Make lexical eval default for elisp src blocks
From: |
Nicolas Goaziou |
Subject: |
Re: [O] [PATCH] Make lexical eval default for elisp src blocks |
Date: |
Mon, 18 Apr 2016 19:41:33 +0200 |
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 :)
Regards,