From mboxrd@z Thu Jan 1 00:00:00 1970 From: tsd@tsdye.com (Thomas S. Dye) Subject: Re: list-load-path-shadows Date: Wed, 05 Sep 2012 06:57:48 -1000 Message-ID: References: <8533.1346780053@alphaville.americas.hpqcorp.net> <6715.1346853272@alphaville> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:41533) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T9IvS-0000X6-2W for emacs-orgmode@gnu.org; Wed, 05 Sep 2012 12:58:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T9IvL-0005o0-Gr for emacs-orgmode@gnu.org; Wed, 05 Sep 2012 12:58:01 -0400 Received: from oproxy8-pub.bluehost.com ([69.89.22.20]:34229) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1T9IvL-0005my-3T for emacs-orgmode@gnu.org; Wed, 05 Sep 2012 12:57:55 -0400 In-Reply-To: <6715.1346853272@alphaville> (Nick Dokos's message of "Wed, 05 Sep 2012 09:54:32 -0400") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: nicholas.dokos@hp.com Cc: Org-mode Nick Dokos writes: > Thomas S. Dye wrote: > >> Nick Dokos writes: >>=20 >> > Thomas S. Dye wrote: >> > >> >> Aloha all, >> >>=20 >> >> 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 ru= ns >> >> to completion) when I don't compile org from git. Right now I've >> >> installed org from git and have run make uncompiled. >> >>=20 >> > >> > It might be a good idea to run with --debug-init in the compiled case >> > and get a backtrace. >>=20 >> Hi Nick, >>=20 >> After make compile, starting emacs --debug-init yields this backtrace: >>=20 >> 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) >>=20 >> 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. >>=20 >> > 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-directo= ry (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-directo= ry (expand-file-name "../contrib" (file-name-directory (org-find-library-di= r "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-n= ame "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 str= ing) 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 or= g-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!\2= 04\310\311\325\326\"\210\312\207" [current-load-list require footnote org o= rg-exp org-macs org-beamer org-export-latex-class default-boundp set-defaul= t nil org-export-latex-class-options org-export-latex-header org-export-lat= ex-append-header org-export-latex-options-plist org-export-latex-todo-keywo= rds-1 org-export-latex-complex-heading-re org-export-latex-not-done-keyword= s 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 --=20 Thomas S. Dye http://www.tsdye.com