From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: Van L <van@scratch.space>
Cc: org-mode-email <emacs-orgmode@gnu.org>,
John Kitchin <jkitchin@andrew.cmu.edu>
Subject: Re: C++ is not accepted for SRC block evaluation
Date: Wed, 30 May 2018 13:11:30 +0200 [thread overview]
Message-ID: <87d0xd1jq5.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <874liru626.fsf@gmail.com> (Aaron Ecay's message of "Mon, 28 May 2018 16:57:05 +0100")
Hello,
Aaron Ecay <aaronecay@gmail.com> writes:
> Improved documentation is never a bad thing. OTOH, I personally would
> not spend time on implementing the mapping you propose.
I simply added a footnote about C++ and D languages.
> org-babel-do-load-languages is IMO a relic. I think that all babel
> languages should be autoloaded, just like normal lisp libraries are.
But we still need a mechanism to selectively allow evaluation of some
source blocks based on their language. I guess some users expect to have
this.
Otherwise, it sounds good.
> If I had to sketch a design for this, it would be a macro like:
>
> (org-babel-define-language R
> :evaluate org-babel-R-evaluate
> :session org-babel-R-creaete-session
> :language-name "R" ;; Both these Could be optional, with the
> :language-mode R-mode ;; default calculated from the language name
> ...)
>
> This macro would expand to:
>
> (add-to-list org-src-lang-modes ...)
> (add-to-list org-babel-tangle-lang-exts ...)
> ;; Possibly some others ...
> (add-to-list org-babel-languages-alist
> '(R . (evaluate . org-babel-R-evaluate)
> (session . org-babel-R-create-session)
> ...))
On the implementation side of things, I suggest to stay away from macros
whenever possible. It would make sense, however, to define a language as
a defstruct, much like we do for export back-ends.
In any case, I like this idea.
> Iʼve held back on implementing this (among other reasons) because it
> would be a big disruption to the babel ecosystem. For all the languages
> in core and contrib it would be manageable, but there are third-party
> libraries that would have to be transitioned as well, plus the growing
> pains of user config files, etc. It would not be a small project.
This change would entail a new major release, indeed. I think it is
largely worth the incompatible changes it would introduce. BTW, we could
still support old variables and functions. E.g., if language Foo is not
defined as a proper defstruct, look for the old system to load it and
send a deprecation warning about it.
Regards,
--
Nicolas Goaziou
next prev parent reply other threads:[~2018-05-30 11:11 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-26 12:15 C++ is not accepted for SRC block evaluation Van L
2018-05-26 14:50 ` John Kitchin
2018-05-27 2:50 ` Van L
2018-05-27 20:24 ` Nicolas Goaziou
2018-05-27 20:48 ` Aaron Ecay
2018-05-27 21:09 ` Nicolas Goaziou
2018-05-28 15:57 ` Aaron Ecay
2018-05-30 11:11 ` Nicolas Goaziou [this message]
2018-05-30 16:35 ` Berry, Charles
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
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87d0xd1jq5.fsf@nicolasgoaziou.fr \
--to=mail@nicolasgoaziou.fr \
--cc=emacs-orgmode@gnu.org \
--cc=jkitchin@andrew.cmu.edu \
--cc=van@scratch.space \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).