From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: John Kitchin <jkitchin@andrew.cmu.edu>
Cc: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: [PATCH] Make lexical eval default for elisp src blocks
Date: Mon, 18 Apr 2016 19:41:33 +0200 [thread overview]
Message-ID: <8760veerw2.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <CAJ51EToueaWxQbfMWcJz2WzsvNpq6ne_WC=arzsLhoD2nDb06Q@mail.gmail.com> (John Kitchin's message of "Mon, 18 Apr 2016 13:09:41 -0400")
John Kitchin <jkitchin@andrew.cmu.edu> 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,
next prev parent reply other threads:[~2016-04-18 17:39 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-17 1:05 [PATCH] Make lexical eval default for elisp src blocks John Kitchin
2016-04-17 23:47 ` Adam Porter
2016-04-18 15:44 ` John Kitchin
2016-04-18 16:38 ` Nicolas Goaziou
2016-04-18 17:09 ` John Kitchin
2016-04-18 17:41 ` Nicolas Goaziou [this message]
2016-04-18 17:56 ` John Kitchin
-- strict thread matches above, loose matches on Subject: below --
2016-04-18 17:55 John Kitchin
2016-04-20 8:19 ` Nicolas Goaziou
2016-04-20 12:34 ` John Kitchin
2016-04-20 21:47 ` Nicolas Goaziou
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8760veerw2.fsf@nicolasgoaziou.fr \
--to=mail@nicolasgoaziou.fr \
--cc=emacs-orgmode@gnu.org \
--cc=jkitchin@andrew.cmu.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.