I'm looking through startup.el, and normal-top-level-add-subdirs-to-load-path references the default-directory variable.

What's the value of that variable during startup? I searched for calls to normal-top-level-add-subdirs-to-load-path and only found a 2-line file site-lisp/subdirs.el

(if (fboundp 'normal-top-level-add-subdirs-to-load-path)

I tried inserting some debugging statements to get more insight, but so far they haven't worked. First I tried adding:

(message "%s" default-directory)

and byte recompiling the file. Restarted Emacs but I saw no trace of my debugging in the Messages buffer. Then I replaced the above line with:

(with-temp-file "/Users/ivan/emacswhereami"
  '(insert default-directory))
  • 1
    The answer is in the doc-string for normal-top-level-add-to-load-path: "This function is called from a subdirs.el file. It assumes that 'default-directory' is the directory in which the subdirs.el file exists, and it adds to 'load-path' the subdirs of that directory as specified in DIRS. Normally the elements of DIRS are relative." – lawlist Sep 29 '16 at 15:39
  • @lawlist Right you are, thanks! Impatience got the better of me. I should have just kept reading a little farther. – ivan Sep 29 '16 at 17:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.