* [bug] [babel] org-reload doesn't use full emacs load-path?
@ 2012-05-29 1:51 Eric S Fraga
2012-05-29 19:45 ` [PATCH] " Achim Gratz
0 siblings, 1 reply; 6+ messages in thread
From: Eric S Fraga @ 2012-05-29 1:51 UTC (permalink / raw)
To: emacs-orgmode
Hello,
I have my own org babel language implementations (very specific
languages for my own software). One of these is called Jacaranda and
the org babel file is ob-jacaranda.el, as one would expect.
I activate jacaranda support in org babel using
(org-babel-do-load-languages 'org-babel-load-languages
'((jacaranda . t) ; mine
))
For illustration above, I've removed all the other languages I want
enabled.
In any case, when I start emacs + org, everything goes well and org
babel supports my language perfectly.
However, if org changes (e.g. some bug fix) and I download the new
version and then try to org-reload from an existing emacs instance, I
get the following error:
,----
| Debugger entered--Lisp error: (file-error "Cannot open load file" "/home/ucecesf/git/org-mode/lisp/ob-jacaranda.el")
| load("/home/ucecesf/git/org-mode/lisp/ob-jacaranda.el" nil nil nosuffix)
| (if (and (not uncompiled) (file-exists-p (concat f ".elc"))) (load (concat f ".elc") nil nil (quote nosuffix)) (load (concat f ".el") nil nil (quote nosuffix)))
| (progn (if (and (not uncompiled) (file-exists-p (concat f ".elc"))) (load (concat f ".elc") nil nil (quote nosuffix)) (load (concat f ".el") nil nil (quote nosuffix))))
| (if (featurep (intern (file-name-nondirectory f))) (progn (if (and (not uncompiled) (file-exists-p (concat f ".elc"))) (load (concat f ".elc") nil nil (quote nosuffix)) (load (concat f ".el") nil nil (quote nosuffix)))))
| (when (featurep (intern (file-name-nondirectory f))) (if (and (not uncompiled) (file-exists-p (concat f ".elc"))) (load (concat f ".elc") nil nil (quote nosuffix)) (load (concat f ".el") nil nil (quote nosuffix))))
| (lambda (f) (when (featurep (intern (file-name-nondirectory f))) (if (and (not uncompiled) (file-exists-p (concat f ".elc"))) (load (concat f ".elc") nil nil (quote nosuffix)) (load (concat f ".el") nil nil (quote nosuffix)))))("/home/ucecesf/git/org-mode/lisp/ob-jacaranda")
| mapc((lambda (f) (when (featurep (intern (file-name-nondirectory f))) (if (and (not uncompiled) (file-exists-p (concat f ".elc"))) (load (concat f ".elc") nil nil (quote nosuffix)) (load (concat f ".el") nil nil (quote nosuffix))))) ("/home/ucecesf/git/org-mode/lisp/ob" "/home/ucecesf/git/org-mode/lisp/ob-comint" "/home/ucecesf/git/org-mode/lisp/ob-eval" "/home/ucecesf/git/org-mode/lisp/ob-exp" "/home/ucecesf/git/org-mode/lisp/ob-keys" "/home/ucecesf/git/org-mode/lisp/ob-lob" "/home/ucecesf/git/org-mode/lisp/ob-ref" "/home/ucecesf/git/org-mode/lisp/ob-table" "/home/ucecesf/git/org-mode/lisp/ob-tangle" "/home/ucecesf/git/org-mode/lisp/ob-R" "/home/ucecesf/git/org-mode/lisp/ob-calc" "/home/ucecesf/git/org-mode/lisp/ob-clojure" "/home/ucecesf/git/org-mode/lisp/ob-ditaa" "/home/ucecesf/git/org-mode/lisp/ob-dot" "/home/ucecesf/git/org-mode/lisp/ob-emacs-lisp" "/home/ucecesf/git/org-mode/lisp/ob-gnuplot" "/home/ucecesf/git/org-mode/lisp/ob-jacaranda" "/home/ucecesf/git/org-mode/lisp/ob-latex" "/home/ucecesf/git/org-mode/lisp/ob-ledger" "/home/ucecesf/git/org-mode/lisp/ob-maxima" "/home/ucecesf/git/org-mode/lisp/ob-octave" "/home/ucecesf/git/org-mode/lisp/ob-org" "/home/ucecesf/git/org-mode/lisp/ob-plantuml" "/home/ucecesf/git/org-mode/lisp/ob-python" "/home/ucecesf/git/org-mode/lisp/ob-ruby" "/home/ucecesf/git/org-mode/lisp/ob-sh" "/home/ucecesf/git/org-mode/lisp/ob-sqlite" "/home/ucecesf/git/org-mode/contrib/lisp/org-annotate-file" "/home/ucecesf/git/org-mode/contrib/lisp/org-bibtex-extras" "/home/ucecesf/git/org-mode/contrib/lisp/org-bookmark" "/home/ucecesf/git/org-mode/contrib/lisp/org-checklist" "/home/ucecesf/git/org-mode/contrib/lisp/org-choose" "/home/ucecesf/git/org-mode/contrib/lisp/org-collector" "/home/ucecesf/git/org-mode/contrib/lisp/org-contacts" "/home/ucecesf/git/org-mode/contrib/lisp/org-contribdir" "/home/ucecesf/git/org-mode/contrib/lisp/org-depend" "/home/ucecesf/git/org-mode/contrib/lisp/org-drill" "/home/ucecesf/git/org-mode/contrib/lisp/org-e-ascii" "/home/ucecesf/git/org-mode/contrib/lisp/org-e-html" "/home/ucecesf/git/org-mode/contrib/lisp/org-e-latex" "/home/ucecesf/git/org-mode/contrib/lisp/org-e-odt" "/home/ucecesf/git/org-mode/contrib/lisp/org-e-publish" "/home/ucecesf/git/org-mode/contrib/lisp/org-element" "/home/ucecesf/git/org-mode/contrib/lisp/org-elisp-symbol" "/home/ucecesf/git/org-mode/contrib/lisp/org-eval-light" "/home/ucecesf/git/org-mode/contrib/lisp/org-eval" "/home/ucecesf/git/org-mode/contrib/lisp/org-exp-bibtex" "/home/ucecesf/git/org-mode/contrib/lisp/org-expiry" "/home/ucecesf/git/org-mode/contrib/lisp/org-export-generic" "/home/ucecesf/git/org-mode/contrib/lisp/org-export" ...))
| (let* ((file-re "^org\\(-.*\\)?\\.el") (dir-org (file-name-directory (org-find-library-dir "org"))) (dir-org-contrib (ignore-errors (file-name-directory (org-find-library-dir "org-contribdir")))) (babel-files (mapcar (lambda (el) (concat (concat dir-org "ob") (when el (format "-%s" el)) ".el")) (append (list nil "comint" "eval" "exp" "keys" "lob" "ref" "table" "tangle") (delq nil (mapcar (lambda ... ...) org-babel-load-languages))))) (files (append babel-files (and dir-org-contrib (directory-files dir-org-contrib t file-re)) (directory-files dir-org t file-re))) (remove-re (concat (if (featurep (quote xemacs)) "org-colview" "org-colview-xemacs") "\\'"))) (setq files (mapcar (quote file-name-sans-extension) files)) (setq files (mapcar (lambda (x) (if (string-match remove-re x) nil x)) files)) (setq files (delq nil files)) (mapc (lambda (f) (when (featurep (intern (file-name-nondirectory f))) (if (and (not uncompiled) (file-exists-p (concat f ".elc"))) (load (concat f ".elc") nil nil (quote nosuffix)) (load (concat f ".el") nil nil (quote nosuffix))))) files) (load (concat dir-org "org-version.el") (quote noerror) nil (quote nosuffix)))
| org-reload(nil)
`----
For some reason, org tries to load my ob-jacaranda.el from where org
itself sits despite ob-jacaranda.el being in one of the directories in
the load-path.
One possible worry: even with emacs -Q, I get org-version returning the
following:
Org-mode version 7.8.10 (release_7.8.10-619-g540dfc @ mixed installation! /usr/share/emacs/24.1.50/lisp/org/ and /home/ucecesf/git/org-mode/lisp/)
Note the "mixed installation" bit. I've never seen this before.
thanks,
eric
--
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.1.50.1 + Ma Gnus v0.6
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] org-reload doesn't use full emacs load-path?
2012-05-29 1:51 [bug] [babel] org-reload doesn't use full emacs load-path? Eric S Fraga
@ 2012-05-29 19:45 ` Achim Gratz
2012-05-30 7:45 ` Eric S Fraga
2012-05-31 2:20 ` Eric S Fraga
0 siblings, 2 replies; 6+ messages in thread
From: Achim Gratz @ 2012-05-29 19:45 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 282 bytes --]
Eric S Fraga writes:
> For some reason, org tries to load my ob-jacaranda.el from where org
> itself sits despite ob-jacaranda.el being in one of the directories in
> the load-path.
That would have been me, but it was obviously the wrong thing to do.
Patch attached, please test.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: fix org-reload --]
[-- Type: text/x-patch, Size: 1010 bytes --]
From 3234f4ed6329240101172f823931f5b2a0c4fa6f Mon Sep 17 00:00:00 2001
From: Achim Gratz <Stromeko@Stromeko.DE>
Date: Tue, 29 May 2012 21:43:27 +0200
Subject: [PATCH] Revert an undesirable change in org-reload.
* lisp/org.el (org-reload): Revert an undesirable change in
org-reload. Do not prepend org-dir to babel-files, which prevents
the files from being found in load-path.
---
lisp/org.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lisp/org.el b/lisp/org.el
index 1f8e13f..0a1fd35 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -19604,7 +19604,7 @@ (defun org-reload (&optional uncompiled)
(file-name-directory
(org-find-library-dir "org-contribdir"))))
(babel-files
- (mapcar (lambda (el) (concat (concat dir-org "ob") (when el (format "-%s" el)) ".el"))
+ (mapcar (lambda (el) (concat "ob" (when el (format "-%s" el)) ".el"))
(append (list nil "comint" "eval" "exp" "keys"
"lob" "ref" "table" "tangle")
(delq nil
--
1.7.9.2
[-- Attachment #3: Type: text/plain, Size: 877 bytes --]
> One possible worry: even with emacs -Q, I get org-version returning the
> following:
>
> Org-mode version 7.8.10 (release_7.8.10-619-g540dfc @ mixed installation! /usr/share/emacs/24.1.50/lisp/org/ and /home/ucecesf/git/org-mode/lisp/)
>
> Note the "mixed installation" bit. I've never seen this before.
It tells you that org-install is found in a different place than org.
This probably means you haven't done a 'make autoloads' or more likely
in your case a 'make uncompiled' and are relying on the autoload
definitions from a different org version than the one you are using.
You can't expect that to work and this is a gentle reminder to fix it
before it falls over.
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
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] org-reload doesn't use full emacs load-path?
2012-05-29 19:45 ` [PATCH] " Achim Gratz
@ 2012-05-30 7:45 ` Eric S Fraga
2012-05-31 2:20 ` Eric S Fraga
1 sibling, 0 replies; 6+ messages in thread
From: Eric S Fraga @ 2012-05-30 7:45 UTC (permalink / raw)
To: Achim Gratz; +Cc: emacs-orgmode
Achim Gratz <Stromeko@nexgo.de> writes:
> Eric S Fraga writes:
>> For some reason, org tries to load my ob-jacaranda.el from where org
>> itself sits despite ob-jacaranda.el being in one of the directories in
>> the load-path.
>
> That would have been me, but it was obviously the wrong thing to do.
> Patch attached, please test.
Thanks. Will test later as I'm off to a meeting, well cocktail
reception ;-), in a couple of minutes.
[...]
>> One possible worry: even with emacs -Q, I get org-version returning the
>> following:
>
>>
>> Org-mode version 7.8.10 (release_7.8.10-619-g540dfc @ mixed
>> installation! /usr/share/emacs/24.1.50/lisp/org/ and
>> /home/ucecesf/git/org-mode/lisp/)
>>
>> Note the "mixed installation" bit. I've never seen this before.
>
> It tells you that org-install is found in a different place than org.
> This probably means you haven't done a 'make autoloads' or more likely
> in your case a 'make uncompiled' and are relying on the autoload
> definitions from a different org version than the one you are using.
> You can't expect that to work and this is a gentle reminder to fix it
> before it falls over.
<blush>
My usual process is to execute:
$ git pull && make clean && make all autoloads
but I mistyped the last word this time so my autloads were not defined.
Sorry for the noise!
</blush>
Thanks,
eric
--
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.1.50.1 + Ma Gnus v0.6
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] org-reload doesn't use full emacs load-path?
2012-05-29 19:45 ` [PATCH] " Achim Gratz
2012-05-30 7:45 ` Eric S Fraga
@ 2012-05-31 2:20 ` Eric S Fraga
2012-05-31 18:35 ` Achim Gratz
1 sibling, 1 reply; 6+ messages in thread
From: Eric S Fraga @ 2012-05-31 2:20 UTC (permalink / raw)
To: Achim Gratz; +Cc: emacs-orgmode
Achim Gratz <Stromeko@nexgo.de> writes:
> Eric S Fraga writes:
>> For some reason, org tries to load my ob-jacaranda.el from where org
>> itself sits despite ob-jacaranda.el being in one of the directories in
>> the load-path.
>
> That would have been me, but it was obviously the wrong thing to do.
> Patch attached, please test.
Seems to work just fine. Thanks!
--
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.1.50.1 + Ma Gnus v0.6
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] org-reload doesn't use full emacs load-path?
2012-05-31 2:20 ` Eric S Fraga
@ 2012-05-31 18:35 ` Achim Gratz
2012-06-01 8:14 ` Bastien
0 siblings, 1 reply; 6+ messages in thread
From: Achim Gratz @ 2012-05-31 18:35 UTC (permalink / raw)
To: emacs-orgmode
Eric S Fraga writes:
> Seems to work just fine. Thanks!
Thanks for testing. Bastien, could you please install the patch?
Regards,
Achim.
--
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+
SD adaptation for Waldorf Blofeld V1.15B11:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] org-reload doesn't use full emacs load-path?
2012-05-31 18:35 ` Achim Gratz
@ 2012-06-01 8:14 ` Bastien
0 siblings, 0 replies; 6+ messages in thread
From: Bastien @ 2012-06-01 8:14 UTC (permalink / raw)
To: Achim Gratz; +Cc: emacs-orgmode
Achim Gratz <Stromeko@nexgo.de> writes:
> Eric S Fraga writes:
>> Seems to work just fine. Thanks!
>
> Thanks for testing. Bastien, could you please install the patch?
Done, thanks.
--
Bastien
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-06-01 8:13 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-29 1:51 [bug] [babel] org-reload doesn't use full emacs load-path? Eric S Fraga
2012-05-29 19:45 ` [PATCH] " Achim Gratz
2012-05-30 7:45 ` Eric S Fraga
2012-05-31 2:20 ` Eric S Fraga
2012-05-31 18:35 ` Achim Gratz
2012-06-01 8:14 ` Bastien
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).