Re: [O] babel perl issue

2012-12-14 Thread Eric Schulte
Bastien b...@altern.org writes:

 Eric Schulte schulte.e...@gmail.com writes:

 This patch doesn't apply for me with git am to the HEAD of the repo so
 I can't test it directly

 Please try this new one against current db51b8 commit in master.


This patch is still broken

org-mode$ git checkout db51b8 -b crude
Switched to a new branch 'crude'

org-mode$ git am /tmp/0001-Crude-patch-to-simplify-dependencies.patch 
Applying: Crude patch to simplify dependencies.
error: patch failed: lisp/ob-exp.el:23
error: lisp/ob-exp.el: patch does not apply
Patch failed at 0001 Crude patch to simplify dependencies.
The copy of the patch that failed is found in:
   /home/eschulte/.emacs.d/src/org-mode/.git/rebase-apply/patch
When you have resolved this problem, run git am --resolved.
If you prefer to skip this patch, run git am --skip instead.
To restore the original branch and stop patching, run git am --abort.

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



Re: [O] babel perl issue

2012-12-14 Thread Eric Schulte
Bastien b...@altern.org writes:

 Eric Schulte schulte.e...@gmail.com writes:

 This patch is still broken

 (I don't know why ~$ git format-patch master did not produce an
 applicable patch.)

 These three ones are applicable against master/68d4de2.

 Bare in mind this is just meant as a proof it works, we can
 rework the patches later on.

These applied and I now see what they are doing.  This is equivalent to
moving all of the core Babel libraries into a single massive ob.el.  I
explicitly like the separation of functional units of Babel into
separate files, and this sort of refactoring would make Babel harder to
maintain in the future.

What do you find so unappealing about the existence of ob-core.el to
justify such drastic proposals?

Perhaps it would be possible to take all of those functions which are
defined in ob-core *and* are required by other components of Babel, and
move them to an ob-util.el file.  Then we could move the remaining
public facing functions of Babel which are not used in any of it's
components (e.g., org-babel-execute-src-block) and move them into ob.el.

Would that feel cleaner to you?

Thanks,

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



Re: [O] babel perl issue

2012-12-14 Thread Bastien
Hi Eric,

Eric Schulte schulte.e...@gmail.com writes:

 Would that feel cleaner to you?

I feel so.  Please let me think more about it, and
thanks to be open to this possibility.  I'm confident
we can keep a good balance between conveniency (when
editing various ob* files) and maintainability (which
should be judged not only from the current maintainer
point of view but also /per se/.)

I'm busy all day tomorrow, I'll think about this back
on sunday.

Thanks!

-- 
 Bastien



Re: [O] babel perl issue

2012-12-13 Thread Bastien
Bastien b...@altern.org writes:

 Unless you find a bug in the dependencies and/or find a bug in the way
 dependancies are handled,

(I meant: unless you find a bug and/or strongly dislike this solution)

-- 
 Bastien



Re: [O] babel perl issue

2012-12-13 Thread Eric Schulte
Bastien b...@altern.org writes:

 Hi Eric,

 Eric Schulte schulte.e...@gmail.com writes:

 If you can find a cleaner alternative I'll be happy to help you
 apply it.

 Here is a very crude patch for paving the way to a better solution.


This patch doesn't apply for me with git am to the HEAD of the repo so
I can't test it directly, however, judging from a quick review of the
patch and from your diagram I believe it will introduce circular
dependencies.

The crux of the problem is that all of the core ob files need to require
the main ob file, and the main ob file must require all of the core ob
files (so they can be required with a single invocation from outside
files).  Thus, to avoid circular requires, there must be a separate ob
and ob-core.  One to be required and one to do the requiring.

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



Re: [O] babel perl issue

2012-12-12 Thread Achim Gratz
Eric Schulte schulte.eric at gmail.com writes:
 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).

It just occurs to me that it would be even better if you copied the file
verbatim instead of renaming it as the very first step.  That way the history is
preserved across both files since the SHA1 for both files is the same at that
commit.  Then just reset the tree to the commit where you had edited the files 
(the first one in your two part series) and commit that set of changes.  Then
cherry-pick part two.

 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.

:-)

Regards,
Achim.






Re: [O] babel perl issue

2012-12-12 Thread Bastien
Hi Eric,

Eric Schulte schulte.e...@gmail.com writes:

 Please let me know if I can explain anything, or if you'd like to see
 the patches before the hit the master branch.

I've read the thread carefully and I cannot clearly see what problem
we are trying to fix.  I acknowledge things can be cleaned up somehow, 
but I need to see the actual bug that we are fixing here... see my
reply to Achim in the same thread.

Thanks,

-- 
 Bastien



Re: [O] babel perl issue

2012-12-12 Thread Bastien
Hi Achim,

Achim Gratz strom...@nexgo.de writes:

 Eric Schulte writes:
 See http://orgmode.org/manual/Languages.html for the documentation on
 how to activate and disable org-babel languages.

 That actually produces the error:

 File mode specification error: (void-variable org-babel-tangle-lang-exts)

 as the OP has found out (and I can reproduce it).

 The reason is that none of the ob-lang.el files do a (require
 ob-tangle), but try to change a defcustom in ob.tangle.el that is only
 declared, but not yet available at the time.  I've quickfixed it by
 moving the require for ob-tangle in org.el to the beginning of the file,
 but this is now relying on the fact that org is implicitly loaded for
 getting the major mode set up, so all the babel language files still
 need to be cleaned up.

I can't reproduce this.

I have a ~/emacs.el file containing

(org-babel-do-load-languages
  'org-babel-load-languages
  '((perl . t)))

then ~$ emacs -Q -l ~/emacs.el loads correctly and
`org-babel-load-languages' is correctly set up.

Thanks for any help on reproducing the problem!

-- 
 Bastien



Re: [O] babel perl issue

2012-12-12 Thread Eric Schulte
Bastien b...@altern.org writes:

 Hi Eric,

 Eric Schulte schulte.e...@gmail.com writes:

 Please let me know if I can explain anything, or if you'd like to see
 the patches before the hit the master branch.

 I've read the thread carefully and I cannot clearly see what problem
 we are trying to fix.  I acknowledge things can be cleaned up somehow, 
 but I need to see the actual bug that we are fixing here... see my
 reply to Achim in the same thread.


This is refactoring not bug fixing.  The most important impact is that
this will provide for simpler requires by the files implementing support
for particular languages.  Rather than having to do piecemeal requires
of those portions of the Babel infrastructure which may be needed
locally they can simple (require 'ob) and bring in all of the Babel
support as a single unit.

Prior to this change there are language specific files which are using
tangle defcustoms which have not been required and thus are not in
scope.

Finally this consolidates Babel defcustoms into ob.el where they will be
more immediately brought into scope, and are more easily maintained.

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



Re: [O] babel perl issue

2012-12-12 Thread Bastien
Hi Eric,

Eric Schulte schulte.e...@gmail.com writes:

 This is refactoring not bug fixing.  The most important impact is that
 this will provide for simpler requires by the files implementing support
 for particular languages.  Rather than having to do piecemeal requires
 of those portions of the Babel infrastructure which may be needed
 locally they can simple (require 'ob) and bring in all of the Babel
 support as a single unit.

I agree with the simplification if it does not involved creating
ob-core.el and ob-customs.el.  Merging ob.el and ob-tangle.el (and
perhaps ob-eval.el and ob-comint.el) is a good simplification option
IMHO.

 Prior to this change there are language specific files which are using
 tangle defcustoms which have not been required and thus are not in
 scope.

Got it.

 Finally this consolidates Babel defcustoms into ob.el where they will be
 more immediately brought into scope, and are more easily maintained.

Yes, if you merge the files; otherwise, I'd stick to the namespace 
rule: defcustoms belong where their namespace indicate they belong.

Thanks,

-- 
 Bastien



Re: [O] babel perl issue

2012-12-12 Thread Achim Gratz
Bastien writes:
 I can't reproduce this.

You most likely can if you just customize org-babel-load-languages.

 I have a ~/emacs.el file containing

 (org-babel-do-load-languages
   'org-babel-load-languages
   '((perl . t)))

 then ~$ emacs -Q -l ~/emacs.el loads correctly and
 `org-babel-load-languages' is correctly set up.

That only works because it pulls in org.el first.

The problem is that the Babel files can't be completely self-contained
w.r.t. their dependecies as that would create circular requires and
there exist multiple code paths (mainly via autoloads) that pull in
different parts of Org in different order.  As a basic requirement all
customization variables should become available before their uses in all
those cases, but this can't be ensured (at least not easily) with the
current structure.


Regards,
Achim.
-- 
+[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]+

Wavetables for the Terratec KOMPLEXER:
http://Synth.Stromeko.net/Downloads.html#KomplexerWaves




Re: [O] babel perl issue

2012-12-12 Thread Bastien
Eric Schulte schulte.e...@gmail.com writes:

 Here's what the require structure of the core ob files will
 look like after this change.

If i read the graph correctly, merging ob.el ob-eval.el and 
ob-core.el will not create circular requires -- am I right?

-- 
 Bastien



Re: [O] babel perl issue

2012-12-12 Thread Eric Schulte
Bastien b...@altern.org writes:

 Eric Schulte schulte.e...@gmail.com writes:

 Here's what the require structure of the core ob files will
 look like after this change.

 If i read the graph correctly, merging ob.el ob-eval.el and 
 ob-core.el will not create circular requires -- am I right?

Not correct.  The result of such a merge would look like the following.

attachment: alternate-babel.png
With numerous circular requires.

I understand that you find the existence of an ob-core file
aesthetically unappealing.  In principle I don't disagree, but in this
particular case I do not see any preferable solution (including the
keep things as they are option).  If you can think of a better option
I'm open to suggestions, but if not I would like to commit this change
to master.

Thanks,

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


Re: [O] babel perl issue

2012-12-12 Thread Achim Gratz
Bastien writes:
 If i read the graph correctly, merging ob.el ob-eval.el and 
 ob-core.el will not create circular requires -- am I right?

Any attempt to merge ob.el and ob-core.el will result in circular
requires or (the status quo) incomplete requires.  I hope you are not
suggesting to put all of ob into a single file…


Regards,
Achim.
-- 
+[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]+

SD adaptation for Waldorf microQ V2.22R2:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada




Re: [O] babel perl issue

2012-12-12 Thread Bastien
Achim Gratz strom...@nexgo.de writes:

 I hope you are not suggesting to put all of ob into a single file…

Actually that's a good idea!

It should be ~170ko, quite manageable (similar to org-export.el.)

In terms of features, is any of ob-{keys/tangle/table/etc.} 
useful by itself, outside ob?

How would you feel about this Eric?

-- 
 Bastien



Re: [O] babel perl issue

2012-12-12 Thread Eric Schulte
Bastien b...@altern.org writes:

 Achim Gratz strom...@nexgo.de writes:

 I hope you are not suggesting to put all of ob into a single file…

 Actually that's a good idea!

 It should be ~170ko, quite manageable (similar to org-export.el.)

 In terms of features, is any of ob-{keys/tangle/table/etc.} 
 useful by itself, outside ob?

 How would you feel about this Eric?

I don't like this idea at all.

I'm already heavily using page-feed (^L) characters to navigate the
existing ob-core.el.  Combining all of the separate components of babel
into a single file would lose much needed separation and organization
and would make Babel harder to maintain.

In the absence of better ideas, I'm going to go ahead with this
refactoring.  If we do come up with a better idea at some time in the
future I'll be happy to make further changes.  Lacking that we can
always revert this change when Emacs Lisp begins to provide support for
proper modules.

Cheers,

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



Re: [O] babel perl issue

2012-12-12 Thread Achim Gratz
Bastien writes:
 Achim Gratz strom...@nexgo.de writes:
 I hope you are not suggesting to put all of ob into a single file…

 Actually that's a good idea!

Uh-oh… I'm not sure why you like that, but you'd then have the same
problem inside that single file.  It's solveable, but it means you'd
need to put in lots of forward declarations or put things into a
somewhat illogical order, which is surely detrimental for
maintainability.  You might want to ask Nicolas for his opinion, he's
been having a lot of the same problems for the new exporter, for
essentially the same reason.  IIRC, it took some time to really sort
out.


Regards,
Achim.
-- 
+[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]+

Factory and User Sound Singles for Waldorf Blofeld:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds




Re: [O] babel perl issue

2012-12-12 Thread Bastien
Eric Schulte schulte.e...@gmail.com writes:

 In the absence of better ideas, I'm going to go ahead with this
 refactoring.

Okay, go ahead.  But be warned that ob-core.el is not my friend :)

I'll see how we can get rid of it.

-- 
 Bastien



Re: [O] babel perl issue

2012-12-12 Thread Eric Schulte
Bastien b...@altern.org writes:

 Eric Schulte schulte.e...@gmail.com writes:

 In the absence of better ideas, I'm going to go ahead with this
 refactoring.

 Okay, go ahead.  But be warned that ob-core.el is not my friend :)


:)

 I'll see how we can get rid of it.

If you can find a cleaner alternative I'll be happy to help you
apply it.

Cheers,

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



Re: [O] babel perl issue

2012-12-11 Thread flav

Le 10/12/2012 18:24, Eric Schulte a écrit :

1. make sure you're using a recent version of Org-mode, either the
latest release or from git, see
http://orgmode.org/worg/org-faq.html#Keeping-current

2. start Emacs with the -Q flag (to ensure there is no problem caused by
the rest of your config)

3. evaluate the Babel config

  (require 'org)
  (org-babel-do-load-languages
'org-babel-load-languages
'((perl . t)))

4. if you still have problems, then write back with your version of
Emacs, and your version of org-mode (reported with M-x org-version)

Hope this helps,

flav flav.justf...@gmail.com writes:


I am sorry for my misunderstood but
I put (require 'org) in my .emacs and there is no change.



2012/12/10 Eric Schulte schulte.e...@gmail.com


As I mentioned in my previous message you have to require Org-mode
before executing the following snippet.  Try

 (require 'org)
 (org-babel-do-load-languages
   'org-babel-load-languages
   '((perl . t)))

flav flav.justf...@gmail.com writes:


still an issue :


Debugger entered--Lisp error: (void-function org-babel-do-load-languages)
   (org-babel-do-load-languages (quote org-babel-load-languages) (quote
(...)))
   eval-buffer(#buffer  *load* nil /home/flav/.emacs nil t)  ; Reading
at bu$
   load-with-code-conversion(/home/flav/.emacs /home/flav/.emacs t t)
   load(~/.emacs t t)
   #[nil ^H\205\264^@   \306=\203^Q^@\307^H\310Q\2027^@
\311=\2033^@\312\307\31$
   command-line()
   normal-top-level()


2012/12/10 Eric Schulte schulte.e...@gmail.com


(org-babel-do-load-languages
   'org-babel-load-languages
   '((perl . t)))


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


Hello,
Debugger entered--Lisp error: (void-function org-babel-do-load-languages)
  (org-babel-do-load-languages (quote org-babel-load-languages) (quote 
(...)))
  eval((org-babel-do-load-languages (quote org-babel-load-languages) 
(quote (..$

  eval-last-sexp-1(t)
  eval-last-sexp(t)
  eval-print-last-sexp()
  call-interactively(eval-print-last-sexp nil nil)

Org-mode version 7.9.2 (7.9.2-dist @ /usr/share/emacs/site-lisp/org/)
GNU Emacs 23.3.1 (x86_64-pc-linux-gnu, GTK+ Version 2.24.6)
 of 2012-09-21 on allspice, modified by Debian

Thanks for help.

--
flav




Re: [O] babel perl issue

2012-12-11 Thread Eric Schulte
flav flav.justf...@gmail.com writes:

 Le 10/12/2012 18:24, Eric Schulte a écrit :
 1. make sure you're using a recent version of Org-mode, either the
 latest release or from git, see
 http://orgmode.org/worg/org-faq.html#Keeping-current

 2. start Emacs with the -Q flag (to ensure there is no problem caused by
 the rest of your config)

 3. evaluate the Babel config

   (require 'org)
   (org-babel-do-load-languages
 'org-babel-load-languages
 '((perl . t)))

 4. if you still have problems, then write back with your version of
 Emacs, and your version of org-mode (reported with M-x org-version)

 Hope this helps,
[...]
 Hello,
 Debugger entered--Lisp error: (void-function org-babel-do-load-languages)
   (org-babel-do-load-languages (quote org-babel-load-languages) (quote
 (...)))
   eval((org-babel-do-load-languages (quote org-babel-load-languages)
 (quote (..$
   eval-last-sexp-1(t)
   eval-last-sexp(t)
   eval-print-last-sexp()
   call-interactively(eval-print-last-sexp nil nil)

 Org-mode version 7.9.2 (7.9.2-dist @ /usr/share/emacs/site-lisp/org/)
 GNU Emacs 23.3.1 (x86_64-pc-linux-gnu, GTK+ Version 2.24.6)
  of 2012-09-21 on allspice, modified by Debian

 Thanks for help.

I don't see how this is possible.  I am also using Org-mode 7.9.2,
here's my Org-mode version

  Org-mode version 7.9.2 (release_7.9.2-603-gf8a69a @ 
/home/eschulte/.emacs.d/src/org-mode/lisp/)

The `org-babel-do-load-languages' function is defined in org.el, so once
you have run (require 'org), I don't believe it is possible for this
function to remain undefined.  Could you

1. open the org.el file manually on your system,
2. while visiting the file, search for the string
   org-babel-do-load-languages to confirm that the function is defined
   in that file
3. run `eval-buffer' while still visiting that file,
4. and then finally run

   (org-babel-do-load-languages
 'org-babel-load-languages
 '((perl . t)))

If the above does not work, please let me know at which stage it fails.
If it does work, then I suspect the problem is related to something
peculiar to your system, and is beyond my abilities to help you with.

Best,

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



Re: [O] babel perl issue

2012-12-11 Thread flav

Le 11/12/2012 14:45, Eric Schulte a écrit :

flav flav.justf...@gmail.com writes:


Le 10/12/2012 18:24, Eric Schulte a écrit :

1. make sure you're using a recent version of Org-mode, either the
 latest release or from git, see
 http://orgmode.org/worg/org-faq.html#Keeping-current

2. start Emacs with the -Q flag (to ensure there is no problem caused by
 the rest of your config)

3. evaluate the Babel config

   (require 'org)
   (org-babel-do-load-languages
 'org-babel-load-languages
 '((perl . t)))

4. if you still have problems, then write back with your version of
 Emacs, and your version of org-mode (reported with M-x org-version)

Hope this helps,

[...]

Hello,
Debugger entered--Lisp error: (void-function org-babel-do-load-languages)
   (org-babel-do-load-languages (quote org-babel-load-languages) (quote
(...)))
   eval((org-babel-do-load-languages (quote org-babel-load-languages)
(quote (..$
   eval-last-sexp-1(t)
   eval-last-sexp(t)
   eval-print-last-sexp()
   call-interactively(eval-print-last-sexp nil nil)

Org-mode version 7.9.2 (7.9.2-dist @ /usr/share/emacs/site-lisp/org/)
GNU Emacs 23.3.1 (x86_64-pc-linux-gnu, GTK+ Version 2.24.6)
  of 2012-09-21 on allspice, modified by Debian

Thanks for help.

I don't see how this is possible.  I am also using Org-mode 7.9.2,
here's my Org-mode version

   Org-mode version 7.9.2 (release_7.9.2-603-gf8a69a @ 
/home/eschulte/.emacs.d/src/org-mode/lisp/)

The `org-babel-do-load-languages' function is defined in org.el, so once
you have run (require 'org), I don't believe it is possible for this
function to remain undefined.  Could you

1. open the org.el file manually on your system,

/usr/share/emacs/site-lisp/org/org.el

2. while visiting the file, search for the string
org-babel-do-load-languages to confirm that the function is defined
in that file

(defun org-babel-do-load-languages (sym value)
at line 123


3. run `eval-buffer' while still visiting that file,

ok

4. and then finally run

(org-babel-do-load-languages
  'org-babel-load-languages
  '((perl . t)))

(org-babel-do-load-languages
 'org-babel-load-languages
 '((perl . t)))
((perl . t))
it is ok



If the above does not work, please let me know at which stage it fails.
If it does work, then I suspect the problem is related to something
peculiar to your system, and is beyond my abilities to help you with.

Thanks for help.


Best,




--
flav




Re: [O] babel perl issue

2012-12-11 Thread Achim Gratz
Eric Schulte writes:
 Org-mode version 7.9.2 (7.9.2-dist @ /usr/share/emacs/site-lisp/org/)
 GNU Emacs 23.3.1 (x86_64-pc-linux-gnu, GTK+ Version 2.24.6)
  of 2012-09-21 on allspice, modified by Debian

 Thanks for help.

 I don't see how this is possible.

He's using Org from a Debian package that is itself built from a tarball
(I believe that Sebastian Delafond maintains these).  Quite obviously
this package has not been correctly activated, in other words the
autoload definitions are mixed up with the older version of Org that
comes with Emacs 23.3.  In this case (since it is a Debian package) the
activation should have been done via site-init.el so as to not require
user intervention.


Regards,
Achim.
-- 
+[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]+

Factory and User Sound Singles for Waldorf Blofeld:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds




Re: [O] babel perl issue

2012-12-11 Thread Achim Gratz
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.

 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?

 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?

 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.


Regards,
Achim.
-- 
+[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]+

SD adaptations for Waldorf Q V3.00R3 and Q+ V3.54R2:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada




Re: [O] babel perl issue

2012-12-11 Thread Bastien
Hi Eric,

Eric Schulte schulte.e...@gmail.com 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.

I'm slowly catching up, fixing issues and reading the mailing list.

Can you please hold this change until tomorrow eve?  It looks good,
but I'd like to understand it thoroughly.

Thanks!

-- 
 Bastien



Re: [O] babel perl issue

2012-12-11 Thread Eric Schulte
Bastien b...@altern.org writes:

 Hi Eric,

 Eric Schulte schulte.e...@gmail.com 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.

 I'm slowly catching up, fixing issues and reading the mailing list.

 Can you please hold this change until tomorrow eve?  It looks good,
 but I'd like to understand it thoroughly.


Sure thing, I have the patches queued up locally and ready to commit.

Please let me know if I can explain anything, or if you'd like to see
the patches before the hit the master branch.

Cheers,


 Thanks!

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



Re: [O] babel perl issue

2012-12-11 Thread flav
Ok,
I have deleted some files on my system.
I have mis install org (twice in 2 path, bla bla) and I seem to work better.
Thanks a lot for help
And excuse me



2012/12/11 Eric Schulte schulte.e...@gmail.com

 flav flav.justf...@gmail.com writes:

  Le 10/12/2012 18:24, Eric Schulte a écrit :
  1. make sure you're using a recent version of Org-mode, either the
  latest release or from git, see
  http://orgmode.org/worg/org-faq.html#Keeping-current
 
  2. start Emacs with the -Q flag (to ensure there is no problem caused by
  the rest of your config)
 
  3. evaluate the Babel config
 
(require 'org)
(org-babel-do-load-languages
  'org-babel-load-languages
  '((perl . t)))
 
  4. if you still have problems, then write back with your version of
  Emacs, and your version of org-mode (reported with M-x org-version)
 
  Hope this helps,
 [...]
  Hello,
  Debugger entered--Lisp error: (void-function org-babel-do-load-languages)
(org-babel-do-load-languages (quote org-babel-load-languages) (quote
  (...)))
eval((org-babel-do-load-languages (quote org-babel-load-languages)
  (quote (..$
eval-last-sexp-1(t)
eval-last-sexp(t)
eval-print-last-sexp()
call-interactively(eval-print-last-sexp nil nil)
 
  Org-mode version 7.9.2 (7.9.2-dist @ /usr/share/emacs/site-lisp/org/)
  GNU Emacs 23.3.1 (x86_64-pc-linux-gnu, GTK+ Version 2.24.6)
   of 2012-09-21 on allspice, modified by Debian
 
  Thanks for help.

 I don't see how this is possible.  I am also using Org-mode 7.9.2,
 here's my Org-mode version

   Org-mode version 7.9.2 (release_7.9.2-603-gf8a69a @
 /home/eschulte/.emacs.d/src/org-mode/lisp/)

 The `org-babel-do-load-languages' function is defined in org.el, so once
 you have run (require 'org), I don't believe it is possible for this
 function to remain undefined.  Could you

 1. open the org.el file manually on your system,
 2. while visiting the file, search for the string
org-babel-do-load-languages to confirm that the function is defined
in that file
 3. run `eval-buffer' while still visiting that file,
 4. and then finally run

(org-babel-do-load-languages
  'org-babel-load-languages
  '((perl . t)))

 If the above does not work, please let me know at which stage it fails.
 If it does work, then I suspect the problem is related to something
 peculiar to your system, and is beyond my abilities to help you with.

 Best,

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




-- 
flav


Re: [O] babel perl issue

2012-12-10 Thread flav
I put (require 'ob-tangle) in my .emacs
I am sorry but now

Symbol's function definition is void: org-not-nil
when I do C-c C-o in a perl block



2012/12/10 flav flav.justf...@gmail.com

 I put (require 'ob-tangle) in my .emacs
 I am sorry but now

 Symbol's function definition is void: org-not-nil


 2012/12/9 ASSI strom...@nexgo.de

 require 'ob-tangle




 --
 flav




-- 
flav


Re: [O] babel perl issue

2012-12-10 Thread Eric Schulte
flav flav.justf...@gmail.com writes:

 I put (require 'ob-tangle) in my .emacs
 I am sorry but now

 Symbol's function definition is void: org-not-nil
 when I do C-c C-o in a perl block


put the following in your .emacs, possibly following a (require 'org)

(org-babel-do-load-languages 'org-babel-load-languages
  '((perl . t)))

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



Re: [O] babel perl issue

2012-12-10 Thread Eric Schulte
Achim Gratz strom...@nexgo.de writes:

 Eric Schulte writes:
 See http://orgmode.org/manual/Languages.html for the documentation on
 how to activate and disable org-babel languages.

 That actually produces the error:

 File mode specification error: (void-variable org-babel-tangle-lang-exts)

 as the OP has found out (and I can reproduce it).


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.


 The reason is that none of the ob-lang.el files do a (require
 ob-tangle), but try to change a defcustom in ob.tangle.el that is only
 declared, but not yet available at the time.

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.

Best,

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



Re: [O] babel perl issue

2012-12-10 Thread flav
still an issue :


Debugger entered--Lisp error: (void-function org-babel-do-load-languages)
  (org-babel-do-load-languages (quote org-babel-load-languages) (quote
(...)))
  eval-buffer(#buffer  *load* nil /home/flav/.emacs nil t)  ; Reading
at bu$
  load-with-code-conversion(/home/flav/.emacs /home/flav/.emacs t t)
  load(~/.emacs t t)
  #[nil ^H\205\264^@   \306=\203^Q^@\307^H\310Q\2027^@
\311=\2033^@\312\307\31$
  command-line()
  normal-top-level()


2012/12/10 Eric Schulte schulte.e...@gmail.com

 (org-babel-do-load-languages
   'org-babel-load-languages
   '((perl . t)))




-- 
flav


Re: [O] babel perl issue

2012-12-10 Thread Eric Schulte
As I mentioned in my previous message you have to require Org-mode
before executing the following snippet.  Try

(require 'org)
(org-babel-do-load-languages
  'org-babel-load-languages
  '((perl . t)))

flav flav.justf...@gmail.com writes:

 still an issue :


 Debugger entered--Lisp error: (void-function org-babel-do-load-languages)
   (org-babel-do-load-languages (quote org-babel-load-languages) (quote
 (...)))
   eval-buffer(#buffer  *load* nil /home/flav/.emacs nil t)  ; Reading
 at bu$
   load-with-code-conversion(/home/flav/.emacs /home/flav/.emacs t t)
   load(~/.emacs t t)
   #[nil ^H\205\264^@   \306=\203^Q^@\307^H\310Q\2027^@
 \311=\2033^@\312\307\31$
   command-line()
   normal-top-level()


 2012/12/10 Eric Schulte schulte.e...@gmail.com

 (org-babel-do-load-languages
   'org-babel-load-languages
   '((perl . t)))


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



Re: [O] babel perl issue

2012-12-10 Thread flav
I am sorry for my misunderstood but
I put (require 'org) in my .emacs and there is no change.



2012/12/10 Eric Schulte schulte.e...@gmail.com

 As I mentioned in my previous message you have to require Org-mode
 before executing the following snippet.  Try

 (require 'org)
 (org-babel-do-load-languages
   'org-babel-load-languages
   '((perl . t)))

 flav flav.justf...@gmail.com writes:

  still an issue :
 
 
  Debugger entered--Lisp error: (void-function org-babel-do-load-languages)
(org-babel-do-load-languages (quote org-babel-load-languages) (quote
  (...)))
eval-buffer(#buffer  *load* nil /home/flav/.emacs nil t)  ; Reading
  at bu$
load-with-code-conversion(/home/flav/.emacs /home/flav/.emacs t t)
load(~/.emacs t t)
#[nil ^H\205\264^@   \306=\203^Q^@\307^H\310Q\2027^@
  \311=\2033^@\312\307\31$
command-line()
normal-top-level()
 
 
  2012/12/10 Eric Schulte schulte.e...@gmail.com
 
  (org-babel-do-load-languages
'org-babel-load-languages
'((perl . t)))
 

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




-- 
flav


Re: [O] babel perl issue

2012-12-10 Thread Eric Schulte
1. make sure you're using a recent version of Org-mode, either the
   latest release or from git, see
   http://orgmode.org/worg/org-faq.html#Keeping-current

2. start Emacs with the -Q flag (to ensure there is no problem caused by
   the rest of your config)

3. evaluate the Babel config

 (require 'org)
 (org-babel-do-load-languages
   'org-babel-load-languages
   '((perl . t)))

4. if you still have problems, then write back with your version of
   Emacs, and your version of org-mode (reported with M-x org-version)

Hope this helps,

flav flav.justf...@gmail.com writes:

 I am sorry for my misunderstood but
 I put (require 'org) in my .emacs and there is no change.



 2012/12/10 Eric Schulte schulte.e...@gmail.com

 As I mentioned in my previous message you have to require Org-mode
 before executing the following snippet.  Try

 (require 'org)
 (org-babel-do-load-languages
   'org-babel-load-languages
   '((perl . t)))

 flav flav.justf...@gmail.com writes:

  still an issue :
 
 
  Debugger entered--Lisp error: (void-function org-babel-do-load-languages)
(org-babel-do-load-languages (quote org-babel-load-languages) (quote
  (...)))
eval-buffer(#buffer  *load* nil /home/flav/.emacs nil t)  ; Reading
  at bu$
load-with-code-conversion(/home/flav/.emacs /home/flav/.emacs t t)
load(~/.emacs t t)
#[nil ^H\205\264^@   \306=\203^Q^@\307^H\310Q\2027^@
  \311=\2033^@\312\307\31$
command-line()
normal-top-level()
 
 
  2012/12/10 Eric Schulte schulte.e...@gmail.com
 
  (org-babel-do-load-languages
'org-babel-load-languages
'((perl . t)))
 

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


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



Re: [O] babel perl issue

2012-12-10 Thread Achim Gratz
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?  I see no reason to have users add code to
.emacs just for selecting which Babel languages to use.

 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.


Regards,
Achim.
-- 
+[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]+

Wavetables for the Waldorf Blofeld:
http://Synth.Stromeko.net/Downloads.html#BlofeldUserWavetables




Re: [O] babel perl issue

2012-12-10 Thread Achim Gratz
flav writes:
 I am sorry for my misunderstood but
 I put (require 'org) in my .emacs and there is no change.

May I suggest you use the ELPA package?


Regards,
Achim.
-- 
+[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]+

Wavetables for the Waldorf Blofeld:
http://Synth.Stromeko.net/Downloads.html#BlofeldUserWavetables




Re: [O] babel perl issue

2012-12-10 Thread Eric Schulte
Achim Gratz strom...@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



Re: [O] babel perl issue

2012-12-10 Thread Achim Gratz
Eric Schulte writes:
 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.

That would be a possibility, but adding them to a new file ob-customs.el
and requiring that from ob.el might be less intrusive.

 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?

If you can manage to keep the require structure non-circular, that seems
like a good idea.  You could also turn your suggestion on the head and
provide ob-core.el with just the requires (and maybe the defcustoms) you
mentioned above and have all other ob-* files require it.


Regards,
Achim.
-- 
+[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]+

Wavetables for the Terratec KOMPLEXER:
http://Synth.Stromeko.net/Downloads.html#KomplexerWaves




[O] babel perl issue

2012-12-09 Thread flav
Hello,
I am trying to use babel and I don't manage :

#+begin_src
perl

   print
toto\n;

#+end_src

When I do C-c C-o : No org-babel-execute function for perl!

In my .emacs :
(setq org-src-lang-modes (quote ((ocaml . tuareg) (elisp . emacs-lisp)
(ditaa . artist) (asymptote . asy) (dot . fundamental) (sqlite .
sql) (calc . fundamental) (C . c) (cpp . c++) (screen .
shell-script) (perl . perl

M-x org-version :

Org-mode version 7.9.2 (7.9.2-dist @ /usr/share/emacs/site-lisp/org/)

I am sorry, I am sure, I have not done it well, but if you can't help me !
-- 
flav


Re: [O] babel perl issue

2012-12-09 Thread Achim Gratz
flav writes:
 In my .emacs : 
 (setq org-src-lang-modes (quote ((ocaml . tuareg) (elisp .
 emacs-lisp) (ditaa . artist) (asymptote . asy) (dot .
 fundamental) (sqlite . sql) (calc . fundamental) (C . c) (cpp .
 c++) (screen . shell-script) (perl . perl

Scratch that.  You don't need to change anything for this variable (and
if you did it'd be better if you used customize).  What you want to do
is customize the Org Babel Load Languages in the Org Babel customize
group and add perl as a language so that ob-perl is loaded.


Regards,
Achim.
-- 
+[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]+

SD adaptations for Waldorf Q V3.00R3 and Q+ V3.54R2:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada




Re: [O] babel perl issue

2012-12-09 Thread Eric Schulte
Achim Gratz strom...@nexgo.de writes:

 flav writes:
 In my .emacs : 
 (setq org-src-lang-modes (quote ((ocaml . tuareg) (elisp .
 emacs-lisp) (ditaa . artist) (asymptote . asy) (dot .
 fundamental) (sqlite . sql) (calc . fundamental) (C . c) (cpp .
 c++) (screen . shell-script) (perl . perl

 Scratch that.  You don't need to change anything for this variable (and
 if you did it'd be better if you used customize).  What you want to do
 is customize the Org Babel Load Languages in the Org Babel customize
 group and add perl as a language so that ob-perl is loaded.


See http://orgmode.org/manual/Languages.html for the documentation on
how to activate and disable org-babel languages.

Best,

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



Re: [O] babel perl issue

2012-12-09 Thread Achim Gratz
Eric Schulte writes:
 See http://orgmode.org/manual/Languages.html for the documentation on
 how to activate and disable org-babel languages.

That actually produces the error:

File mode specification error: (void-variable org-babel-tangle-lang-exts)

as the OP has found out (and I can reproduce it).

The reason is that none of the ob-lang.el files do a (require
ob-tangle), but try to change a defcustom in ob.tangle.el that is only
declared, but not yet available at the time.  I've quickfixed it by
moving the require for ob-tangle in org.el to the beginning of the file,
but this is now relying on the fact that org is implicitly loaded for
getting the major mode set up, so all the babel language files still
need to be cleaned up.

From 12d87c5d944b75f8acbd6cacb3351cede1d44525 Mon Sep 17 00:00:00 2001
From: Achim Gratz strom...@stromeko.de
Date: Sun, 9 Dec 2012 21:26:16 +0100
Subject: [PATCH] Keep requires at the beginning of the file

* lisp/org.el: Keep require forms at the beginning of the file.

Thanks to flav for providing an example that showed ob-tangle was
required too late.

Also, all ob-lang files should IMHO require ob-tangle instead of
declaring dynamic variables and relying on org.el to do the require.
---
 lisp/org.el | 62 ++---
 1 file changed, 31 insertions(+), 31 deletions(-)

diff --git a/lisp/org.el b/lisp/org.el
index c5be3c5..42d4c0d 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -78,6 +78,37 @@ (defvar org-table-formula-constants-local nil
 (require 'find-func)
 (require 'format-spec)
 
+(require 'outline)
+(if (and (not (keymapp outline-mode-map)) (featurep 'allout))
+(error Conflict with outdated version of allout.el.  Load org.el before allout.el, or upgrade to newer allout, for example by switching to Emacs 22))
+(require 'noutline noutline 'noerror) ;; stock XEmacs does not have it
+
+;; Other stuff we need.
+(require 'time-date)
+(unless (fboundp 'time-subtract) (defalias 'time-subtract 'subtract-time))
+(require 'easymenu)
+(require 'overlay)
+
+(require 'org-macs)
+(require 'org-entities)
+;; (require 'org-compat) moved higher up in the file before it is first used
+(require 'org-faces)
+(require 'org-list)
+(require 'org-pcomplete)
+(require 'org-src)
+(require 'org-footnote)
+
+;; babel
+(require 'ob)
+(require 'ob-table)
+(require 'ob-lob)
+(require 'ob-ref)
+(require 'ob-tangle)
+(require 'ob-comint)
+(require 'ob-keys)
+
+(require 'font-lock)
+
 (let ((load-suffixes (list .el)))
   (load org-loaddefs 'noerror nil nil 'mustsuffix))
 
@@ -4939,35 +4970,6 @@ (defvar org-table-buffer-is-an nil)
 (defvar bidi-paragraph-direction)
 (defvar buffer-face-mode-face)
 
-(require 'outline)
-(if (and (not (keymapp outline-mode-map)) (featurep 'allout))
-(error Conflict with outdated version of allout.el.  Load org.el before allout.el, or upgrade to newer allout, for example by switching to Emacs 22))
-(require 'noutline noutline 'noerror) ;; stock XEmacs does not have it
-
-;; Other stuff we need.
-(require 'time-date)
-(unless (fboundp 'time-subtract) (defalias 'time-subtract 'subtract-time))
-(require 'easymenu)
-(require 'overlay)
-
-(require 'org-macs)
-(require 'org-entities)
-;; (require 'org-compat) moved higher up in the file before it is first used
-(require 'org-faces)
-(require 'org-list)
-(require 'org-pcomplete)
-(require 'org-src)
-(require 'org-footnote)
-
-;; babel
-(require 'ob)
-(require 'ob-table)
-(require 'ob-lob)
-(require 'ob-ref)
-(require 'ob-tangle)
-(require 'ob-comint)
-(require 'ob-keys)
-
 ;;;###autoload
 (define-derived-mode org-mode outline-mode Org
   Outline-based notes management and organizer, alias
@@ -5174,8 +5176,6 @@ (defvar org-mouse-map (make-sparse-keymap))
   (org-defkey org-mouse-map [(tab)] 'org-open-at-point)
   (org-defkey org-mouse-map \C-i 'org-open-at-point))
 
-(require 'font-lock)
-
 (defconst org-non-link-chars ]\t\n\r)
 (defvar org-link-types '(http https ftp mailto file news
 			 shell elisp doi message))
-- 
1.8.0.1




Regards,
Achim.
-- 
+[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]+

DIY Stuff:
http://Synth.Stromeko.net/DIY.html


Re: [O] babel perl issue

2012-12-09 Thread flav
I put (require 'ob-tangle) in my .emacs
I am sorry but now

Symbol's function definition is void: org-not-nil


2012/12/9 ASSI strom...@nexgo.de

 require 'ob-tangle




-- 
flav