From: Eric Schulte <schulte.eric@gmail.com>
To: Achim Gratz <Stromeko@nexgo.de>
Cc: emacs-orgmode@gnu.org
Subject: Re: babel perl issue
Date: Mon, 10 Dec 2012 11:13:52 -0700 [thread overview]
Message-ID: <87obi193mn.fsf@gmail.com> (raw)
In-Reply-To: <87d2yhvm3c.fsf@Rainer.invalid> (Achim Gratz's message of "Mon, 10 Dec 2012 18:44:07 +0100")
Achim Gratz <Stromeko@nexgo.de> writes:
> Eric Schulte writes:
>> Using this method of requiring languages,
>>
>> ;; emacs-lisp
>> (org-babel-do-load-languages
>> 'org-babel-load-languages
>> '((perl . t)))
>>
>> Works for me without issue when called from a fresh emacs (-Q). This is
>> the recommended way of adding support for a new language and should work
>> for the OP.
>
> Why should this be preferred over simple customization of
> org-babel-load-languages?
The `org-babel-do-load-languages' function handles the loading of the
language-specific files as well as the removal of the evaluation
functions defined by those files when languages are deactivated. This
removal requires un-binding those functions.
> I see no reason to have users add code to .emacs just for selecting
> which Babel languages to use.
>
Note that if `org-babel-load-languages' is set through the customization
interface then `org-babel-do-load-languages' will be called as above
(see the :set keyword argument to the defcustom of
`org-babel-load-languages') so it is not necessary for a user to add
anything to their .emacs.
>
>> The two fixes seem to be either to either (1) add (require 'ob-tangle)
>> to all current and new language specific files, or (2) merge ob-tangle
>> into ob.el, so that they are both loaded by (require 'ob). It is
>> unfortunate that because of the recursive require there is no way to
>> separate a single require'd entity across multiple files.
>>
>> Option (2) seems most clean to me. Unless anyone has a better idea I'll
>> make this change.
>
> Well, option (3) is to implement option (2) first, then put all
> defcustoms (together with their initializers perhaps) into separate
> files instead of dispersing them into many smaller ones and require them
> from the top-level files (ob.el in your case, although I personally
> think that all defcustoms should be visible from the start) so that any
> autoloaded function invocation will see them defined with their correct
> values. The external interface is then taken care of by autoloading and
> the number of requires is minimal.
>
So, you're suggesting moving all ob-* defcustoms into ob.el or possibly
into org.el? That seems reasonable to me, although I'm hesitant to add
that much code to org.el w/o a go-ahead from Bastien or a more core
maintainer than myself.
Specifically to the require structure of Babel. Perhaps the best
solution would be to replace ob.el with a small file which requires all
of the core components of Babel (e.g., ob-exp, ob-ref, ob-tangle,
etc...) and move the existing ob.el to something like ob-core.el. That
way the entire Babel suite may be loaded by all language specific files
using a single require statement. Does that seem reasonable?
Thanks,
>
>
> Regards,
> Achim.
--
Eric Schulte
http://cs.unm.edu/~eschulte
next prev parent reply other threads:[~2012-12-10 18:14 UTC|newest]
Thread overview: 49+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-09 10:54 babel perl issue flav
2012-12-09 11:15 ` Achim Gratz
2012-12-09 15:22 ` Eric Schulte
2012-12-09 20:34 ` Achim Gratz
2012-12-10 15:11 ` Eric Schulte
2012-12-10 15:22 ` flav
2012-12-10 15:32 ` Eric Schulte
2012-12-10 15:43 ` flav
2012-12-10 17:24 ` Eric Schulte
2012-12-11 9:05 ` flav
2012-12-11 13:45 ` Eric Schulte
2012-12-11 15:50 ` flav
2012-12-11 18:04 ` Achim Gratz
2012-12-12 6:15 ` flav
2012-12-10 17:51 ` Achim Gratz
2012-12-10 17:44 ` Achim Gratz
2012-12-10 18:13 ` Eric Schulte [this message]
2012-12-10 18:36 ` Achim Gratz
2012-12-11 14:33 ` Eric Schulte
2012-12-11 18:31 ` Achim Gratz
2012-12-12 0:22 ` Eric Schulte
2012-12-12 13:34 ` Achim Gratz
2012-12-11 18:39 ` Bastien
2012-12-12 0:25 ` Eric Schulte
2012-12-12 15:57 ` Bastien
2012-12-12 16:11 ` Eric Schulte
2012-12-12 16:23 ` Bastien
2012-12-12 16:33 ` Eric Schulte
2012-12-12 16:59 ` Bastien
2012-12-12 17:09 ` Eric Schulte
2012-12-12 17:13 ` Achim Gratz
2012-12-12 17:24 ` Bastien
2012-12-12 17:47 ` Eric Schulte
2012-12-12 18:07 ` Bastien
2012-12-12 18:28 ` Eric Schulte
2012-12-13 23:27 ` Bastien
2012-12-13 23:37 ` Bastien
2012-12-14 0:37 ` Eric Schulte
2012-12-14 9:55 ` Bastien
2012-12-14 15:57 ` Eric Schulte
2012-12-14 17:44 ` Bastien
2012-12-14 18:13 ` Eric Schulte
2012-12-14 19:11 ` Bastien
2012-12-12 18:00 ` Achim Gratz
2012-12-12 15:59 ` Bastien
2012-12-12 16:54 ` Achim Gratz
[not found] ` <CAOnk0vRL8PWS3JfuCAqcRcNa3FkM7tG3eH5w8cBdwtNrx757Xw@mail.gmail.com>
[not found] ` <1497100.pF6dAE0Itl@rainer>
2012-12-10 5:32 ` flav
2012-12-10 10:33 ` flav
2012-12-10 15:13 ` Eric Schulte
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=87obi193mn.fsf@gmail.com \
--to=schulte.eric@gmail.com \
--cc=Stromeko@nexgo.de \
--cc=emacs-orgmode@gnu.org \
/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.