From debbugs-submit-bounces@debbugs.gnu.org Sun May 21 03:32:27 2023 Received: (at submit) by debbugs.gnu.org; 21 May 2023 07:32:27 +0000 Received: from localhost ([127.0.0.1]:59956 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q0dYF-0000u9-VQ for submit@debbugs.gnu.org; Sun, 21 May 2023 03:32:27 -0400 Received: from lists.gnu.org ([209.51.188.17]:49454) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q0UOk-0006Qi-PV for submit@debbugs.gnu.org; Sat, 20 May 2023 17:46:00 -0400 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 1q0UOj-0006PP-VU for bug-gnu-emacs@gnu.org; Sat, 20 May 2023 17:45:58 -0400 Received: from ms11p00im-qufo17291901.me.com ([17.58.38.48]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q0UOg-0004W4-Sw for bug-gnu-emacs@gnu.org; Sat, 20 May 2023 17:45:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mac.com; s=1a1hai; t=1684619149; bh=Ti17R/VjTawkGnANWaPvOlkaI8WeJDewgh9fCzjRXew=; h=From:Content-Type:Mime-Version:Subject:Message-Id:Date:To; b=TCyMhklJk1yynhlnwZs3y6CxIuEm9F57H7sPWQejaxn4mKhU/ttq+VI1XGsiIUQ3j 0Ed5TSgDuBGYTSC4esq02dHVPG6AAw6QRkezOTqx9MpwcQio7sdC8UMGsMuedrmeXY XXTHuZKrAVYU/iJVuYSo6eC5mx10tDYQ5K7g/geoTY8mJ3NY9lnWz+RKKr9uXZT4u9 poBTnrdxDjDsunqZnTBRbuuXnhfnhhyUmKK9vxJRpSZDReE515VeQ/s37esm/dNoQS FzNEFZ00+wnks+Yf2Fylp5yiiktHcVltsZEXzs0yWvx/5jhmpm/+o1wxhGFJp2PgsG MG283DgLs1y2A== Received: from smtpclient.apple (ms11p00im-dlb-asmtpmailmevip.me.com [17.57.154.19]) by ms11p00im-qufo17291901.me.com (Postfix) with ESMTPSA id 9A23CBC01AB for ; Sat, 20 May 2023 21:45:48 +0000 (UTC) From: todd smith Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.500.231\)) Subject: 29.0.90; package-install inserts package directory into load-path twice. Message-Id: <4ACD9E26-B5A6-412E-8DFC-C09C05A4EACD@mac.com> Date: Sat, 20 May 2023 16:45:34 -0500 To: bug-gnu-emacs@gnu.org X-Mailer: Apple Mail (2.3731.500.231) X-Proofpoint-ORIG-GUID: eZHwQvFh9Sn0F_JCa0AKdrUd0JphyJW0 X-Proofpoint-GUID: eZHwQvFh9Sn0F_JCa0AKdrUd0JphyJW0 X-Proofpoint-Virus-Version: =?UTF-8?Q?vendor=3Dfsecure_engine=3D1.1.170-22c6f66c430a71ce266a39bfe25bc?= =?UTF-8?Q?2903e8d5c8f:6.0.138,18.0.816,17.11.62.513.0000000_definitions?= =?UTF-8?Q?=3D2022-01-18=5F01:2020-02-14=5F02,2022-01-18=5F01,2021-12-02?= =?UTF-8?Q?=5F01_signatures=3D0?= X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999 malwarescore=0 bulkscore=0 spamscore=0 phishscore=0 suspectscore=0 clxscore=1011 adultscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2305200193 Received-SPF: pass client-ip=17.58.38.48; envelope-from=toddasmith@mac.com; helo=ms11p00im-qufo17291901.me.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, 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.3 (-) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Sun, 21 May 2023 03:32:22 -0400 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: -2.3 (--) 1) trash ~/.emacs.d ;; i.e. remove .emacs.d (optional) 2) emacs -Q (the -Q isn=E2=80=99t necessary, I=E2=80=99ve observed = the problem every way that I=E2=80=99ve started emacs) 3) in *scratch* buffer, type and execute "(package-insert =E2=80=98ack)=E2= =80=9D (or run M-x package-install or install from M-x = list-packages. Any and every package I=E2=80=99ve installed produces the problem, ack = is just easy to type) 4) C-h v load-path (that is, run describe-variable on load-path to = see its value, note the first two entries) Its value is ("/Users/todd/.emacs.d/elpa/ack-1.11" = "/Users/todd/.emacs.d/elpa/ack-1.11/" = "/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.90/lisp" = "/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.90/lisp/vc" = "/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.90/lisp/use-p= ackage" = "/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.90/lisp/url" = "/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.90/lisp/textm= odes" = "/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.90/lisp/progm= odes" = "/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.90/lisp/play"= = "/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.90/lisp/org" = "/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.90/lisp/nxml"= = "/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.90/lisp/net" = "/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.90/lisp/mh-e"= = "/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.90/lisp/mail"= = "/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.90/lisp/leim"= = "/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.90/lisp/langu= age" = "/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.90/lisp/inter= national" = "/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.90/lisp/image= " = "/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.90/lisp/gnus"= = "/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.90/lisp/eshel= l" = "/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.90/lisp/erc" = "/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.90/lisp/emula= tion" = "/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.90/lisp/emacs= -lisp" = "/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.90/lisp/cedet= " = "/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.90/lisp/calen= dar" = "/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.90/lisp/calc"= = "/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.90/lisp/obsol= ete") 5) Unlike Emacs 28, two entries for package ack have been added to load-path (see the first two entries). These are both for the same directory (one has a trailing "/" the other doesn=E2=80=99t, but = both strings are equivalent paths to the directory for Emacs). 6) It doesn't matter how Emacs is started with differing command line args. It doesn't matter if package-install is invoked with M-x in the mini-buffer or (package-install ...) executed in the *scratch* buffer or (use-package ... :ensure t) in an init.el file. It doesn't matter which package is being installed. It doesn't matter how many packages are installed. In all cases duplicate directory names are added as entries to load-path for *every* package installed in Emacs 29.0.90. 7) Thank You! In GNU Emacs 29.0.90 (build 2, aarch64-apple-darwin22.4.0, NS appkit-2299.50 Version 13.3.1 (Build 22E261)) of 2023-04-26 built on firefly.local System Description: macOS 13.3.1 Configured using: 'configure --disable-dependency-tracking --disable-silent-rules --enable-locallisppath=3D/opt/homebrew/share/emacs/site-lisp --infodir=3D/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/info/emacs --prefix=3D/opt/homebrew/Cellar/emacs-plus@29/29.0.60 --with-xml2 --with-gnutls --with-native-compilation --without-compress-install --without-dbus --without-imagemagick --with-modules --with-rsvg --without-pop --with-ns --disable-ns-self-contained 'CFLAGS=3D-Os -w -pipe -mmacosx-version-min=3D13 -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk -DFD_SETSIZE=3D10000 -DDARWIN_UNLIMITED_SELECT' 'CPPFLAGS=3D-I/opt/homebrew/opt/zlib/include -I/opt/homebrew/opt/jpeg/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/icu4c/include -I/opt/homebrew/opt/openssl@1.1/include -isystem/opt/homebrew/include -F/opt/homebrew/Frameworks -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk' 'LDFLAGS=3D-L/opt/homebrew/opt/zlib/lib -L/opt/homebrew/opt/jpeg/lib -L/opt/homebrew/opt/readline/lib -L/opt/homebrew/opt/icu4c/lib -L/opt/homebrew/opt/openssl@1.1/lib -L/opt/homebrew/lib -F/opt/homebrew/Frameworks -Wl,-headerpad_max_install_names -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk'' Configured features: ACL GIF GLIB GMP GNUTLS JPEG JSON LCMS2 LIBXML2 MODULES NATIVE_COMP NOTIFY KQUEUE NS PDUMPER PNG RSVG SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP XIM ZLIB Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t global-eldoc-mode: t eldoc-mode: t show-paren-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t line-number-mode: t indent-tabs-mode: t transient-mark-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug cl-print help-fns pcomplete thingatpt pcase compile comint ansi-osc ansi-color ring ack-autoloads loaddefs-gen lisp-mnt radix-tree tar-mode arc-mode archive-mode cus-edit pp cus-start cus-load wid-edit mm-archive message sendmail yank-media dired dired-loaddefs rfc822 mml mml-sec epa derived gnus-util text-property-search time-date mailabbrev gmm-utils mailheader mm-decode mm-bodies mm-encode mail-utils gnutls network-stream url-cache url-http url-auth mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr url-gw nsm puny epg rfc6068 epg-config finder-inf package browse-url url url-proxy url-privacy url-expand url-methods url-history url-cookie generate-lisp-file url-domsuf url-util mailcap url-handlers url-parse auth-source eieio eieio-core password-cache json map url-vars comp comp-cstr warnings icons subr-x rx cl-seq cl-macs cl-extra help-mode cl-loaddefs cl-lib term/xterm xterm byte-opt gv bytecomp byte-compile rmc iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/ns-win ns-win ucs-normalize mule-util term/common-win tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer nadvice seq simple cl-generic indonesian philippine cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget keymap hashtable-print-readable backquote threads kqueue cocoa ns lcms2 multi-tty make-network-process native-compile emacs) Memory information: ((conses 16 209790 38117) (symbols 48 12653 0) (strings 32 60200 3226) (string-bytes 1 1802843) (vectors 16 34731) (vector-slots 8 536516 26744) (floats 8 74 494) (intervals 56 424 0) (buffers 984 15)) B From debbugs-submit-bounces@debbugs.gnu.org Mon May 22 04:55:23 2023 Received: (at 63625) by debbugs.gnu.org; 22 May 2023 08:55:23 +0000 Received: from localhost ([127.0.0.1]:33512 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q11K6-0006lb-Vq for submit@debbugs.gnu.org; Mon, 22 May 2023 04:55:23 -0400 Received: from mail-wm1-f54.google.com ([209.85.128.54]:56668) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q11K5-0006kh-Bq for 63625@debbugs.gnu.org; Mon, 22 May 2023 04:55:22 -0400 Received: by mail-wm1-f54.google.com with SMTP id 5b1f17b1804b1-3f42c865535so58466765e9.1 for <63625@debbugs.gnu.org>; Mon, 22 May 2023 01:55:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684745715; x=1687337715; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=lGmfpHeJ4gbz3RYNpgqKNTUAP3z+dQq6wn4nyw/mq2A=; b=a9+aLTjWIJoP+OYZp6jASWwWtRJWG6JXY5tyAEpf2cmsfzi+QNMEF0js2PB0JDTggG 0CL/dmIVLYqHiM0lVkkjwpebwydTJ95BDAjzbjwgGW5p+JloUgz9JdcvLcwXax1P1cFd nd1qZX0Kn3bTCGrFb1Mj/swVYVpMTSfjRGhSaSefeAoDvHUhKCFvWG1A7/z53hGvvWwQ 0ilMewKczQYwv3MnkzV8nWNh32eUv7qDiXSYIN4ZRdV3W3eWJYnRRegI2NXIh4juhu7E QnSEKQKBw+ZVcwVfV/el00daTEb4DyqTxh+7+g+e5gMHzavAfNUXwhL86vocANeymmtl FniQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684745715; x=1687337715; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=lGmfpHeJ4gbz3RYNpgqKNTUAP3z+dQq6wn4nyw/mq2A=; b=f5B5c/NRGIGPCvsY5167WKxdT+1WmUHOva9so5x9ck3wXk+FjmpJWDsIY6VGjLa7/P 7qXZOSzoeMrhF+yvttlCDgSXm0KrC7avye3+EUr0lUMmUDb7mBPkh4InGOcNJqxwJ5K6 duhMT2O5MSvlYlN7QITGjwoPeqwD57qGVXr2uBztVuevsR/aNV4WCQuZpZerfJ9G+Qkc M3XlKbHYJySTp8PskAHVkZkgeYMnFT4oD5TFi6yEjHKv2odcPvC94J0bGjz5Ol9pwaJm GoDH+eegfpZkiRARBva6iAGv3ZgecdPN+4o0nLGlOs1BJtM8MFw8CueTCzMQJpTh46V5 p5iw== X-Gm-Message-State: AC+VfDzx63u9NldVnBgIh8iMbHIaqmplGFuBLfLqi4pNkxP1DlorQYYe IrxfH9K1mJ1J4w0cJSe8NP31SXWIY68= X-Google-Smtp-Source: ACHHUZ4pv2Cb3S96Un3XbBBUxpFU/D+58lc5mOflDUK2+vjZFhpD9gECvKOINeDb/mA44LEdQXnSFA== X-Received: by 2002:a05:600c:ad0:b0:3f4:23df:c681 with SMTP id c16-20020a05600c0ad000b003f423dfc681mr6341415wmr.12.1684745714800; Mon, 22 May 2023 01:55:14 -0700 (PDT) Received: from rltb ([82.66.8.55]) by smtp.gmail.com with ESMTPSA id a5-20020a05600c224500b003f5ffba9ae1sm6294130wmm.24.2023.05.22.01.55.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 May 2023 01:55:14 -0700 (PDT) From: Robert Pluim To: 63625@debbugs.gnu.org Subject: Re: bug#63625: 29.0.90; package-install inserts package directory into load-path twice. In-Reply-To: <4ACD9E26-B5A6-412E-8DFC-C09C05A4EACD@mac.com> (todd smith via's message of "Sat, 20 May 2023 16:45:34 -0500") References: <4ACD9E26-B5A6-412E-8DFC-C09C05A4EACD@mac.com> Date: Mon, 22 May 2023 10:55:13 +0200 Message-ID: <871qj8lp8u.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 63625 Cc: todd smith 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: -1.0 (-) >>>>> On Sat, 20 May 2023 16:45:34 -0500, todd smith via "Bug reports for G= NU Emacs, the Swiss army knife of text editors" sai= d: Todd> 1) trash ~/.emacs.d ;; i.e. remove .emacs.d (optional) Todd> 2) emacs -Q (the -Q isn=E2=80=99t necessary, I=E2=80=99ve obse= rved the problem every way that I=E2=80=99ve started emacs) Todd> 3) in *scratch* buffer, type and execute "(package-insert =E2=80= =98ack)=E2=80=9D (or run M-x package-install or install from M-x list= -packages. Todd> Any and every package I=E2=80=99ve installed produces the problem= , ack is just easy to type) Todd> 4) C-h v load-path (that is, run describe-variable on load-pa= th 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/l= isp" Todd> "/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.90/l= isp/vc" Todd> "/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.90/l= isp/use-package" Todd> "/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.90/l= isp/url" Todd> "/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.90/l= isp/textmodes" Todd> "/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.90/l= isp/progmodes" Todd> "/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.90/l= isp/play" Todd> "/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.90/l= isp/org" Todd> "/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.90/l= isp/nxml" Todd> "/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.90/l= isp/net" Todd> "/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.90/l= isp/mh-e" Todd> "/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.90/l= isp/mail" Todd> "/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.90/l= isp/leim" Todd> "/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.90/l= isp/language" Todd> "/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.90/l= isp/international" Todd> "/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.90/l= isp/image" Todd> "/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.90/l= isp/gnus" Todd> "/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.90/l= isp/eshell" Todd> "/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.90/l= isp/erc" Todd> "/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.90/l= isp/emulation" Todd> "/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.90/l= isp/emacs-lisp" Todd> "/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.90/l= isp/cedet" Todd> "/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.90/l= isp/calendar" Todd> "/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.90/l= isp/calc" Todd> "/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.90/l= isp/obsolete") This is because we didn=CA=BCt respect DRY. package.el should use the package support of `loaddefs-generate', but that doesn=CA=BCt 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 --=20 From debbugs-submit-bounces@debbugs.gnu.org Mon May 22 07:24:48 2023 Received: (at 63625) by debbugs.gnu.org; 22 May 2023 11:24:48 +0000 Received: from localhost ([127.0.0.1]:33704 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q13ei-0002rI-Bt for submit@debbugs.gnu.org; Mon, 22 May 2023 07:24:48 -0400 Received: from eggs.gnu.org ([209.51.188.92]:53246) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q13eg-0002r4-FU for 63625@debbugs.gnu.org; Mon, 22 May 2023 07:24:47 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q13eb-0001iF-4w; Mon, 22 May 2023 07:24:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=n7NfqjDrS+YVy5Uqa1TZmpOat8XGqAGflu0/1GwwOVA=; b=c2ZAhAUvRDLs31543Kmi 3/siOCesqFejj9lU1UjpuH3m2DKbbC4a2OlDsg+7USTXjC+AHF0D6zih2Z4N/QjWd6Iz83Wl3GyWi dTVxtPEknFBqQ7GSEkk05iQJ39Tn7j9T7Hp+JDRUJ+zo/k1YI6H2VOBRLH9UFpx09ERgtbF+wNd56 e77W79mZITJ4MqsPz7gxkMPurJIAWf4iJYuwuIPd0NjNJxzGn5wxvFP1fxsuY2UoYQ/xOmr6JY910 Ezx7N7XvGEVRsUwOBfCWwYHDt6I0hB7BZMVGqS9evAffDV+wJBxMXkzeiHbjAPXHXXpZuZucOOJJW /E7P79uVv4/loA==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q13ea-0003HW-37; Mon, 22 May 2023 07:24:40 -0400 Date: Mon, 22 May 2023 14:25:02 +0300 Message-Id: <83zg5wpq0h.fsf@gnu.org> From: Eli Zaretskii To: Robert Pluim , Philip Kaludercic , Stefan Monnier In-Reply-To: <871qj8lp8u.fsf@gmail.com> (message from Robert Pluim on Mon, 22 May 2023 10:55:13 +0200) Subject: Re: bug#63625: 29.0.90; package-install inserts package directory into load-path twice. References: <4ACD9E26-B5A6-412E-8DFC-C09C05A4EACD@mac.com> <871qj8lp8u.fsf@gmail.com> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 63625 Cc: 63625@debbugs.gnu.org, toddasmith@mac.com 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: -3.3 (---) > Cc: todd smith > From: Robert Pluim > Date: Mon, 22 May 2023 10:55:13 +0200 > > 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)) Thanks. Philip, Stefan: any comments or suggestions? From debbugs-submit-bounces@debbugs.gnu.org Mon May 22 08:46:54 2023 Received: (at 63625) by debbugs.gnu.org; 22 May 2023 12:46:54 +0000 Received: from localhost ([127.0.0.1]:33887 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q14w6-0007gY-Mk for submit@debbugs.gnu.org; Mon, 22 May 2023 08:46:54 -0400 Received: from mail-wm1-f49.google.com ([209.85.128.49]:55604) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q14w0-0007gH-NK for 63625@debbugs.gnu.org; Mon, 22 May 2023 08:46:49 -0400 Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-3f607839b89so4628705e9.3 for <63625@debbugs.gnu.org>; Mon, 22 May 2023 05:46:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684759599; x=1687351599; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=aimc18ggE6oBVMqRsYf/raJR1PieUP+936bVy7eDvy0=; b=r1T0IUb7OUjENtC2mi8N9R7RXRXWnbiWOhy1JVPxpHrkM8gy1Ksycs5rcoFP8/OhCg T0iRSEEZlSAw3zw2yJcWF3mqAhh0dS7INBBsqJcJ8gn7O6KvJZm3QsX79l4FE4Vsj8xE SV2yjLj9GJFXtGH2aF8IxMEbVB7Ny/EshGKeu8P20FBEBPEuJRKruqJtG8Z8q452a6vj 4ebZgJfqFip9f0jVQKx+mg6FXe6CS+0bRrU5Sb61TP4YJo6gMHaj4ASy4aIRYIy99H5a Sil+kPQKtmWVpc5nMJBitQAlBW0smmrsGYRUwlIF6WwdEoENV3GM2fSN4Qw8w4D+koGY 7/Zw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684759599; x=1687351599; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=aimc18ggE6oBVMqRsYf/raJR1PieUP+936bVy7eDvy0=; b=GeWA87mJ8m0umr7KYL7HT1zClngJjjkl0XJLVm1ou5pElM95US9eO/+PSqnfNaI+kZ ec4GISer8oyZSwDP2Zv38jap5tCkmqgYFk+T1KjFhyXqzmwZX7LJXpjziRLrEvp8Y8CZ yKuODkibfDreUIRJS22u0hvgtCKmIsFwfLTnIc9X7OHCq5PuAPYLO6j9qEdp3JEQb1YL O+1zwrFGVpPej41z5tr201k64llQXdwcdvgNur7XLhHp4Q0TkKeepSNSeoljg9dx3GgN 3xUVKLyELeidNDRL84veDF+TsryBdnak5jBBLqOR9m06gs8rwRlNYPiAgNhH97164Q58 Ogzw== X-Gm-Message-State: AC+VfDx1mCylzVreSH+BLtgMOXxSekwEh9s7D59b1C/YhvF7QFw6Yn+2 X5IhgSZXH7K4uFs/P8orYNg= X-Google-Smtp-Source: ACHHUZ4z/HbVMShREtBowBBeHMdde3dhRC/KFmrXC+w97pq4rAJzMaTl0zd+0sjxTo3K1sK/adRr0w== X-Received: by 2002:a1c:c911:0:b0:3f5:772:f333 with SMTP id f17-20020a1cc911000000b003f50772f333mr6655400wmb.4.1684759598685; Mon, 22 May 2023 05:46:38 -0700 (PDT) Received: from rltb ([82.66.8.55]) by smtp.gmail.com with ESMTPSA id q1-20020a7bce81000000b003f4248dcfcbsm11534284wmj.30.2023.05.22.05.46.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 May 2023 05:46:38 -0700 (PDT) From: Robert Pluim To: Eli Zaretskii Subject: Re: bug#63625: 29.0.90; package-install inserts package directory into load-path twice. In-Reply-To: <83zg5wpq0h.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 22 May 2023 14:25:02 +0300") References: <4ACD9E26-B5A6-412E-8DFC-C09C05A4EACD@mac.com> <871qj8lp8u.fsf@gmail.com> <83zg5wpq0h.fsf@gnu.org> Date: Mon, 22 May 2023 14:46:37 +0200 Message-ID: <87o7mcjzyq.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 63625 Cc: Philip Kaludercic , toddasmith@mac.com, Stefan Monnier , 63625@debbugs.gnu.org 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: -1.0 (-) >>>>> On Mon, 22 May 2023 14:25:02 +0300, Eli Zaretskii said: >> Cc: todd smith >> From: Robert Pluim >> Date: Mon, 22 May 2023 10:55:13 +0200 >>=20 >> This is because we didn=CA=BCt respect DRY. package.el should use the >> package support of `loaddefs-generate', but that doesn=CA=BCt expose= the >> requisite feature of `loaddefs-generate--rubric' (maybe on master it= does). >>=20 >> 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)) Eli> Thanks. Eli> Philip, Stefan: any comments or suggestions? Two other things: 1. Can `load-file-name' ever be nil here? 2. Should we just use $# instead of `load-file-name=CA=BC'? (I also have a sneaking suspicion that this adding to `load-path' is being done twice, but I=CA=BCll look at that when this issue is fixed) Robert --=20 From debbugs-submit-bounces@debbugs.gnu.org Mon May 22 09:18:28 2023 Received: (at 63625) by debbugs.gnu.org; 22 May 2023 13:18:28 +0000 Received: from localhost ([127.0.0.1]:34045 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q15Qi-0000Kc-9E for submit@debbugs.gnu.org; Mon, 22 May 2023 09:18:28 -0400 Received: from mout02.posteo.de ([185.67.36.66]:47193) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q15Qe-0000KO-Uf for 63625@debbugs.gnu.org; Mon, 22 May 2023 09:18:26 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id C1C54240104 for <63625@debbugs.gnu.org>; Mon, 22 May 2023 15:18:18 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1684761498; bh=zYHq2+WZQhp+1iMYCmXLYEGE01uJv70D2yu4eQINJEY=; h=From:To:Cc:Subject:Autocrypt:Date:Message-ID:MIME-Version: Content-Transfer-Encoding:From; b=iWyhfBWtzr6uEMT9T3ItWr4Y0SSjJoGiI+OdM2ATgdMLkt6Jv2/YmUSeGJFK6rWJu bT1iLZRiS24NFJwxX4qJ1ZDP4Wi5dZx4p7RiFmucIBHMe7hvcxBUStRWgKLjb7SvqP 8bcNJjXPyFiksUQdDIHMmniL7FMp4R0ePaMzBwCryyim+WTp8EQUS7fY47r1yNtk/l zbz2FXVBNvSOJ9dywiEsbybQ2jLepdROpF63hb37dr36PPacLP1kMdJD1vTcDlP4o9 /Le9EA5YImXZ0AH1gNDfzsU/CIgS/fsFyelBlk9MVE/Mel/N45KlogdAvEHdee02XH ZOFJPzwzcCt0w== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4QPygY5Ks3z6trm; Mon, 22 May 2023 15:18:17 +0200 (CEST) From: Philip Kaludercic To: Eli Zaretskii Subject: Re: bug#63625: 29.0.90; package-install inserts package directory into load-path twice. In-Reply-To: <83zg5wpq0h.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 22 May 2023 14:25:02 +0300") References: <4ACD9E26-B5A6-412E-8DFC-C09C05A4EACD@mac.com> <871qj8lp8u.fsf@gmail.com> <83zg5wpq0h.fsf@gnu.org> Autocrypt: addr=philipk@posteo.net; keydata= mDMEZBBQQhYJKwYBBAHaRw8BAQdAHJuofBrfqFh12uQu0Yi7mrl525F28eTmwUDflFNmdui0QlBo aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0 ZW8ubmV0PoiWBBMWCAA+FiEEDg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwMFCQHhM4AFCwkI BwIGFQoJCAsCBBYCAwECHgECF4AACgkQ8xYDWXahwulikAEA77hloUiSrXgFkUVJhlKBpLCHUjA0 mWZ9j9w5d08+jVwBAK6c4iGP7j+/PhbkxaEKa4V3MzIl7zJkcNNjHCXmvFcEuDgEZBBQQhIKKwYB BAGXVQEFAQEHQI5NLiLRjZy3OfSt1dhCmFyn+fN/QKELUYQetiaoe+MMAwEIB4h+BBgWCAAmFiEE Dg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwwFCQHhM4AACgkQ8xYDWXahwukm+wEA8cml4JpK NeAu65rg+auKrPOP6TP/4YWRCTIvuYDm0joBALw98AMz7/qMHvSCeU/hw9PL6u6R2EScxtpKnWof z4oM Date: Mon, 22 May 2023 13:18:17 +0000 Message-ID: <87jzx0bj3a.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 63625 Cc: Robert Pluim , toddasmith@mac.com, Stefan Monnier , 63625@debbugs.gnu.org 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: -3.3 (---) Eli Zaretskii writes: >> Cc: todd smith >> From: Robert Pluim >> Date: Mon, 22 May 2023 10:55:13 +0200 >>=20 >> This is because we didn=CA=BCt respect DRY. package.el should use the >> package support of `loaddefs-generate', but that doesn=CA=BCt expose the >> requisite feature of `loaddefs-generate--rubric' (maybe on master it doe= s). >>=20 >> 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)) > > Thanks. > > Philip, Stefan: any comments or suggestions? This looks like the adequate change to me. From debbugs-submit-bounces@debbugs.gnu.org Mon May 22 09:54:38 2023 Received: (at 63625) by debbugs.gnu.org; 22 May 2023 13:54:38 +0000 Received: from localhost ([127.0.0.1]:34210 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q15zh-0001Nv-Vv for submit@debbugs.gnu.org; Mon, 22 May 2023 09:54:38 -0400 Received: from mail-wr1-f50.google.com ([209.85.221.50]:50230) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q15zf-0001Nc-OK for 63625@debbugs.gnu.org; Mon, 22 May 2023 09:54:36 -0400 Received: by mail-wr1-f50.google.com with SMTP id ffacd0b85a97d-30789a4c537so3997156f8f.0 for <63625@debbugs.gnu.org>; Mon, 22 May 2023 06:54:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684763670; x=1687355670; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=tAC0lNLpN5S0vNR3nCjw23rRlHu83rODiArhwgU6jqc=; b=sEkaRic1VbWeX2gluUfS0BbfSJKrremPjTXX+2wsq7oQ9hTR+8j1c/99Dpo0DwldYE E1YBm/GJlw11UTdqs+LlsFJ/XHL73PvGxeLSnY2pm7ZNif87nl6FipBppPHr/UC/lieG Hz5v3ZCShiWCFwDh0lbUmb7Xhx4If2tjfMYL1w2JRw/V79Jhpwk0Y5OUQQye733Ejr6l QgHT3ibF/epQfn2CW19jhcFCHg+JW+sEVDNIhgaxLJ4yGrZ3q3YzH43IfAud2qHHlcgN S912g+L4q+LGQWwxo9BTW/MZfNwD6oWBusuLBb3Gr8W/5P9X7+OKluwBqC+VsD+pMapU kX0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684763670; x=1687355670; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=tAC0lNLpN5S0vNR3nCjw23rRlHu83rODiArhwgU6jqc=; b=QIDb6uMlKdPQ7avV8iuYhOE6XOPDfSYlwHOrs8OHV30D7L5ekMfJq14IwRUzuoI9bF D/6a2LB1tMOODD/wfbpvtRiE++RXvAnVRECfV3r/YCQdsj+xjMRs2IMwDOT5fLQdKz0L bKGcheonuDAJ+VgZjwsCxjYrSWC4tezYo2mi9IHKRYGC6gpcqpwDCaz4PbNEdsOb492K miD6DVSQoOetWHzJQrnnFcLn1rWQlr3yQZWFu9jf+tf9vuG8Kh7gE8aTXC3/Wd4mCCyN xHl45LvR+bTyTJcuWW8MJPsDcXuhsl/w7UjrNYIIEk79eJSFQ+72B5HT4tZ2IcUKUXeE UNVw== X-Gm-Message-State: AC+VfDwr5DVR+V/IHDKAn9fx3sAGeURuhDgq5J1e12z6voHUP6Tc2Z9X y5OoYA+4jcTyvbjDuvi8d3o= X-Google-Smtp-Source: ACHHUZ73lSL4fDCdKbImBdgxssr+ogY12Q/+2dEhOAv6PMYP800MglHR3DuU+CgTB4txczu9//Oj/w== X-Received: by 2002:adf:e88a:0:b0:306:368d:8a1c with SMTP id d10-20020adfe88a000000b00306368d8a1cmr7552424wrm.45.1684763669791; Mon, 22 May 2023 06:54:29 -0700 (PDT) Received: from rltb ([82.66.8.55]) by smtp.gmail.com with ESMTPSA id a9-20020a5d5709000000b0030922ba6d0csm7725661wrv.45.2023.05.22.06.54.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 May 2023 06:54:29 -0700 (PDT) From: Robert Pluim To: Philip Kaludercic Subject: Re: bug#63625: 29.0.90; package-install inserts package directory into load-path twice. In-Reply-To: <87jzx0bj3a.fsf@posteo.net> (Philip Kaludercic's message of "Mon, 22 May 2023 13:18:17 +0000") References: <4ACD9E26-B5A6-412E-8DFC-C09C05A4EACD@mac.com> <871qj8lp8u.fsf@gmail.com> <83zg5wpq0h.fsf@gnu.org> <87jzx0bj3a.fsf@posteo.net> Date: Mon, 22 May 2023 15:54:28 +0200 Message-ID: <87fs7ojwtn.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 63625 Cc: Eli Zaretskii , toddasmith@mac.com, Stefan Monnier , 63625@debbugs.gnu.org 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: -1.0 (-) >>>>> On Mon, 22 May 2023 13:18:17 +0000, Philip Kaludercic said: >>=20 >> Thanks. >>=20 >> Philip, Stefan: any comments or suggestions? Philip> This looks like the adequate change to me. I was hoping for 'correct' or 'minimal', but I=CA=BCll take 'adequate' =F0= =9F=98=84 Robert --=20 From debbugs-submit-bounces@debbugs.gnu.org Mon May 22 09:58:46 2023 Received: (at 63625) by debbugs.gnu.org; 22 May 2023 13:58:46 +0000 Received: from localhost ([127.0.0.1]:35358 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q163h-0001ph-KZ for submit@debbugs.gnu.org; Mon, 22 May 2023 09:58:46 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:34320) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q163f-0001pS-L0 for 63625@debbugs.gnu.org; Mon, 22 May 2023 09:58:44 -0400 Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 791634411BF; Mon, 22 May 2023 09:58:37 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id B16284411C6; Mon, 22 May 2023 09:58:35 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1684763915; bh=RdYc0tfH6Qgo1OtyLIg/yeaAhcH/0ByZzp9/OWUEG7M=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=ey3byugKViHYADUXWC3U4G+Xgc98BOri13u/pB/3ZbSKASoIYrAmbKU1BgBCVszQn fMJFZox3WTXNqtxY+YepZqXoe3m6XNqZI+SWS/0JuF++ZEdbr0GiT0BFa0bz/D9vBV 0hTao8uTF3+ePThQd7TXapZaYcWFZSDbr7QevnHGOl3vTuCEKucypXRyn9ZrfQBIeH J5ia8TX+YL2ukJDhsp5GnXEHzQAcA7xtD4rdJ3J2PEk5kG7Bt4Y8bmaFVA3RQ6tWAH 3zJMnGrcz7k8cwJV0rTog0C+gVPFUs1Rs+v5UnBB4S1A20TgHc2Yo6FQ/NZPtU05IZ pFFjz4wBA9bCg== Received: from pastel (unknown [45.72.217.176]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 76BCD1203DF; Mon, 22 May 2023 09:58:35 -0400 (EDT) From: Stefan Monnier To: Robert Pluim Subject: Re: bug#63625: 29.0.90; package-install inserts package directory into load-path twice. In-Reply-To: <871qj8lp8u.fsf@gmail.com> (Robert Pluim's message of "Mon, 22 May 2023 10:55:13 +0200") Message-ID: References: <4ACD9E26-B5A6-412E-8DFC-C09C05A4EACD@mac.com> <871qj8lp8u.fsf@gmail.com> Date: Mon, 22 May 2023 09:58:34 -0400 User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL 0.044 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from domain T_SCC_BODY_TEXT_LINE -0.01 - X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 63625 Cc: Philip Kaludercic , 63625@debbugs.gnu.org, todd smith 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: -3.3 (---) > This is because we didn=CA=BCt respect DRY. package.el should use the > package support of `loaddefs-generate', but that doesn=CA=BCt 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)))))) The (car load-path) is intended to return an element that causes `add-to-list` to do nothing, but your patch makes it go through `directory-file-name` which risks changing the string and thus causing the kind of duplicate we're trying to avoid. IOW, the `directory-file-name` should be directly around `file-name-directory` instead (tho I'm not 100% sure `file-name-directory` can never return nil here, so it might require an additional let binding and check). Admittedly, this exact problem was present before Philip's change (it was introduced by commit 4d3a595d8d3e in 2015) and is also present in `loaddefs-generate--rubric`. In any case, some autoloads file use a trailing / and others don't, depending on which version of Emacs has been used to generate it, so we need the patch below, I think (which also reverts to adding just `pkg-dir` since that's what we used to do in Emacs-28 and this is old compatibility code anyway). > 1. Can `load-file-name' ever be nil here? It's always a possibility (e.g. if you open the autoloads file and do `eval-buffer`), tho some older versions of Emacs didn't bother to check for it. Not sure it's important. > 2. Should we just use $# instead of `load-file-name=CA=BC'? We used to use $# but that interacts poorly with compilation. Until recently we never compiled autoloads files, but it's becoming much more common. Stefan diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 78017b77677..236a8e974e7 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -902,7 +902,12 @@ package-activate-1 (package--reload-previously-loaded pkg-desc)) (with-demoted-errors "Error loading autoloads: %s" (load (package--autoloads-file-name pkg-desc) nil t)) - (add-to-list 'load-path (directory-file-name pkg-dir))) + ;; FIXME: Since 2013 (commit 4fac34cee97a), the autoload files take + ;; care of changing the `load-path', so maybe it's time to + ;; remove this fallback code? + (unless (or (member (file-name-as-directory pkg-dir) load-path) + (member (directory-file-name pkg-dir) load-path)) + (add-to-list 'load-path pkg-dir))) ;; Add info node. (when (file-exists-p (expand-file-name "dir" pkg-dir)) ;; FIXME: not the friendliest, but simple. From debbugs-submit-bounces@debbugs.gnu.org Mon May 22 10:20:04 2023 Received: (at 63625) by debbugs.gnu.org; 22 May 2023 14:20:04 +0000 Received: from localhost ([127.0.0.1]:35474 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q16OI-0002Sn-I8 for submit@debbugs.gnu.org; Mon, 22 May 2023 10:20:04 -0400 Received: from mail-wm1-f49.google.com ([209.85.128.49]:57627) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q16OD-0002Ry-4v for 63625@debbugs.gnu.org; Mon, 22 May 2023 10:20:01 -0400 Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-3f606912ebaso8391835e9.3 for <63625@debbugs.gnu.org>; Mon, 22 May 2023 07:19:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684765191; x=1687357191; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=NpaMKGCUUYfs7ukAM6n9c00q07bSGjQmWH8kKzHNWIs=; b=AiTPbGNWb30kowewByH3czXBOH/6jDdfcM+ShhNV/NVNflmuWX6YF1ny6et3YAOatG xPrsNpxskYuk860HQq2w3Nuoe4LgGtaskAGOmIjs5N+0ulxydlVXWzBCeufhYaf/lJlL +Gpn9tqtV1cekgDOyUxvmIkU2nUI91fEKpYjWyXcqEer0WWOD+kodnnFyf2oVVFVXHlK ENequTdm7l/Rgz0/ApUSkNIfg94RrHThi45xqKE+RrQ+IGs5mWDDySDIochmWa7xP66x Awj0nHm4qu2fm7XKS/danxBWjXxB8/eF5CbIZFyfrXqpgjfxl6Byrsy/eAQNCvINv3Xa i5dg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684765191; x=1687357191; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=NpaMKGCUUYfs7ukAM6n9c00q07bSGjQmWH8kKzHNWIs=; b=VP9WWrLM+dh8rOwkv0Pzhb80DvD0xP3Rq57X7IbilMmr34CtHZ9wpX1bfe2aOzlCnZ kaUjEObNZFsNyzP+MmqaItp0EOOcComK5p96hk+htpic8MN05MxBkgM33wptvBLe7swW hKy1iT3EiSHClrPwHEK8P5mjXfsezJ0vM9CoGL37rDQzvlnEh2CjJedQOmwBYaj5Opff 9fH/1W34RZy7kMYdIChlr54HL+tznZakjK8qcUHFwI0T82p4RgSPp66NC+iBCS6y5EEU ku+lCV2XHC88Z1a7RHWqqekHrCR1mU+FxAAJ2DhCgy/jXATSfs3tidK3xoEQH/68pnh4 oaNw== X-Gm-Message-State: AC+VfDxtPmxZBBCaZHQ3uWrnr2/NmSS/0at/AvudSSY6RZRRBAAnOJvs a10p6yD575erzUW4vug3bGM= X-Google-Smtp-Source: ACHHUZ6f/I9MS/VJNGqFibgs1Y6EyVKNbB1PHUFLZUizWqjiqvmWaRaLT8l2Lm8HFjg1JLoYyPXkFw== X-Received: by 2002:a05:600c:ad0:b0:3f4:23df:c681 with SMTP id c16-20020a05600c0ad000b003f423dfc681mr7002850wmr.12.1684765191013; Mon, 22 May 2023 07:19:51 -0700 (PDT) Received: from rltb ([82.66.8.55]) by smtp.gmail.com with ESMTPSA id f12-20020a5d58ec000000b00309257ad16csm7873863wrd.29.2023.05.22.07.19.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 May 2023 07:19:50 -0700 (PDT) From: Robert Pluim To: Stefan Monnier Subject: Re: bug#63625: 29.0.90; package-install inserts package directory into load-path twice. In-Reply-To: (Stefan Monnier's message of "Mon, 22 May 2023 09:58:34 -0400") References: <4ACD9E26-B5A6-412E-8DFC-C09C05A4EACD@mac.com> <871qj8lp8u.fsf@gmail.com> Date: Mon, 22 May 2023 16:19:49 +0200 Message-ID: <87bkicjvne.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 63625 Cc: Philip Kaludercic , 63625@debbugs.gnu.org, todd smith 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: -1.0 (-) >>>>> On Mon, 22 May 2023 09:58:34 -0400, Stefan Monnier said: >> This is because we didn=CA=BCt respect DRY. package.el should use the >> package support of `loaddefs-generate', but that doesn=CA=BCt expose= the >> requisite feature of `loaddefs-generate--rubric' (maybe on master it= does). >>=20 >> 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)))))) Stefan> The (car load-path) is intended to return an element Stefan> that causes `add-to-list` to do nothing, but your patch makes i= t go Stefan> through `directory-file-name` which risks changing the string a= nd thus Stefan> causing the kind of duplicate we're trying to avoid. OK Stefan> IOW, the `directory-file-name` should be directly around Stefan> `file-name-directory` instead (tho I'm not 100% sure Stefan> `file-name-directory` can never return nil here, so it might re= quire an Stefan> additional let binding and check). Stefan> Admittedly, this exact problem was present before Philip's chan= ge Stefan> (it was introduced by commit 4d3a595d8d3e in 2015) and is also = present in Stefan> `loaddefs-generate--rubric`. Yes, `loaddefs-generate--rubric` needs fixing, but nothing currently calls that branch as far as I can tell. `file-name-directory' will return nil for names with no slashes in them, but I don=CA=BCt know if that=CA=BCs possible here. I *think* we can use `when-let*' here, since subr.el is preloaded. Stefan> In any case, some autoloads file use a trailing / and others do= n't, Stefan> depending on which version of Emacs has been used to generate i= t, so we Stefan> need the patch below, I think (which also reverts to adding jus= t `pkg-dir` Stefan> since that's what we used to do in Emacs-28 and this is old Stefan> compatibility code anyway). Ah, so that=CA=BCs where the duplication was coming from. Eli, do you want that on the release branch? >> 1. Can `load-file-name' ever be nil here? Stefan> It's always a possibility (e.g. if you open the autoloads file = and do Stefan> `eval-buffer`), tho some older versions of Emacs didn't bother = to check Stefan> for it. Not sure it's important. We=CA=BCre talking about emacs-29. I=CA=BCm not about to risk having `load-file-name=CA=BC be nil ';-) >> 2. Should we just use $# instead of `load-file-name=CA=BC'? Stefan> We used to use $# but that interacts poorly with compilation. Stefan> Until recently we never compiled autoloads files, but it's beco= ming much Stefan> more common. OK, so, `loaddefs-generate--rubric' is probably worth changing (on master) And here=CA=BCs another reason to avoid it: I typoed '#$' as '$#' :D Stefan> diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/packa= ge.el Stefan> index 78017b77677..236a8e974e7 100644 Stefan> --- a/lisp/emacs-lisp/package.el Stefan> +++ b/lisp/emacs-lisp/package.el Stefan> @@ -902,7 +902,12 @@ package-activate-1 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 autolo= ad files take Stefan> + ;; care of changing the `load-path', so maybe it's tim= e to Stefan> + ;; remove this fallback code? Stefan> + (unless (or (member (file-name-as-directory pkg-dir) l= oad-path) Stefan> + (member (directory-file-name pkg-dir) load= -path)) Stefan> + (add-to-list 'load-path pkg-dir))) Stefan> ;; Add info node. Stefan> (when (file-exists-p (expand-file-name "dir" pkg-dir)) Stefan> ;; FIXME: not the friendliest, but simple. Robert --=20 From debbugs-submit-bounces@debbugs.gnu.org Mon May 22 11:04:58 2023 Received: (at 63625) by debbugs.gnu.org; 22 May 2023 15:04:58 +0000 Received: from localhost ([127.0.0.1]:35801 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q175m-00049Q-3T for submit@debbugs.gnu.org; Mon, 22 May 2023 11:04:58 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:56152) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q175j-00049B-TH for 63625@debbugs.gnu.org; Mon, 22 May 2023 11:04:56 -0400 Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 4C25744120A; Mon, 22 May 2023 11:04:50 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 0687244124E; Mon, 22 May 2023 11:04:49 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1684767889; bh=7AFEfCHTiC0XqguxUxqjVJiYftfTeuatxAXJQTN3RHI=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=Qx7xjSqq33oXzb0hhsc8+RH1Tkd1sVy+1/bHcJOjHuGK5/3IUMhsdngM6vIpkX/4z 18VfD2auI1OuYRNgqZXyTYgOeWbfjRy6URvVZA3HQVH8ERQkQFAsm5CX6X2JC2YUPp 4Gm2GpXWqeXH6q/rt6w0DPD5ltnbOlKdMfeZk+lr+WNpWc5LG+uA23HmgkImEvS5jz 5J8I4MnVJNhb9y2VCbhGKMX1/RDkca1EE0YvP3VxCHosciJnx/1DhQylIjHhPOSyIJ uddY34rDMQpFU8PqdNRwNE85Dd4NKonrLfr5kH6g9oaCbpA0oaMWDRSjoqtW/si6RP Gn5PXAGjQKpAQ== Received: from pastel (unknown [45.72.217.176]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id BE1851202BB; Mon, 22 May 2023 11:04:48 -0400 (EDT) From: Stefan Monnier To: Robert Pluim Subject: Re: bug#63625: 29.0.90; package-install inserts package directory into load-path twice. In-Reply-To: <87bkicjvne.fsf@gmail.com> (Robert Pluim's message of "Mon, 22 May 2023 16:19:49 +0200") Message-ID: References: <4ACD9E26-B5A6-412E-8DFC-C09C05A4EACD@mac.com> <871qj8lp8u.fsf@gmail.com> <87bkicjvne.fsf@gmail.com> Date: Mon, 22 May 2023 11:04:46 -0400 User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL 0.043 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from domain T_SCC_BODY_TEXT_LINE -0.01 - X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 63625 Cc: Philip Kaludercic , 63625@debbugs.gnu.org, todd smith 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: -3.3 (---) > `file-name-directory' will return nil for names with no slashes in > them, but I don=CA=BCt know if that=CA=BCs 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 auto= load files take > Stefan> + ;; care of changing the `load-path', so maybe it's t= ime 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) lo= ad-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 From debbugs-submit-bounces@debbugs.gnu.org Mon May 22 11:36:19 2023 Received: (at 63625) by debbugs.gnu.org; 22 May 2023 15:36:19 +0000 Received: from localhost ([127.0.0.1]:35969 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q17a6-00051y-Rz for submit@debbugs.gnu.org; Mon, 22 May 2023 11:36:19 -0400 Received: from mail-wm1-f44.google.com ([209.85.128.44]:47176) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q17a4-00051k-MM for 63625@debbugs.gnu.org; Mon, 22 May 2023 11:36:17 -0400 Received: by mail-wm1-f44.google.com with SMTP id 5b1f17b1804b1-3f606a89795so8993225e9.2 for <63625@debbugs.gnu.org>; Mon, 22 May 2023 08:36:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684769771; x=1687361771; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=ULU4u6uuvBHr3Gz80qcmMw+MvA/QkpJdBeCjgvsUO8Y=; b=Kx7rH+3CDO2StDGyPLZ7n9xgFiD01s60lAV7bFE0K4wGq1D9DmFi3KrtX6HCyuuEs1 Jil9XzxibcmVm5seNfxgyUpR4C8yFijQrRiNhcbeDlDwd4z7/GMuZl1LbMB0mABQTiQD GnsfwP0KN5BaceuhnE56Nw8KFb8cE5sdhT0qt7E7CGkJQMlPRLouOyaPP0HKpVmxCkli PKDnPlss/DDIRZ1GsXDVEihOV7jTAdMCjJTnXgBhNPb4OanrB5Fi+G3bzqC8C6BAiB/8 mZ+w+gpyP3OaHlEeKgyyiUexVAMFpzwBCgrgc1/vprsTHss6mFtIL1f71XIUSG/n0IOW 67UA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684769771; x=1687361771; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ULU4u6uuvBHr3Gz80qcmMw+MvA/QkpJdBeCjgvsUO8Y=; b=fySJwzWfzuUyHWI3iTjOFsBfpxgXdvxurv97/gOy1GF+kadbrp+MEj+NGcgtOCOPvd fsNuGzr87qbnl+LYrRWKOhJY0zWFZngzc+jkeCyfFQDkB2D8FQ8qSK1uiEEaPFox4j7L UYOepsMCYcY3uPCO1ZAu8u2Gs7qTpwZsO1qTV2ECgYDsfD329mIP+CA56zZ9y9CwZ3aJ 7psz9s8jpxJ908AHaZsn5arjh30+1LDcolMLd4LgCLhmkMOjwJHoKmNSoybVXVL0ssny /SVsrzXgtd2RukieKQl5gCILU9+UwRD245BvnMYzZF5tjNkgj/s+JG8Fs959/0L1+2Lv vcig== X-Gm-Message-State: AC+VfDwKFy4CFV+zYY834euL+qPpTS6AMqvtDNg9vZixCUmOxe47yDAZ Y4MvgMDdYe9Ahi0eRKSRqOo= X-Google-Smtp-Source: ACHHUZ5lhGDIGTA4NVvMa6pUu9Ej0FilUYtN5zo/+4EO2J9m9JF2lHKtXTrRCZhCRWZz+u35MaEbxg== X-Received: by 2002:a7b:cc15:0:b0:3f4:20ec:7601 with SMTP id f21-20020a7bcc15000000b003f420ec7601mr8249118wmh.34.1684769770603; Mon, 22 May 2023 08:36:10 -0700 (PDT) Received: from rltb ([82.66.8.55]) by smtp.gmail.com with ESMTPSA id n16-20020a1c7210000000b003f6042d6d92sm4099020wmc.46.2023.05.22.08.36.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 May 2023 08:36:09 -0700 (PDT) From: Robert Pluim To: Stefan Monnier Subject: Re: bug#63625: 29.0.90; package-install inserts package directory into load-path twice. In-Reply-To: (Stefan Monnier via's message of "Mon, 22 May 2023 11:04:46 -0400") References: <4ACD9E26-B5A6-412E-8DFC-C09C05A4EACD@mac.com> <871qj8lp8u.fsf@gmail.com> <87bkicjvne.fsf@gmail.com> Date: Mon, 22 May 2023 17:36:09 +0200 Message-ID: <877ct0js46.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 63625 Cc: Philip Kaludercic , 63625@debbugs.gnu.org, todd smith 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: -1.0 (-) >>>>> On Mon, 22 May 2023 11:04:46 -0400, Stefan Monnier via "Bug reports f= or GNU Emacs, the Swiss army knife of text editors" = said: >> `file-name-directory' will return nil for names with no slashes in >> them, but I don=CA=BCt know if that=CA=BCs possible here. Stefan> I think `load-file-name` is always absolute, so I think we shou= ld 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 generat= ed 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 autolo= ad files take Stefan> + ;; care of changing the `load-path', so maybe it's tim= e to Stefan> + ;; remove this fallback code? Stefan> + (unless (or (member (file-name-as-directory pkg-dir) l= oad-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 al= together Stefan> on `master`? That seems reasonable. Eli? Robert --=20 From debbugs-submit-bounces@debbugs.gnu.org Mon May 22 11:48:51 2023 Received: (at 63625) by debbugs.gnu.org; 22 May 2023 15:48:51 +0000 Received: from localhost ([127.0.0.1]:36001 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q17mF-0005Q1-Cd for submit@debbugs.gnu.org; Mon, 22 May 2023 11:48:51 -0400 Received: from eggs.gnu.org ([209.51.188.92]:58312) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q17mC-0005Pp-M9 for 63625@debbugs.gnu.org; Mon, 22 May 2023 11:48:49 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q17m6-0004vV-Le; Mon, 22 May 2023 11:48:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=IoJOqAaPpkrW/fp2lPe00xcDh9bGyEX1y+byITBLfBw=; b=jhdLlXVyydgZralZRoax tKyz5llogNgfmYeKFQ/nlqtEOqeWtdAFKxAB5QWhw4LObkpdFwzze6UiPXnadP4qSwAnubBpGHEU4 u5KPFHlwcjYjmWt0rSVauKOhLXBr1PJhKlVEqidZ3gK1jLqGm7f87oimZD7CUrXAgbm4ghEGtHwnO 4qqL3OnPV2/hLdEwtpH3RIHVdAgylCLisa5F8UQ9k/BLGVE8grEijM0yIy6loloFY6Fw9klM8DNnu VgD8dxglmhOf+FefCUTCZZzDY0S7EDPMpt2pwFtFbcKT4SEd44mZYsvVZVpJBpYD2gUFLEvbaPClx yFTMJty81L9xtg==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q17m6-00032N-5h; Mon, 22 May 2023 11:48:42 -0400 Date: Mon, 22 May 2023 18:49:03 +0300 Message-Id: <83r0r8pdsg.fsf@gnu.org> From: Eli Zaretskii To: Robert Pluim In-Reply-To: <87bkicjvne.fsf@gmail.com> (message from Robert Pluim on Mon, 22 May 2023 16:19:49 +0200) Subject: Re: bug#63625: 29.0.90; package-install inserts package directory into load-path twice. References: <4ACD9E26-B5A6-412E-8DFC-C09C05A4EACD@mac.com> <871qj8lp8u.fsf@gmail.com> <87bkicjvne.fsf@gmail.com> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 63625 Cc: philipk@posteo.net, toddasmith@mac.com, monnier@iro.umontreal.ca, 63625@debbugs.gnu.org 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: -3.3 (---) > Cc: Philip Kaludercic , 63625@debbugs.gnu.org, > todd smith > From: Robert Pluim > Date: Mon, 22 May 2023 16:19:49 +0200 > > Stefan> In any case, some autoloads file use a trailing / and others don't, > Stefan> depending on which version of Emacs has been used to generate it, so we > Stefan> need the patch below, I think (which also reverts to adding just `pkg-dir` > Stefan> since that's what we used to do in Emacs-28 and this is old > Stefan> compatibility code anyway). > > Ah, so thatʼs where the duplication was coming from. Eli, do you want > that on the release branch? The issue at hand must be fixed on the emacs-29 branch, but I'm not sure I understand what you mean by "that" here. From debbugs-submit-bounces@debbugs.gnu.org Mon May 22 11:53:33 2023 Received: (at 63625) by debbugs.gnu.org; 22 May 2023 15:53:34 +0000 Received: from localhost ([127.0.0.1]:36018 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q17qn-0005ca-EL for submit@debbugs.gnu.org; Mon, 22 May 2023 11:53:33 -0400 Received: from eggs.gnu.org ([209.51.188.92]:59314) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q17ql-0005c6-51 for 63625@debbugs.gnu.org; Mon, 22 May 2023 11:53:31 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q17qf-0005vQ-78; Mon, 22 May 2023 11:53:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=+X0+dDGNMznVErq/lf3EdKROYkSO91phqNoz5EgN/u0=; b=VEG/ZSpc4tI+ +53yH6LZajoeyhG7GX3yFA5ZRn3SDNjrEzLqx9Ufu3njB4txuAm1rj3s1sSUgNSpmu61wXeTVqrKY srK336qupc93yXlSRv2keizUoSjEOCsSEH3szvKSkVvY8uW34ESqfAYwsyD4RMj1hrUk3lpDCLFRY u5GuweCsxEmK8wGy/cwVe3e3QVE9upYC8mYDcFVkKmHB0yvr1kge/sBR/JcnHQVw7poZrUgZRhUZj BEfkZBxNfR6wM5gMuhLG4X78CWnD1Imtahk3Vs9BfwwIc0htlA3QuiyvdzrLysT/Ae2VCUXJEUlMI htjC6ioFHTorTKBgP3bvpA==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q17qe-0003aD-M4; Mon, 22 May 2023 11:53:24 -0400 Date: Mon, 22 May 2023 18:53:47 +0300 Message-Id: <83o7mcpdkk.fsf@gnu.org> From: Eli Zaretskii To: Robert Pluim In-Reply-To: <877ct0js46.fsf@gmail.com> (message from Robert Pluim on Mon, 22 May 2023 17:36:09 +0200) Subject: Re: bug#63625: 29.0.90; package-install inserts package directory into load-path twice. References: <4ACD9E26-B5A6-412E-8DFC-C09C05A4EACD@mac.com> <871qj8lp8u.fsf@gmail.com> <87bkicjvne.fsf@gmail.com> <877ct0js46.fsf@gmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 63625 Cc: philipk@posteo.net, toddasmith@mac.com, monnier@iro.umontreal.ca, 63625@debbugs.gnu.org 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: -3.3 (---) > Cc: Philip Kaludercic , 63625@debbugs.gnu.org, > todd smith > From: Robert Pluim > Date: Mon, 22 May 2023 17:36:09 +0200 > > 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? I'm a bit confused by "that patch" and stuff, and would prefer to see the patch for emacs-29 and another for master, please. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Mon May 22 12:57:26 2023 Received: (at 63625) by debbugs.gnu.org; 22 May 2023 16:57:26 +0000 Received: from localhost ([127.0.0.1]:36123 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q18qb-0001bG-Da for submit@debbugs.gnu.org; Mon, 22 May 2023 12:57:25 -0400 Received: from mail-wr1-f43.google.com ([209.85.221.43]:51227) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q18qY-0001an-C8 for 63625@debbugs.gnu.org; Mon, 22 May 2023 12:57:23 -0400 Received: by mail-wr1-f43.google.com with SMTP id ffacd0b85a97d-3095b1b6e02so2091807f8f.2 for <63625@debbugs.gnu.org>; Mon, 22 May 2023 09:57:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684774635; x=1687366635; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=xe3BtlLNEyTEO/kUgt1WIqmlgKXzGXpjWK5O2TgnG4E=; b=Ncg5h4VlGVcre7cHMtdnZp6MYl/bNielieD5u+S6+tbu4E5TS4WiVFW8vNo55ebbFF XH+55LjsGN6Ta7kazhWlddREc7hv75pbaS4Jo4LUjXaWvi0bDJPxDnnpc8my5YemWPU7 e0O2tiR6dGKLBauTRk+7KzOKbGhBxavrAJE5Ozqp3goSoLX1s3RSdkjU/J/WSSc6G3a7 sNftOoOJLzfwPjmr/iHTA8c+0KvOSg/a9bcw6Sid1S8JSo4+hyeqYobsxmuMSE22fbyG Sbg+3RLGomT0koS10aKcH/na34DvC6f3JOxQZE3G1AQQdbPYhxa3qRr/wbv6OFy7N6+B Clwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684774635; x=1687366635; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=xe3BtlLNEyTEO/kUgt1WIqmlgKXzGXpjWK5O2TgnG4E=; b=VdfSYeltJvVRtuYoNBpAQCOiaGagsgbGrRUMM7JU5YKedDQarzr3PXbUUXCsLZJ6wg teAJg2wtbrDekhQctLwyYVmsAL2YYo5E9cu25LXctckvuoJVamTEbfYIPd1mLF3hX0W4 HPC6KO2IbZ5DOOCWykMA5XipdOblVcCzgZnIxjaVCFtma1An5yVNoMwSos2I8/Qu+lRC UYy+nPeVKUOP/xnrSkTNJw5mpeEicrmsQvgWKO52EKIRY2UaVwfLLguXPOxAN437yAVI lVlITpQUMqOn00IhREXsCTJEdOfmJLyJAuCwsNoSsUEz+Xx+HYFoewQIhgk+lVfzIpo4 SY4A== X-Gm-Message-State: AC+VfDzN4g4XoXx6U6Ft1HUX6PjNysfIq2xTa/89GbHxIB3jFgtUv8ia EgVoD5G/IroLhd6XdyhNWW4NhToFO7Y= X-Google-Smtp-Source: ACHHUZ4LyaE1qz38wFrVQRY/mC22PNuPes5gXoJ46T+DZCrZ4x31lSLX/mNszsCWBiYF3c2Iba7lRA== X-Received: by 2002:a5d:56d2:0:b0:2fe:c0ea:18b4 with SMTP id m18-20020a5d56d2000000b002fec0ea18b4mr8468205wrw.24.1684774635317; Mon, 22 May 2023 09:57:15 -0700 (PDT) Received: from rltb ([82.66.8.55]) by smtp.gmail.com with ESMTPSA id b10-20020adfde0a000000b003021288a56dsm8307460wrm.115.2023.05.22.09.57.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 May 2023 09:57:14 -0700 (PDT) From: Robert Pluim To: Eli Zaretskii Subject: Re: bug#63625: 29.0.90; package-install inserts package directory into load-path twice. In-Reply-To: <83o7mcpdkk.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 22 May 2023 18:53:47 +0300") References: <4ACD9E26-B5A6-412E-8DFC-C09C05A4EACD@mac.com> <871qj8lp8u.fsf@gmail.com> <87bkicjvne.fsf@gmail.com> <877ct0js46.fsf@gmail.com> <83o7mcpdkk.fsf@gnu.org> Date: Mon, 22 May 2023 18:57:13 +0200 Message-ID: <87353ojod2.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 63625 Cc: philipk@posteo.net, 63625@debbugs.gnu.org, monnier@iro.umontreal.ca, toddasmith@mac.com 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: -1.0 (-) --=-=-= Content-Type: text/plain >>>>> On Mon, 22 May 2023 18:53:47 +0300, Eli Zaretskii said: >> Cc: Philip Kaludercic , 63625@debbugs.gnu.org, >> todd smith >> From: Robert Pluim >> Date: Mon, 22 May 2023 17:36:09 +0200 >> 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? Eli> I'm a bit confused by "that patch" and stuff, and would prefer to see Eli> the patch for emacs-29 and another for master, please. 3 patches, 2 for emacs-29 below. The 3rd one for master is just diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 2892728ebd9..28bac0401ed 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -902,7 +902,6 @@ package-activate-1 (package--reload-previously-loaded pkg-desc)) (with-demoted-errors "Error loading autoloads: %s" (load (package--autoloads-file-name pkg-desc) nil t)) - (add-to-list 'load-path (directory-file-name pkg-dir))) ;; Add info node. (when (file-exists-p (expand-file-name "dir" pkg-dir)) ;; FIXME: not the friendliest, but simple. Robert -- --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-Avoid-duplicate-load-path-entry-when-generating-pack.patch >From 713da42a9c4569093368dcc41f606fb460fcd0e1 Mon Sep 17 00:00:00 2001 From: Robert Pluim Date: Mon, 22 May 2023 15:44:21 +0200 Subject: [PATCH 1/2] Avoid duplicate load-path entry when generating package autoloads To: emacs-devel@gnu.org 'file-name-directory' produces a path ending in '/', so that needs to be run through 'directory-file-name' to avoid duplicate entries in 'load-path'. (Bug#63625) * lisp/emacs-lisp/package.el (package-generate-autoloads): Call 'directory-file-name' on the directory of 'load-file-name'. --- lisp/emacs-lisp/package.el | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index c684840ab7e..3d3da7909d7 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -1110,8 +1110,12 @@ 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. - (or (and load-file-name (file-name-directory load-file-name)) - (car load-path))))) + ;; `loaddefs-generate' has code to do this for us, but it's + ;; not currently exposed. (Bug#63625) + (or (and load-file-name + (directory-file-name + (file-name-directory load-file-name))) + (car load-path))))) (let ((buf (find-buffer-visiting output-file))) (when buf (kill-buffer buf))) auto-name)) -- 2.38.1.420.g319605f8f0 --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0002-Avoid-duplicates-when-adding-package-dirs-to-load-pa.patch >From 983ed8b5d1f30e58be5d2e165cefefc8c70ae2f9 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 22 May 2023 18:49:26 +0200 Subject: [PATCH 2/2] Avoid duplicates when adding package dirs to load-path To: emacs-devel@gnu.org * lisp/emacs-lisp/package.el (package-activate-1): Check if the path we're about to add is already in 'load-path', since package autoload files have been updating 'load-path' for a decade. Do not merge to master, we're going to delete this code there. --- lisp/emacs-lisp/package.el | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 3d3da7909d7..4665ef0aa8e 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -904,7 +904,12 @@ package-activate-1 (package--reload-previously-loaded pkg-desc)) (with-demoted-errors "Error loading autoloads: %s" (load (package--autoloads-file-name pkg-desc) nil t)) - (add-to-list 'load-path (directory-file-name pkg-dir))) + ;; FIXME: Since 2013 (commit 4fac34cee97a), the autoload files take + ;; care of changing the `load-path', so maybe it's time to + ;; remove this fallback code? + (unless (or (member (file-name-as-directory pkg-dir) load-path) + (member (directory-file-name pkg-dir) load-path)) + (add-to-list 'load-path pkg-dir))) ;; Add info node. (when (file-exists-p (expand-file-name "dir" pkg-dir)) ;; FIXME: not the friendliest, but simple. -- 2.38.1.420.g319605f8f0 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Tue May 23 08:05:47 2023 Received: (at 63625) by debbugs.gnu.org; 23 May 2023 12:05:47 +0000 Received: from localhost ([127.0.0.1]:38456 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q1Qlv-000294-0G for submit@debbugs.gnu.org; Tue, 23 May 2023 08:05:47 -0400 Received: from eggs.gnu.org ([209.51.188.92]:36320) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q1Qlr-00028q-JJ for 63625@debbugs.gnu.org; Tue, 23 May 2023 08:05:45 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q1Qll-0000US-1o; Tue, 23 May 2023 08:05:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=krxFtWiRzYbR8S4GpJhHFLYoIun+UBbRXAoqMamVd2Q=; b=cbCGv/qetDMF ItslDBK1qw94JPuvnzoLffNw3/941yNTRPcBB6dZy/sjqigrU11YyKfbn253skNxyiRuoRxH+XjpX 96rxz/e1lH+jj7sx+0gACQqzvnukuEIYPG1Jpry0EI3BLOVlDhtuNHijrFmrf4A4kyJ3nyZ9+gKvq kVx2lv+Gnf2MLIP3hgXfOfAeuzSgYtDqkdV4uZVuE3mBUnM9YWYpFJoSBjCvO95wfzOZP2Th6ORtw zfVFu7x861Ty3IXljMxk+BnkhGN+RVI59kysKh7kHGA/4xmuiB4VUBrPby30pURxQD27MqmXR77f5 dExml+CT80y52PDrPUsMbg==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q1Qlk-0006Fh-Gw; Tue, 23 May 2023 08:05:36 -0400 Date: Tue, 23 May 2023 15:06:00 +0300 Message-Id: <834jo3p80n.fsf@gnu.org> From: Eli Zaretskii To: Robert Pluim In-Reply-To: <87353ojod2.fsf@gmail.com> (message from Robert Pluim on Mon, 22 May 2023 18:57:13 +0200) Subject: Re: bug#63625: 29.0.90; package-install inserts package directory into load-path twice. References: <4ACD9E26-B5A6-412E-8DFC-C09C05A4EACD@mac.com> <871qj8lp8u.fsf@gmail.com> <87bkicjvne.fsf@gmail.com> <877ct0js46.fsf@gmail.com> <83o7mcpdkk.fsf@gnu.org> <87353ojod2.fsf@gmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 63625 Cc: philipk@posteo.net, 63625@debbugs.gnu.org, monnier@iro.umontreal.ca, toddasmith@mac.com 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: -3.3 (---) > From: Robert Pluim > Cc: philipk@posteo.net, toddasmith@mac.com, monnier@iro.umontreal.ca, > 63625@debbugs.gnu.org > Date: Mon, 22 May 2023 18:57:13 +0200 > > Eli> I'm a bit confused by "that patch" and stuff, and would prefer to see > Eli> the patch for emacs-29 and another for master, please. > > 3 patches, 2 for emacs-29 below. > > The 3rd one for master is just Thanks, these are fine to go in, as far as I'm concerned. From debbugs-submit-bounces@debbugs.gnu.org Tue May 23 09:20:25 2023 Received: (at 63625) by debbugs.gnu.org; 23 May 2023 13:20:26 +0000 Received: from localhost ([127.0.0.1]:38640 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q1Rw9-0006pw-I1 for submit@debbugs.gnu.org; Tue, 23 May 2023 09:20:25 -0400 Received: from mail-wm1-f42.google.com ([209.85.128.42]:44188) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q1Rw6-0006pY-Sc; Tue, 23 May 2023 09:20:23 -0400 Received: by mail-wm1-f42.google.com with SMTP id 5b1f17b1804b1-3f6077660c6so14029385e9.0; Tue, 23 May 2023 06:20:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684848016; x=1687440016; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=gzf0pZDm8ZaHYXlDHC/RZKP+lXaV0kX0Y0ENNHnggaY=; b=eV6SHFzefoXvxOIAC5KnvxrPcyIIQVui7DEGDWRLCesPgdUd3iSOD62UZEdbUZNRvp c8M8dcXZ0Qlu5JBtMyaq57O0PKLfuD60TEzdQJvSnCK9KqvI5GJ5zmYDeMLo+6fSG4uP weIR9h5pCSg7/RVxYAFxWeiaikrgwJutvxq4pXOSeJ6TYx17xhH5Mx8ktlIXCfYS50Wy iWK+8QOwjTW00fCTjJzOhJQFMWYssWvC8AY+pFW9LuPKUGMSGpAoIxd0K9zboKagwNAN FlZhavLd6donK9GHbHLZ4rvWvTrjsc7dmQQ/DnhUTG4I3XwWCXdRjY5BPgPIWSTZaTZG 90vg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684848016; x=1687440016; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=gzf0pZDm8ZaHYXlDHC/RZKP+lXaV0kX0Y0ENNHnggaY=; b=ktiF4a9zDUSsZPTJZ3koHMfqEnp9j5Ed3ZqY2kjpqz8AH6AW7f4jOinvIpXnAZ1YDb hl/dP2sB9sI38i4icGEWfT3KiQT19+Esje5IA9idGffpQXI1nHyiT3RFvyz686FeKXzV uwuQys+UHuVMFwtc9SXMZcIIv4T0QGv9oqLhBfGmrYBjNvnJL8myc6Av9CLQWl9+/Rgr tDNvH2WPUzqyc5zWNVhMXDH1Edl5K9gOJcdWmnEd6vN+YgmjqA6szCJA1hZDAd5x6C0/ C4clL9w1cQE54jDlIISMshKrYliaagw742JWf7Nkz3l6LCcSykdL1AHWgOuV1vpZJpAE /Uaw== X-Gm-Message-State: AC+VfDztyFdPtdLCzdYpvFcowhhGCjSyEGD1l4ZqWkywd5no2prv/Phc ECzZxtr7Hj05oviPyLDwFDr+SPh7jTY= X-Google-Smtp-Source: ACHHUZ7WblDUl5EhWFtXZSufiK4v1koH0YAL76aTuPq3wQLFuKyrO6uJQAWvX7fJyX3EtXpJDxyjZg== X-Received: by 2002:adf:f211:0:b0:306:372d:7891 with SMTP id p17-20020adff211000000b00306372d7891mr10040489wro.59.1684848016316; Tue, 23 May 2023 06:20:16 -0700 (PDT) Received: from rltb ([82.66.8.55]) by smtp.gmail.com with ESMTPSA id 10-20020a05600c024a00b003f42cc3262asm9933833wmj.34.2023.05.23.06.20.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 May 2023 06:20:15 -0700 (PDT) From: Robert Pluim To: Eli Zaretskii Subject: Re: bug#63625: 29.0.90; package-install inserts package directory into load-path twice. In-Reply-To: <834jo3p80n.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 23 May 2023 15:06:00 +0300") References: <4ACD9E26-B5A6-412E-8DFC-C09C05A4EACD@mac.com> <871qj8lp8u.fsf@gmail.com> <87bkicjvne.fsf@gmail.com> <877ct0js46.fsf@gmail.com> <83o7mcpdkk.fsf@gnu.org> <87353ojod2.fsf@gmail.com> <834jo3p80n.fsf@gnu.org> Date: Tue, 23 May 2023 15:20:14 +0200 Message-ID: <87lehfrxpt.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 63625 Cc: philipk@posteo.net, 63625@debbugs.gnu.org, monnier@iro.umontreal.ca, toddasmith@mac.com 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: -1.0 (-) tags 63625 fixed close 63625 29.1 quit >>>>> On Tue, 23 May 2023 15:06:00 +0300, Eli Zaretskii said: >> From: Robert Pluim >> Cc: philipk@posteo.net, toddasmith@mac.com, monnier@iro.umontreal.ca, >> 63625@debbugs.gnu.org >> Date: Mon, 22 May 2023 18:57:13 +0200 >> Eli> I'm a bit confused by "that patch" and stuff, and would prefer to see Eli> the patch for emacs-29 and another for master, please. >> >> 3 patches, 2 for emacs-29 below. >> >> The 3rd one for master is just Eli> Thanks, these are fine to go in, as far as I'm concerned. Closing. Committed as 6f6071c5261 and 0abb79ca09a for emacs-29, and 1d5b164109b for master. Robert -- From debbugs-submit-bounces@debbugs.gnu.org Tue May 23 09:46:17 2023 Received: (at 63625) by debbugs.gnu.org; 23 May 2023 13:46:17 +0000 Received: from localhost ([127.0.0.1]:38706 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q1SLB-0001XQ-42 for submit@debbugs.gnu.org; Tue, 23 May 2023 09:46:17 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:44893) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q1SL9-0001XE-SB for 63625@debbugs.gnu.org; Tue, 23 May 2023 09:46:16 -0400 Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 07B48443788; Tue, 23 May 2023 09:46:10 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 47A14443784; Tue, 23 May 2023 09:46:04 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1684849564; bh=AQ/t3rZhIcFM7diVh7MLQOPx3+0c5SeOUQ3P+pRauyw=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=FwweSnJ7nxiE0aHWkkbhl/KUKMZYT/Qey+p2aqzAUYIDPC1U842Dlpuy9AKEBNoiD GpxaFvJV5QjgjbbXDuaXOMG3TBoys68lgF2zIiOs1OTk27caDzYorxm54531OA624F JlJySnRm7aV0BR+FD4KL1l30IFQ14w0iiYGMGEUyF1N+mqlbosU0RK0BvN1YYi4e8u WktcnTFObySVaAYgAmN3kC897PwaT7PFTSI6Tp6/V4RF+4INGD9m4u+B3av46b/YRM pzVTP4kjqJ0rEaniCG2umUiJ9Cm42uTKc8Nfdu7nDZPewSSXweXJ3zWNdDLBMzPaxJ 0uj5ZsVCIZVrw== Received: from pastel (unknown [45.72.217.176]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 0BF9F120414; Tue, 23 May 2023 09:46:04 -0400 (EDT) From: Stefan Monnier To: Robert Pluim Subject: Re: bug#63625: 29.0.90; package-install inserts package directory into load-path twice. In-Reply-To: <87lehfrxpt.fsf@gmail.com> (Robert Pluim's message of "Tue, 23 May 2023 15:20:14 +0200") Message-ID: References: <4ACD9E26-B5A6-412E-8DFC-C09C05A4EACD@mac.com> <871qj8lp8u.fsf@gmail.com> <87bkicjvne.fsf@gmail.com> <877ct0js46.fsf@gmail.com> <83o7mcpdkk.fsf@gnu.org> <87353ojod2.fsf@gmail.com> <834jo3p80n.fsf@gnu.org> <87lehfrxpt.fsf@gmail.com> Date: Tue, 23 May 2023 09:46:03 -0400 User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL 0.044 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from domain T_SCC_BODY_TEXT_LINE -0.01 - X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 63625 Cc: Eli Zaretskii , 63625@debbugs.gnu.org, philipk@posteo.net, toddasmith@mac.com 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: -3.3 (---) > Committed as 6f6071c5261 and 0abb79ca09a for emacs-29, and 1d5b164109b > for master. Thanks, Robert, Stefan From unknown Fri Aug 15 03:38:19 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 21 Jun 2023 11:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator