unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Robert Pluim <rpluim@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Philip Kaludercic <philipk@posteo.net>,
	63625@debbugs.gnu.org, todd smith <toddasmith@mac.com>
Subject: bug#63625: 29.0.90; package-install inserts package directory into load-path  twice.
Date: Mon, 22 May 2023 17:36:09 +0200	[thread overview]
Message-ID: <877ct0js46.fsf@gmail.com> (raw)
In-Reply-To: <jwvsfboo1fr.fsf-monnier+emacs@gnu.org> (Stefan Monnier via's message of "Mon, 22 May 2023 11:04:46 -0400")

>>>>> On Mon, 22 May 2023 11:04:46 -0400, Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org> said:

    >> `file-name-directory' will return nil for names with no slashes in
    >> them, but I donʼt know if thatʼs possible here.

    Stefan> I think `load-file-name` is always absolute, so I think we should be
    Stefan> safe, but that's the question, yes.

This is where we quote Knuth on the difference between proof and
testing :-)

    >> I *think* we can use `when-let*' here, since subr.el is preloaded.

    Stefan> Please don't, it's too recently introduced IMO and such generated files
    Stefan> may be loaded in older Emacsen.

OK

    Stefan> (package--reload-previously-loaded pkg-desc))
    Stefan> (with-demoted-errors "Error loading autoloads: %s"
    Stefan> (load (package--autoloads-file-name pkg-desc) nil t))
    Stefan> -        (add-to-list 'load-path (directory-file-name pkg-dir)))
    Stefan> +        ;; FIXME: Since 2013 (commit 4fac34cee97a), the autoload files take
    Stefan> +        ;; care of changing the `load-path', so maybe it's time to
    Stefan> +        ;; remove this fallback code?
    Stefan> +        (unless (or (member (file-name-as-directory pkg-dir) load-path)
    Stefan> +                    (member (directory-file-name pkg-dir) load-path))
    Stefan> +          (add-to-list 'load-path pkg-dir)))

    Stefan> Maybe we can have that patch in emacs-29 and remove the code altogether
    Stefan> on `master`?

That seems reasonable. Eli?

Robert
-- 





  reply	other threads:[~2023-05-22 15:36 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-20 21:45 bug#63625: 29.0.90; package-install inserts package directory into load-path twice todd smith via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-22  8:55 ` Robert Pluim
2023-05-22 11:25   ` Eli Zaretskii
2023-05-22 12:46     ` Robert Pluim
2023-05-22 13:18     ` Philip Kaludercic
2023-05-22 13:54       ` Robert Pluim
2023-05-22 13:58   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-22 14:19     ` Robert Pluim
2023-05-22 15:04       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-22 15:36         ` Robert Pluim [this message]
2023-05-22 15:53           ` Eli Zaretskii
2023-05-22 16:57             ` Robert Pluim
2023-05-23 12:06               ` Eli Zaretskii
2023-05-23 13:20                 ` Robert Pluim
2023-05-23 13:46                   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-22 15:49       ` Eli Zaretskii

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=877ct0js46.fsf@gmail.com \
    --to=rpluim@gmail.com \
    --cc=63625@debbugs.gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=philipk@posteo.net \
    --cc=toddasmith@mac.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).