* Invalid function: org-babel-header-args-safe-fn in Melpa
@ 2016-02-14 15:19 John Kitchin
2016-02-14 15:48 ` Achim Gratz
2016-02-14 15:54 ` Aaron Ecay
0 siblings, 2 replies; 5+ messages in thread
From: John Kitchin @ 2016-02-14 15:19 UTC (permalink / raw)
To: Org-Mode Mailing List
Hi all,
I am trying to debug an issue with installing org-mode from Melpa.
After installing org from Melpa, I get this on starting emacs:
byte-code: Invalid function: org-babel-header-args-safe-fn
Org-mode version 8.3.3 (8.3.3-51-g30bcff-elpaplus @
/Users/jkitchin/Desktop/jmax-git/elpa/org-plus-contrib-20160208/)
It is happening when I try to change some default headers.
Debugger entered--Lisp error: (invalid-function org-babel-header-args-safe-fn)
org-babel-header-args-safe-fn((:cache :colnames :comments :exports :epilogue :hlines :noeval :noweb :noweb-ref :noweb-sep :padline :prologue :rownames :sep :session :tangle :wrap (:eval "never" "query") (:results lambda (str) (not (string-match "file" str))) :width :height :bg :units :pointsize :antialias :quality :compression :res :type :family :title :fonts :version :paper :encoding :pagecentre :colormodel :useDingbats :horizontal))
byte-code("\301\302\303\304\b!#\210\305\306\307\310\311\312\313\314\315\316& \207" [ob-R-safe-header-args put org-babel-default-header-args:R safe-local-variable org-babel-header-args-safe-fn custom-declare-variable org-babel-R-command "R --slave --no-save" "Name of command to use for executing R code." :group org-babel :version "24.1" :type string] 10)
require(ob-R)
#[(pair) "\bA\303\b@!\211\203
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Invalid function: org-babel-header-args-safe-fn in Melpa
2016-02-14 15:19 Invalid function: org-babel-header-args-safe-fn in Melpa John Kitchin
@ 2016-02-14 15:48 ` Achim Gratz
2016-02-14 15:54 ` Aaron Ecay
1 sibling, 0 replies; 5+ messages in thread
From: Achim Gratz @ 2016-02-14 15:48 UTC (permalink / raw)
To: emacs-orgmode
John Kitchin writes:
> I am trying to debug an issue with installing org-mode from Melpa.
There's no Org on Melpa or at least there shouldn't be.
> After installing org from Melpa, I get this on starting emacs:
>
> byte-code: Invalid function: org-babel-header-args-safe-fn
You must not install Org while it has already been loaded (i.e. since
your startup files alkmost certainly reference it somewhere you'll have
to do it from emacs -Q) and you must not use anything from Org in your
startup files before package-initialize has been done.
Regards,
Achim.
--
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+
Samples for the Waldorf Blofeld:
http://Synth.Stromeko.net/Downloads.html#BlofeldSamplesExtra
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Invalid function: org-babel-header-args-safe-fn in Melpa
2016-02-14 15:19 Invalid function: org-babel-header-args-safe-fn in Melpa John Kitchin
2016-02-14 15:48 ` Achim Gratz
@ 2016-02-14 15:54 ` Aaron Ecay
2016-02-14 16:36 ` Achim Gratz
1 sibling, 1 reply; 5+ messages in thread
From: Aaron Ecay @ 2016-02-14 15:54 UTC (permalink / raw)
To: John Kitchin, Org-Mode Mailing List
Hi John,
2016ko otsailak 14an, John Kitchin-ek idatzi zuen:
>
> Hi all,
>
> I am trying to debug an issue with installing org-mode from Melpa.
>
> After installing org from Melpa, I get this on starting emacs:
>
> byte-code: Invalid function: org-babel-header-args-safe-fn
> Org-mode version 8.3.3 (8.3.3-51-g30bcff-elpaplus @
> /Users/jkitchin/Desktop/jmax-git/elpa/org-plus-contrib-20160208/)
>
> It is happening when I try to change some default headers.
>
> Debugger entered--Lisp error: (invalid-function org-babel-header-args-safe-fn)
> org-babel-header-args-safe-fn((:cache :colnames :comments :exports :epilogue :hlines :noeval :noweb :noweb-ref :noweb-sep :padline :prologue :rownames :sep :session :tangle :wrap (:eval "never" "query") (:results lambda (str) (not (string-match "file" str))) :width :height :bg :units :pointsize :antialias :quality :compression :res :type :family :title :fonts :version :paper :encoding :pagecentre :colormodel :useDingbats :horizontal))
> byte-code("\301\302\303\304\b!#\210\305\306\307\310\311\312\313\314\315\316& \207" [ob-R-safe-header-args put org-babel-default-header-args:R safe-local-variable org-babel-header-args-safe-fn custom-declare-variable org-babel-R-command "R --slave --no-save" "Name of command to use for executing R code." :group org-babel :version "24.1" :type string] 10)
> require(ob-R)
> #[(pair) "\bA\303\b@!\211\203.\304\305\306 P!!\202%\307\305\310 P!!\210\307\305\311 P!!*\207" [pair lang active symbol-name require intern "ob-" fmakunbound "org-babel-execute:" "org-babel-expand-body:"] 5]((R . t))
> mapc(#[(pair) "\bA\303\b@!\211\203.\304\305\306 P!!\202%\307\305\310 P!!\210\307\305\311 P!!*\207" [pair lang active symbol-name require intern "ob-" fmakunbound "org-babel-execute:" "org-babel-expand-body:"] 5] ((emacs-lisp . t) (python . t) (sh . t) (matlab . t) (sqlite . t) (ruby . t) (perl . t) (org . t) (dot . t) (plantuml . t) (R . t)))
> org-babel-do-load-languages(org-babel-load-languages ((emacs-lisp . t) (python . t) (sh . t) (matlab . t) (sqlite . t) (ruby . t) (perl . t) (org . t) (dot . t) (plantuml . t) (R . t)))
> eval-buffer(#<buffer *load*> nil "/Users/jkitchin/Desktop/jmax-git/jmax-org.el" nil t) ; Reading at buffer position 7097
>
> If I run this:
> (byte-recompile-file
> (expand-file-name "ob-R.el"
> (file-name-directory (locate-library "org")))
> t)
>
This looks like the kind of problem that results when org is byte-compiled
in an emacs with a different version of org loaded. This used to be a
problem when installing via package.el (and not just for org), but I think
there has been some work put into making sure it doesn’t happen any more.
(I know emacs developers were discussing them and then they seemed to go
away so I assumed they were fixed...it’s possible I was mistaken though.)
If I had to guess, I’d say that line 63 of packages.el in your jmax
setup defeats these fixes. Try commenting it out. It should not be
necessary to manually byte-compile packages: package.el should do that
for you. And in this case, I hypothesize that it is actually harmful.
Hope this helps,
--
Aaron Ecay
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Invalid function: org-babel-header-args-safe-fn in Melpa
2016-02-14 15:54 ` Aaron Ecay
@ 2016-02-14 16:36 ` Achim Gratz
2016-02-14 18:01 ` John Kitchin
0 siblings, 1 reply; 5+ messages in thread
From: Achim Gratz @ 2016-02-14 16:36 UTC (permalink / raw)
To: emacs-orgmode
Aaron Ecay writes:
> This looks like the kind of problem that results when org is byte-compiled
> in an emacs with a different version of org loaded. This used to be a
> problem when installing via package.el (and not just for org), but I think
> there has been some work put into making sure it doesn’t happen any more.
> (I know emacs developers were discussing them and then they seemed to go
> away so I assumed they were fixed...it’s possible I was mistaken though.)
No, this is bug #10125 and the others that it was merged with (most
recently #21267, with the exact same error message as John got).
> If I had to guess, I’d say that line 63 of packages.el in your jmax
> setup defeats these fixes. Try commenting it out. It should not be
> necessary to manually byte-compile packages: package.el should do that
> for you. And in this case, I hypothesize that it is actually harmful.
Yes it is. Although I'd venture to guess that it would have happened
anyway.
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Invalid function: org-babel-header-args-safe-fn in Melpa
2016-02-14 16:36 ` Achim Gratz
@ 2016-02-14 18:01 ` John Kitchin
0 siblings, 0 replies; 5+ messages in thread
From: John Kitchin @ 2016-02-14 18:01 UTC (permalink / raw)
To: Achim Gratz; +Cc: emacs-orgmode@gnu.org
[-- Attachment #1: Type: text/plain, Size: 2650 bytes --]
It does happen anyway. I had that in to get around this issue a while ago
(long story, but it is why we still run 8.2.10), and I still get the issue
without it.
I think I have figured it out. The order the packages are installed is
important. The code below illustrates the issue for me. If I install
org-plus-contrib first, the issue goes away. Note the first thing the pydoc
package does is:
(require 'org), which I guess interferes with subsequent building of org.
(I am using GNU Emacs 25.1.50.1).
Also, you need to have (R . t) in there. that specifically triggers the
error.
(setq user-emacs-directory "./sandbox/")
(require 'package)
(setq package-archives
'(("org" . "http://orgmode.org/elpa/")
("gnu" . "http://elpa.gnu.org/packages/")
("melpa" . "http://melpa.org/packages/")))
(package-initialize)
(package-refresh-contents)
(package-install 'pydoc)
(package-install 'org-plus-contrib)
(org-babel-do-load-languages
'org-babel-load-languages
'((emacs-lisp . t)
(R . t)
))
(message "done")
John
-----------------------------------
Professor John Kitchin
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu
On Sun, Feb 14, 2016 at 11:36 AM, Achim Gratz <Stromeko@nexgo.de> wrote:
> Aaron Ecay writes:
> > This looks like the kind of problem that results when org is
> byte-compiled
> > in an emacs with a different version of org loaded. This used to be a
> > problem when installing via package.el (and not just for org), but I
> think
> > there has been some work put into making sure it doesn’t happen any more.
> > (I know emacs developers were discussing them and then they seemed to go
> > away so I assumed they were fixed...it’s possible I was mistaken though.)
>
> No, this is bug #10125 and the others that it was merged with (most
> recently #21267, with the exact same error message as John got).
>
> > If I had to guess, I’d say that line 63 of packages.el in your jmax
> > setup defeats these fixes. Try commenting it out. It should not be
> > necessary to manually byte-compile packages: package.el should do that
> > for you. And in this case, I hypothesize that it is actually harmful.
>
> Yes it is. Although I'd venture to guess that it would have happened
> anyway.
>
>
> 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
>
>
>
[-- Attachment #2: Type: text/html, Size: 4222 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-02-14 18:01 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-14 15:19 Invalid function: org-babel-header-args-safe-fn in Melpa John Kitchin
2016-02-14 15:48 ` Achim Gratz
2016-02-14 15:54 ` Aaron Ecay
2016-02-14 16:36 ` Achim Gratz
2016-02-14 18:01 ` John Kitchin
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).