From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 09 13:49:51 2023 Received: (at submit) by debbugs.gnu.org; 9 Nov 2023 18:49:51 +0000 Received: from localhost ([127.0.0.1]:48736 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r1A6A-0005Bn-Or for submit@debbugs.gnu.org; Thu, 09 Nov 2023 13:49:51 -0500 Received: from lists.gnu.org ([2001:470:142::17]:58198) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r1A68-0005BY-Vl for submit@debbugs.gnu.org; Thu, 09 Nov 2023 13:49:50 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r1A5N-0005LM-Uk for bug-gnu-emacs@gnu.org; Thu, 09 Nov 2023 13:49:01 -0500 Received: from mail.purcellpeople.com ([139.162.128.219]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r1A5K-0004Ah-4j for bug-gnu-emacs@gnu.org; Thu, 09 Nov 2023 13:49:00 -0500 From: Steve Purcell DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sanityinc.com; s=default; t=1699555703; bh=pgREen7VJl2ev5Im6lYlmhEw4GbHfKtExt6/FVOIyy4=; h=From:Subject:Date:To; b=oJ1N38KtdsyhM9x4UHy0BmZcQObFZ14ip5zyzexZaIcXSxCWr0JaTMSVGmM+5kD5c ZGFRT3IZC6AGHM7FK7qVHJd+6rH/d5S8h+R7FdC1OBRHLmp15X9T6bEWjXY0nDfvAO mmd8EpEysXcT/Qb/gxZpHSrpkxGkwbcx1UTouunc= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.200.91.1.1\)) Subject: 29.1; Error in Emacs 29.1 when installing seq from ELPA Message-Id: <1936A46D-1A9B-4704-8089-8E05B92EC1DC@sanityinc.com> Date: Thu, 9 Nov 2023 18:47:57 +0000 To: bug-gnu-emacs@gnu.org Received-SPF: pass client-ip=139.162.128.219; envelope-from=steve@sanityinc.com; helo=mail.purcellpeople.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) --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 =E2=80=98package-selected-packages=E2=80=99 temporarily since = "emacs -q" would overwrite customizations Contacting host: elpa.gnu.org:443 Parsing tar file...=20 Parsing tar file...done Extracting... \=20 Extracting...done INFO Scraping files for loaddefs...=20 INFO Scraping files for loaddefs...done Source file =E2=80=98/tmp/elpa/seq-2.24.0.20230904.183335/seq.el=E2=80=99 = 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\3= 07!\207" [emacs-version version< "25" require seq-24 seq-25 provide seq] = 3) #(("/tmp/elpa/seq-2.2= 4.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)