all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: Skipping installation of .el.gz files
Date: Mon, 23 Oct 2023 21:39:20 +0300	[thread overview]
Message-ID: <83ttqhmbdz.fsf@gnu.org> (raw)
In-Reply-To: <ierlebte1e0.fsf@janestreet.com> (message from Spencer Baugh on Mon, 23 Oct 2023 12:42:31 -0400)

> From: Spencer Baugh <sbaugh@janestreet.com>
> Date: Mon, 23 Oct 2023 12:42:31 -0400
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> >
> > 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.

No, because the source directory could hold code different from the
one which was used to install the files under /usr/share.  Think about
Emacs installed from a Git repository that got many updates after
that, for example.

> 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?

No, see above.

You took a very special situation caused by your local procedures, and
generalize it under the (false) assumption that it will be necessary
useful for everyone.

The current logic of looking for source files wasn't borne yesterday,
so we should respect it a bit more, and if it sometimes sounds that it
could be easily changed to be much smarter, it is usually a sign that
we are missing something.

You asked how to solve your specific situation, and got several useful
responses.  Why not implement them in your local sandbox and be done?
There's no reason to immediately consider the upstream code wrong just
because you did something that the Emacs installation doesn't support,
and cannot support without causing problems in other, currently
supported, use cases.



  reply	other threads:[~2023-10-23 18:39 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-23  0:45 Skipping installation of .el.gz files Spencer Baugh
2023-10-23  5:55 ` Emanuel Berg
2023-10-23  6:41 ` Corwin Brust
2023-10-23 16:18   ` Spencer Baugh
2023-10-23 11:35 ` Eli Zaretskii
2023-10-23 12:28   ` Emanuel Berg
2023-10-28 10:44     ` Eli Zaretskii
2023-10-28 10:52       ` Emanuel Berg
2023-10-23 16:42   ` Spencer Baugh
2023-10-23 18:39     ` Eli Zaretskii [this message]
2023-10-23 20:25       ` Spencer Baugh
2023-10-23 20:57         ` Emanuel Berg
2023-10-24 12:35         ` Eli Zaretskii
2023-10-24 12:49           ` Emanuel Berg

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=83ttqhmbdz.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=help-gnu-emacs@gnu.org \
    /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.