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!#\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) "A\303@!\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) "A\303@!\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