From: tsd@tsdye.com (Thomas S. Dye)
To: nicholas.dokos@hp.com
Cc: Org-mode <emacs-orgmode@gnu.org>
Subject: Re: list-load-path-shadows
Date: Wed, 05 Sep 2012 06:57:48 -1000 [thread overview]
Message-ID: <m1ipbso19v.fsf@tsdye.com> (raw)
In-Reply-To: <6715.1346853272@alphaville> (Nick Dokos's message of "Wed, 05 Sep 2012 09:54:32 -0400")
Nick Dokos <nicholas.dokos@hp.com> writes:
> Thomas S. Dye <tsd@tsdye.com> wrote:
>
>> Nick Dokos <nicholas.dokos@hp.com> writes:
>>
>> > Thomas S. Dye <tsd@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\307\bB\310\307!\204#\311\307\312\"\210\313\bB\310\313!\2042\311\313\312\"\210\314\bB\310\314!\204A\311\314\312\"\210\315\bB\310\315!\204P\311\315\312\"\210\316\bB\310\316!\204_\311\316\312\"\210\317\bB\310\317!\204n\311\317\312\"\210\320\bB\310\320!\204}\311\320\312\"\210\321\bB\310\321!\204\214\311\321\312\"\210\322\bB\310\322!\204\233\311\322\312\"\210\323\bB\310\323!\204\252\311\323\312\"\210\324\bB\310\324!\204\271\311\324\312\"\210\325\bB\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
next prev parent reply other threads:[~2012-09-05 16:58 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-04 16:33 list-load-path-shadows Thomas S. Dye
2012-09-04 17:34 ` list-load-path-shadows Nick Dokos
2012-09-05 3:16 ` list-load-path-shadows Thomas S. Dye
2012-09-05 13:54 ` list-load-path-shadows Nick Dokos
2012-09-05 16:57 ` Thomas S. Dye [this message]
2012-09-05 18:00 ` list-load-path-shadows Nick Dokos
2012-09-05 18:51 ` list-load-path-shadows Thomas S. Dye
2012-09-05 19:20 ` list-load-path-shadows Nick Dokos
2012-09-05 19:40 ` list-load-path-shadows Thomas S. Dye
2012-09-05 20:01 ` list-load-path-shadows Nick Dokos
2012-09-05 20:58 ` list-load-path-shadows Thomas S. Dye
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m1ipbso19v.fsf@tsdye.com \
--to=tsd@tsdye.com \
--cc=emacs-orgmode@gnu.org \
--cc=nicholas.dokos@hp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.