unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Robert Pluim <rpluim@gmail.com>
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 11:04:46 -0400	[thread overview]
Message-ID: <jwvsfboo1fr.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <87bkicjvne.fsf@gmail.com> (Robert Pluim's message of "Mon, 22 May 2023 16:19:49 +0200")

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

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

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

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

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

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


        Stefan






  reply	other threads:[~2023-05-22 15:04 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 [this message]
2023-05-22 15:36         ` Robert Pluim
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=jwvsfboo1fr.fsf-monnier+emacs@gnu.org \
    --to=bug-gnu-emacs@gnu.org \
    --cc=63625@debbugs.gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=philipk@posteo.net \
    --cc=rpluim@gmail.com \
    --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).