* bug#67025: 29.1; Error in Emacs 29.1 when installing seq from ELPA
@ 2023-11-09 18:47 Steve Purcell
0 siblings, 0 replies; only message in thread
From: Steve Purcell @ 2023-11-09 18:47 UTC (permalink / raw)
To: 67025
--text follows this line--
Passing on the following from a correspondent who didn't want to file a
bug themselves:
----------------------------------------------------------------------------
To reproduce, save the following Elisp snippet:
(require 'package)
(setf package-user-dir "/tmp/elpa"
package-archives '(("gnu-devel" . "https://elpa.gnu.org/devel/")))
(package-refresh-contents)
(let ((debug-on-error t))
(package-install (cadr (assq 'seq package-archive-contents))))
and then from the command line run:
$ emacs --batch --load bug.el
Result here:
$ emacs --batch --load ~/test/test.el
Importing package-keyring.gpg...
Importing package-keyring.gpg...done
Contacting host: elpa.gnu.org:443
Contacting host: elpa.gnu.org:443
Package refresh done
Setting ‘package-selected-packages’ temporarily since "emacs -q" would overwrite customizations
Contacting host: elpa.gnu.org:443
Parsing tar file...
Parsing tar file...done
Extracting... \
Extracting...done
INFO Scraping files for loaddefs...
INFO Scraping files for loaddefs...done
Source file ‘/tmp/elpa/seq-2.24.0.20230904.183335/seq.el’ newer than byte-compiled file; using older file
Debugger entered--Lisp error: (file-missing "Cannot open load file" "No such file or directory" "seq-25")
require(seq-25)
byte-code("\301\10\302\"\203\16\0\303\304!\210\202\22\0\303\305!\210\306\307!\207" [emacs-version version< "25" require seq-24 seq-25 provide seq] 3)
#<subr F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_32>(("/tmp/elpa/seq-2.24.0.20230904.183335/seq" . 76))
...
----------------------------------------------------------------------------
My interpretation:
After installing the ELPA version of seq, Emacs decides it must re-load
seq (presumably because it was already loaded from the built-in
version), and then loads seq.el from the downloaded ELPA package. The
problem is that at this point it hasn't added the new ELPA package's
installation directory to load-path, so when seq.el tries to load
seq-25.el, Emacs fails to find that file.
In my own Emacs config, this led to first-time start-up errors in Emacs
29.1 (only), ie. when installing required packages for the first time. I have
worked around it with the following snippet:
(defun sanityinc/reload-previously-loaded-with-load-path-updated (orig pkg-desc)
(let ((load-path (cons (package-desc-dir pkg-desc) load-path)))
(funcall orig pkg-desc)))
(advice-add 'package--reload-previously-loaded :around
'sanityinc/reload-previously-loaded-with-load-path-updated)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-11-09 18:47 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-09 18:47 bug#67025: 29.1; Error in Emacs 29.1 when installing seq from ELPA Steve Purcell
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.