emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Eric Schulte <schulte.eric@gmail.com>
To: Achim Gratz <Stromeko@nexgo.de>
Cc: emacs-orgmode@gnu.org
Subject: Re: babel perl issue
Date: Tue, 11 Dec 2012 17:22:22 -0700	[thread overview]
Message-ID: <876248ggwk.fsf@gmail.com> (raw)
In-Reply-To: 874njszbim.fsf@Rainer.invalid

[-- Attachment #1: Type: text/plain, Size: 1948 bytes --]

Achim Gratz <Stromeko@nexgo.de> writes:

> Eric Schulte writes:
>> I'm attaching two patches which implement this new require structure.
>> They move ob.el -> ob-core.el.  The new ob.el (which is now loaded by
>> every file which requires 'ob) does two things.
>
> That looks OK so far, just one nit: it would be much cleaner from the
> perspective of Git if you first renamed ob.el -> ob-core.el and then
> patched it.  That way git blame would continue to work across that
> commit in a mostly sensible manner.  Right now all lines in those two
> files are new things that sprang into existence with this commit as far
> as Git is concerned.
>

I will make this change (in fact I had done this originally, but then
didn't want to send too many patches so I compressed the commit
history).

>
>> 1. It defines every Babel defcustom (excluding the language-specific
>>    defcustoms).  Should defvars be moved here as well?
>
> Not necessarily, but if it cleans up the code, this would be worth
> doing.  Maybe as a second step, since none of it should be broken right
> now?
>

In fact I think this would make the code less readable, so I won't move
around any defvars.

>
>> 2. It loads the remainder of Babel, namely; ob-eval, ob-core, ob-comint,
>>    ob-exp, ob-keys, ob-table, ob-lob, ob-ref and ob-tangle.
>
> Which codepaths would directly activate ob-comint for instance and why
> is it appropriate to just (require 'ob-core) in this case?
>

Each language file will only need to (require 'ob), only a few of the
core Babel files would actually require ob-core.  Here's a diagram of
the require structure.

    # shell-script
    (echo "digraph {";
      for file in lisp/ob{,-eval,-core,-keys,-table,-ref,-comint,-exp,-lob,-tangle}.el;do
        name=$(basename $file .el)
        echo "\"$name\";"
        rgrep "require 'ob" $file|sed "s/^.*'/\"/;s/)/\" -> \"$name\"\;/;"
      done;echo "}";
    )|dot -Tpng > /tmp/babel-requires.png


[-- Attachment #2: babel-requires.png --]
[-- Type: image/png, Size: 251741 bytes --]

[-- Attachment #3: Type: text/plain, Size: 379 bytes --]


>
>> This allows for most of the language files to be simplified as they now
>> only need to require ob, rather than requiring the subset of the above
>> particular to their needs.
>
> Looks nicer to me, anyway.
>

Me too, I'll apply this after Bastien gets a chance to look it over.

Thanks for your help,

>
>
> Regards,
> Achim.

-- 
Eric Schulte
http://cs.unm.edu/~eschulte

  reply	other threads:[~2012-12-12  2:10 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
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 [this message]
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

  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=876248ggwk.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 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).