unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Robert Pluim <rpluim@gmail.com>
To: 63625@debbugs.gnu.org
Cc: 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 10:55:13 +0200	[thread overview]
Message-ID: <871qj8lp8u.fsf@gmail.com> (raw)
In-Reply-To: <4ACD9E26-B5A6-412E-8DFC-C09C05A4EACD@mac.com> (todd smith via's message of "Sat, 20 May 2023 16:45:34 -0500")

>>>>> On Sat, 20 May 2023 16:45:34 -0500, todd smith via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org> said:

    Todd> 1) trash ~/.emacs.d     ;; i.e. remove .emacs.d (optional)

    Todd> 2) emacs -Q   (the -Q isn’t necessary,  I’ve observed the problem every way that I’ve started emacs)

    Todd> 3) in *scratch* buffer, type and execute "(package-insert ‘ack)”       (or run M-x package-install or install from M-x list-packages.
    Todd> Any and every package I’ve installed produces the problem, ack is just easy to type)

    Todd> 4) C-h v  load-path    (that is, run describe-variable on load-path to see its value, note the first two entries)

    Todd> Its value is
    Todd> ("/Users/todd/.emacs.d/elpa/ack-1.11"
    Todd> "/Users/todd/.emacs.d/elpa/ack-1.11/"
    Todd> "/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.90/lisp"
    Todd> "/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.90/lisp/vc"
    Todd> "/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.90/lisp/use-package"
    Todd> "/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.90/lisp/url"
    Todd> "/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.90/lisp/textmodes"
    Todd> "/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.90/lisp/progmodes"
    Todd> "/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.90/lisp/play"
    Todd> "/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.90/lisp/org"
    Todd> "/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.90/lisp/nxml"
    Todd> "/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.90/lisp/net"
    Todd> "/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.90/lisp/mh-e"
    Todd> "/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.90/lisp/mail"
    Todd> "/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.90/lisp/leim"
    Todd> "/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.90/lisp/language"
    Todd> "/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.90/lisp/international"
    Todd> "/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.90/lisp/image"
    Todd> "/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.90/lisp/gnus"
    Todd> "/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.90/lisp/eshell"
    Todd> "/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.90/lisp/erc"
    Todd> "/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.90/lisp/emulation"
    Todd> "/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.90/lisp/emacs-lisp"
    Todd> "/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.90/lisp/cedet"
    Todd> "/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.90/lisp/calendar"
    Todd> "/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.90/lisp/calc"
    Todd> "/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.90/lisp/obsolete")

This is because we didnʼt respect DRY. package.el should use the
package support of `loaddefs-generate', but that doesnʼt expose the
requisite feature of `loaddefs-generate--rubric' (maybe on master it does).

diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index 78017b77677..31e5e0809a8 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -1107,8 +1107,9 @@ package-generate-autoloads
         ;; Add the directory that will contain the autoload file to
         ;; the load path.  We don't hard-code `pkg-dir', to avoid
         ;; issues if the package directory is moved around.
+        (directory-file-name
         (or (and load-file-name (file-name-directory load-file-name))
-            (car load-path)))))
+            (car load-path))))))
     (let ((buf (find-buffer-visiting output-file)))
       (when buf (kill-buffer buf)))
     auto-name))


Robert
-- 





  reply	other threads:[~2023-05-22  8:55 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 [this message]
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
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=871qj8lp8u.fsf@gmail.com \
    --to=rpluim@gmail.com \
    --cc=63625@debbugs.gnu.org \
    --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).