unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Manuel Giraud via "Emacs development discussions." <emacs-devel@gnu.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: sbaugh@catern.com,  emacs-devel@gnu.org
Subject: Re: source-directory, installed Emacs, and C source
Date: Wed, 25 Oct 2023 10:41:33 +0200	[thread overview]
Message-ID: <87msw75c1u.fsf@ledu-giraud.fr> (raw)
In-Reply-To: <831qdjlvi3.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 24 Oct 2023 21:34:44 +0300")

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	other threads:[~2023-10-25  8:41 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-24 14:31 source-directory, installed Emacs, and C source sbaugh
2023-10-24 14:47 ` Eli Zaretskii
2023-10-24 15:13   ` Spencer Baugh
2023-10-24 16:00     ` Eli Zaretskii
2023-10-24 16:20       ` sbaugh
2023-10-24 18:34         ` Eli Zaretskii
2023-10-25  8:41           ` Manuel Giraud via Emacs development discussions. [this message]
2023-10-25 12:43             ` Eli Zaretskii
2023-10-25 13:20               ` Manuel Giraud via Emacs development discussions.
2023-10-25 13:43                 ` sbaugh
2023-10-25 13:59                   ` Eli Zaretskii
2023-10-25 14:29                     ` sbaugh
2023-10-25 16:13                       ` Eli Zaretskii
2023-10-25 18:12                         ` Manuel Giraud via Emacs development discussions.
2023-10-25 18:37                           ` Eli Zaretskii
2023-10-25 19:07                             ` Manuel Giraud via Emacs development discussions.
2023-10-25 16:59                       ` Emanuel Berg
2023-10-24 18:35         ` Emanuel Berg
2023-10-25 17:43         ` chad
2023-10-25 18:32           ` Eli Zaretskii
2023-10-25 20:30             ` chad
2023-10-26  4:57               ` Eli Zaretskii
2023-10-25 18:57           ` Manuel Giraud via Emacs development discussions.
2023-10-24 16:00 ` Manuel Giraud via Emacs development discussions.
2023-10-24 16:04   ` Eli Zaretskii
2023-10-24 18:06   ` Emanuel Berg
2023-10-24 18:48   ` Arsen Arsenović
2023-10-24 18:01 ` Manuel Giraud via Emacs development discussions.

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87msw75c1u.fsf@ledu-giraud.fr \
    --to=emacs-devel@gnu.org \
    --cc=eliz@gnu.org \
    --cc=manuel@ledu-giraud.fr \
    --cc=sbaugh@catern.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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).