help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Skipping installation of .el.gz files


From: Spencer Baugh
Subject: Re: Skipping installation of .el.gz files
Date: Mon, 23 Oct 2023 12:42:31 -0400
User-agent: Gnus/5.13 (Gnus v5.13)

Eli Zaretskii <eliz@gnu.org> writes:
>> From: Spencer Baugh <sbaugh@janestreet.com>
>> Date: Sun, 22 Oct 2023 20:45:46 -0400
>> 
>> 
>> At my site, I'd like to install the Emacs source code along with Emacs
>> and set source-directory, so that users can easily jump to function
>> definitions and search the Emacs source.
>> 
>> This works great for C function definitions, but Lisp function
>> definitions still jump to the .el.gz files which are installed by "make
>> install".  If I delete those files, jumping to Lisp function definitions
>> stops working entirely.
>> 
>> Is there a clean and supported way to teach Emacs to jump to the files
>> in source-directory instead of the .el.gz ones?
>
> I suggest to override find-lisp-object-file-name with a similar
> definition that does what you want.

Hm, I think what it should do is just, when looking for a Lisp file such
as /usr/share/emacs/29.1/lisp/files.elc, if
/usr/share/emacs/29.1/lisp/files.el and
/usr/share/emacs/29.1/lisp/files.el.gz don't exist, then also check for
(concat source-directory "lisp/files.el") and use that if it exists.
Only for Lisp files in the Emacs installation directory, of course.

This seems generally useful for any user who compiles Emacs from source,
installs it, and then keeps the source directory around.  Now they can
skip installing a duplicate copy of the Lisp files and wasting space,
plus if they choose to do that, then when they jump to definition it
will go directly to the source directory, which is how it already works
for C definitions.

Since this is generally useful, could this be an acceptable patch for
upstream?  Or some variation on it?

Any suggestions on how to reliably figure out the Emacs installation
directory for Lisp files?  I think PATH_LOADSEARCH is what I want, but
that's not exposed to Lisp currently.




reply via email to

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