emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: source-directory, installed Emacs, and C source


From: Manuel Giraud
Subject: Re: source-directory, installed Emacs, and C source
Date: Wed, 25 Oct 2023 10:41:33 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

Eli Zaretskii <eliz@gnu.org> writes:

[...]

> AFAIR, Emacs looks for Lisp files by scanning load-path.  So if you
> customize load-path to include the directories in the source tree, you
> should be able to tell Emacs to look for the Lisp files in another
> directory.  I think that's what we do when Emacs is run uninstalled,
> and that's why it finds the Lisp files in the source tree.

This works… but not always.  Here is a test I've just done:

     - emacs -Q
     - then load the following:
--8<---------------cut here---------------start------------->8---
(add-to-list 'load-path "~/emacs-repo/lisp/")
(dolist (dir '("vc" "use-package" "url" "textmodes" "progmodes"
               "play" "org" "nxml" "net" "mh-e" "mail" "leim"
               "language" "international" "image" "gnus" "eshell"
               "erc" "emulation" "emacs-lisp" "cedet" "calendar"
               "calc" "obsolete"))
  (add-to-list 'load-path (format "~/emacs-repo/lisp/%s/" dir)))
--8<---------------cut here---------------end--------------->8---

Now my `load-path' value is:
("~/emacs-repo/lisp/obsolete/" "~/emacs-repo/lisp/calc/"
 "~/emacs-repo/lisp/calendar/" "~/emacs-repo/lisp/cedet/"
 "~/emacs-repo/lisp/emacs-lisp/" "~/emacs-repo/lisp/emulation/"
 "~/emacs-repo/lisp/erc/" "~/emacs-repo/lisp/eshell/"
 "~/emacs-repo/lisp/gnus/" "~/emacs-repo/lisp/image/"
 "~/emacs-repo/lisp/international/" "~/emacs-repo/lisp/language/"
 "~/emacs-repo/lisp/leim/" "~/emacs-repo/lisp/mail/"
 "~/emacs-repo/lisp/mh-e/" "~/emacs-repo/lisp/net/"
 "~/emacs-repo/lisp/nxml/" "~/emacs-repo/lisp/org/"
 "~/emacs-repo/lisp/play/" "~/emacs-repo/lisp/progmodes/"
 "~/emacs-repo/lisp/textmodes/" "~/emacs-repo/lisp/url/"
 "~/emacs-repo/lisp/use-package/" "~/emacs-repo/lisp/vc/"
 "~/emacs-repo/lisp/" "/home/manuel/emacs/share/emacs/30.0.50/lisp"
 "/home/manuel/emacs/share/emacs/30.0.50/lisp/vc"
 "/home/manuel/emacs/share/emacs/30.0.50/lisp/use-package"
 "/home/manuel/emacs/share/emacs/30.0.50/lisp/url"
 "/home/manuel/emacs/share/emacs/30.0.50/lisp/textmodes"
 "/home/manuel/emacs/share/emacs/30.0.50/lisp/progmodes"
 "/home/manuel/emacs/share/emacs/30.0.50/lisp/play"
 "/home/manuel/emacs/share/emacs/30.0.50/lisp/org"
 "/home/manuel/emacs/share/emacs/30.0.50/lisp/nxml"
 "/home/manuel/emacs/share/emacs/30.0.50/lisp/net"
 "/home/manuel/emacs/share/emacs/30.0.50/lisp/mh-e"
 "/home/manuel/emacs/share/emacs/30.0.50/lisp/mail"
 "/home/manuel/emacs/share/emacs/30.0.50/lisp/leim"
 "/home/manuel/emacs/share/emacs/30.0.50/lisp/language"
 "/home/manuel/emacs/share/emacs/30.0.50/lisp/international"
 "/home/manuel/emacs/share/emacs/30.0.50/lisp/image"
 "/home/manuel/emacs/share/emacs/30.0.50/lisp/gnus"
 "/home/manuel/emacs/share/emacs/30.0.50/lisp/eshell"
 "/home/manuel/emacs/share/emacs/30.0.50/lisp/erc"
 "/home/manuel/emacs/share/emacs/30.0.50/lisp/emulation"
 "/home/manuel/emacs/share/emacs/30.0.50/lisp/emacs-lisp"
 "/home/manuel/emacs/share/emacs/30.0.50/lisp/cedet"
 "/home/manuel/emacs/share/emacs/30.0.50/lisp/calendar"
 "/home/manuel/emacs/share/emacs/30.0.50/lisp/calc"
 "/home/manuel/emacs/share/emacs/30.0.50/lisp/obsolete")

Now if I try to 'C-h f (describe-function)', some functions will point
to the source in "~/emacs-repo/" and others will point to the install
path source in "~/emacs/share/emacs/30.0.50/".  For instance:

   - 'gnus', 'eshell' and 'dired' --> ~/emacs-repo/
   - 'find-file', 'balance-windows' and 'set-frame-font' --> 
~/emacs/share/emacs/30.0.50/
-- 
Manuel Giraud



reply via email to

[Prev in Thread] Current Thread [Next in Thread]