Nick Dokos <nicholas.do...@hp.com> writes: > Thomas S. Dye <t...@tsdye.com> wrote: > >> Nick Dokos <nicholas.do...@hp.com> writes: >> >> > Thomas S. Dye <t...@tsdye.com> wrote: >> > >> >> Aloha all, >> >> >> >> I'm working to understand why my initialization files don't work if I >> >> compile org from git, but do seem to work (that is, initialization runs >> >> to completion) when I don't compile org from git. Right now I've >> >> installed org from git and have run make uncompiled. >> >> >> > >> > It might be a good idea to run with --debug-init in the compiled case >> > and get a backtrace. >> >> Hi Nick, >> >> After make compile, starting emacs --debug-init yields this backtrace: >> >> Debugger entered--Lisp error: (void-function org-find-library-dir) >> (org-find-library-dir "org") >> (file-name-directory (org-find-library-dir "org")) >> (expand-file-name "../contrib" (file-name-directory >> (org-find-library-dir "org"))) >> (file-name-as-directory (expand-file-name "../contrib" >> (file-name-directory (org-find-library-dir "org")))) >> (expand-file-name "scripts" (file-name-as-directory >> (expand-file-name "../contrib" (file-name-directory >> (org-find-library-dir "org"))))) >> (file-name-as-directory (expand-file-name "scripts" >> (file-name-as-directory (expand-file-name "../contrib" >> (file-name-directory (org-find-library-dir "org")))))) >> (expand-file-name "ditaa.jar" (file-name-as-directory >> (expand-file-name "scripts" (file-name-as-directory >> (expand-file-name "../contrib" (file-name-directory >> (org-find-library-dir "org"))))))) >> eval((expand-file-name "ditaa.jar" (file-name-as-directory >> (expand-file-name "scripts" (file-name-as-directory >> (expand-file-name "../contrib" (file-name-directory >> (org-find-library-dir "org")))))))) >> custom-initialize-reset(org-ditaa-jar-path (expand-file-name >> "ditaa.jar" (file-name-as-directory (expand-file-name "scripts" >> (file-name-as-directory (expand-file-name "../contrib" >> (file-name-directory (org-find-library-dir "org")))))))) >> custom-declare-variable(org-ditaa-jar-path (expand-file-name >> "ditaa.jar" (file-name-as-directory (expand-file-name "scripts" >> (file-name-as-directory (expand-file-name "../contrib" >> (file-name-directory (org-find-library-dir "org"))))))) "Path to the >> ditaa jar executable." :group org-babel :type string) >> >> AFAICT, org-find-library-dir is a macro defined in org-compat.el. Not >> sure why compiling would make it disappear. Initialization runs to >> completion when org isn't compiled. >> >> > I doubt the shadowing you discuss below makes a difference here (but >> > I could be wrong). >> > > > Looks like I was wrong :-) The custom shadowing seems to play a role. > Just guessing, it's probably a chicken-and-egg situation: you load the > custom file before org gets initialized and there is no autoload that > manages to get the macro defined before it is used. > > One way to break the loop is to not use the macro in your custom file: > replace it by its definition. Another way is to delete the customization > of org-ditaa-jar-path from the custom file and include it after org gets > initialized. Both of these are to be considered workaround hacks than > solutions, but it's hard to propose a solution without knowing exactly > what the problem is. > > If you still can't make it work, please post the initialization file(s) > and the two custom files and maybe somebody can figure out something. > > HTH, > Nick
Hi Nick, The initialization error was coming when one of my files was being evaluated. If I don't require org-latex, the compiled version of org will initialize. *** OFF Require org-latex #+begin_src emacs-lisp :tangle no (require 'org-latex) #+end_src However, evaluating (require 'org-latex) in *scratch* yields this familiar error: Debugger entered--Lisp error: (void-function org-find-library-dir) (org-find-library-dir "org") (file-name-directory (org-find-library-dir "org")) (expand-file-name "../contrib" (file-name-directory (org-find-library-dir "org"))) (file-name-as-directory (expand-file-name "../contrib" (file-name-directory (org-find-library-dir "org")))) (expand-file-name "scripts" (file-name-as-directory (expand-file-name "../contrib" (file-name-directory (org-find-library-dir "org"))))) (file-name-as-directory (expand-file-name "scripts" (file-name-as-directory (expand-file-name "../contrib" (file-name-directory (org-find-library-dir "org")))))) (expand-file-name "ditaa.jar" (file-name-as-directory (expand-file-name "scripts" (file-name-as-directory (expand-file-name "../contrib" (file-name-directory (org-find-library-dir "org"))))))) eval((expand-file-name "ditaa.jar" (file-name-as-directory (expand-file-name "scripts" (file-name-as-directory (expand-file-name "../contrib" (file-name-directory (org-find-library-dir "org")))))))) custom-initialize-reset(org-ditaa-jar-path (expand-file-name "ditaa.jar" (file-name-as-directory (expand-file-name "scripts" (file-name-as-directory (expand-file-name "../contrib" (file-name-directory (org-find-library-dir "org")))))))) custom-declare-variable(org-ditaa-jar-path (expand-file-name "ditaa.jar" (file-name-as-directory (expand-file-name "scripts" (file-name-as-directory (expand-file-name "../contrib" (file-name-directory (org-find-library-dir "org"))))))) "Path to the ditaa jar executable." :group org-babel :type string) require(org-exp-blocks) byte-code("\300\301!\210\300\302!\210\300\303!\210\300\304!\210\300\305!\210\300\306!\207" [require org org-macs org-agenda org-exp-blocks ob-exp org-src] 2) require(org-exp) byte-code("\301\302!\210\301\303!\210\301\304!\210\301\305!\210\301\306!\210\307B\310\307!\204#\311\307\312\"\210\313B\310\313!\2042\311\313\312\"\210\314B\310\314!\204A\311\314\312\"\210\315B\310\315!\204P\311\315\312\"\210\316B\310\316!\204_\311\316\312\"\210\317B\310\317!\204n\311\317\312\"\210\320B\310\320!\204}\311\320\312\"\210\321B\310\321!\204\214\311\321\312\"\210\322B\310\322!\204\233\311\322\312\"\210\323B\310\323!\204\252\311\323\312\"\210\324B\310\324!\204\271\311\324\312\"\210\325B\310\325!\204\310\311\325\326\"\210\312\207" [current-load-list require footnote org org-exp org-macs org-beamer org-export-latex-class default-boundp set-default nil org-export-latex-class-options org-export-latex-header org-export-latex-append-header org-export-latex-options-plist org-export-latex-todo-keywords-1 org-export-latex-complex-heading-re org-export-latex-not-done-keywords org-export-latex-done-keywords org-export-latex-display-custom-times org-export-latex-all-targets-re org-export-latex-add-level 0] 3) require(org-latex) eval((require (quote org-latex)) nil) eval-last-sexp-1(t) eval-last-sexp(t) eval-print-last-sexp() call-interactively(eval-print-last-sexp nil nil) Tom -- Thomas S. Dye http://www.tsdye.com