From unknown Fri Jun 20 19:55:33 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#72293 <72293@debbugs.gnu.org> To: bug#72293 <72293@debbugs.gnu.org> Subject: Status: 29.4; use-package-ensure does not get autoloaded (in time?) Reply-To: bug#72293 <72293@debbugs.gnu.org> Date: Sat, 21 Jun 2025 02:55:33 +0000 retitle 72293 29.4; use-package-ensure does not get autoloaded (in time?) reassign 72293 emacs submitter 72293 Thalis Charakas severity 72293 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Thu Jul 25 12:10:09 2024 Received: (at submit) by debbugs.gnu.org; 25 Jul 2024 16:10:09 +0000 Received: from localhost ([127.0.0.1]:37655 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sX12e-0008WV-Rn for submit@debbugs.gnu.org; Thu, 25 Jul 2024 12:10:09 -0400 Received: from lists.gnu.org ([209.51.188.17]:35924) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sX12a-0008WH-Mt for submit@debbugs.gnu.org; Thu, 25 Jul 2024 12:10:07 -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 1sX12S-0001aK-Ts for bug-gnu-emacs@gnu.org; Thu, 25 Jul 2024 12:09:56 -0400 Received: from mail-40140.protonmail.ch ([185.70.40.140]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sX12Q-0007uE-7s for bug-gnu-emacs@gnu.org; Thu, 25 Jul 2024 12:09:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1721923788; x=1722182988; bh=XMhBExHbYrMOp1RDm0WzKKseQZIHn36Rnb5DmOkHaGA=; h=Date:To:From:Subject:Message-ID:Feedback-ID:From:To:Cc:Date: Subject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector; b=Eh2F4NZyapCDZLLx8nVNbEXrAPSXgl9u01kMtCbT7JNv2OoBxDQOXx4fyArwNGOEd DdOZG1t7lvj0eSXCKyUgnyr/AOjA+wxqpDbANEtdvV0ixzUVbvUVMViMuseZsPecWl ukSuuAas+cgLEGWwGSk+4RWFRVDfzfsSBnH6EcEFlhN/CQf7twYA0vVhyN/cTCfAm9 /dx4CTwHI+783MIRbLmZvISJuNyMUVQgNDmZHSJltdFtKY6l9iyyDDWVtKbhhIZIIf FdGXU0mdlVQYjFO8IESZrcekof9O8U6qACPm7DsRcK551GKRS/ZFvPRgI17pR/IZdp hgIBam0+dARsQ== Date: Thu, 25 Jul 2024 16:09:44 +0000 To: "bug-gnu-emacs@gnu.org" From: Thalis Charakas Subject: 29.4; use-package-ensure does not get autoloaded (in time?) Message-ID: Feedback-ID: 840084:user:proton X-Pm-Message-ID: 5d883fbdd4ffe3bc3bc93b1dda1bc16bb568088d MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=185.70.40.140; envelope-from=thales1@protonmail.com; helo=mail-40140.protonmail.ch X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 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_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.1 (-) 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: -2.1 (--) The variable `use-package-always-ensure` cannot be used reliably in init.el or early-init.el without adding the line `(require 'use-package-ensure)` or `(require 'use-package)`. I tested the following init.el files, each time with a completely empty .emacs.d directory. Note that I'm using which-key as an example of a package that is not included in Emacs (29.4), the same results happened wit= h other packages. What I include in this report is the entirety of the init.el files tested. The following init.el file failed to download which-key: (setq use-package-always-ensure t) (use-package which-key :init (setq which-key-idle-delay 0.1) :config (which-key-mode)) With the error: =E2=9B=94 Error (use-package): Cannot load which-key Even when putting `(setq use-package-always-ensure t)` in an early-init.el and having only that line in it, and having only the `use-package` statement in the init.el The following init.el files downloaded which-key: 1. (use-package which-key :ensure t :init (setq which-key-idle-delay 0.1) :config (which-key-mode)) 2. (setq use-package-always-ensure t) (use-package which-key ;; after 30 will be in :ensure t :init (setq which-key-idle-delay 0.1) :config (which-key-mode)) 3. (require 'use-package-ensure) (setq use-package-always-ensure t) (use-package which-key :init (setq which-key-idle-delay 0.1) :config (which-key-mode)) 4. (require 'use-package) (setq use-package-always-ensure t) (use-package which-key ;; after 30 will be in :init (setq which-key-idle-delay 0.1) :config (which-key-mode)) The reason I consider this a bug is because in my real much bigger init.el, which does not require `use-package-ensure` or `use-package`, when opening Emacs with nothing else in the .emacs.d directory, some packages get downloaded and some don't. This makes me think that at some point `use-package-ensure` gets loaded. Also since `use-package` is autoloaded, requiring it should not make a difference. The user jmml in the #emacs IRC channel found that requiring `use-package-ensure` or `use-package` fixes the problem. In GNU Emacs 29.4 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.38, cairo version 1.16.0) of 2024-07-22, modified by Debian built on x86-ubc-01 Windowing system distributor 'The X.Org Foundation', version 11.0.12201009 System Description: Debian GNU/Linux 12 (bookworm) Configured using: 'configure --build x86_64-linux-gnu --prefix=3D/usr --sharedstatedir=3D/var/lib --libexecdir=3D/usr/libexec --localstatedir=3D/var/lib --infodir=3D/usr/share/info --mandir=3D/usr/share/man --with-libsystemd --with-pop=3Dyes --enable-locallisppath=3D/etc/emacs:/usr/local/share/emacs/29.4/site-lisp:= /usr/local/share/emacs/site-lisp:/usr/share/emacs/29.4/site-lisp:/usr/share= /emacs/site-lisp --with-sound=3Dalsa --without-gconf --with-mailutils --with-native-compilation --build x86_64-linux-gnu --prefix=3D/usr --sharedstatedir=3D/var/lib --libexecdir=3D/usr/libexec --localstatedir=3D/var/lib --infodir=3D/usr/share/info --mandir=3D/usr/share/man --with-libsystemd --with-pop=3Dyes --enable-locallisppath=3D/etc/emacs:/usr/local/share/emacs/29.4/site-lisp:= /usr/local/share/emacs/site-lisp:/usr/share/emacs/29.4/site-lisp:/usr/share= /emacs/site-lisp --with-sound=3Dalsa --without-gconf --with-mailutils --with-native-compilation --with-cairo --with-x=3Dyes --with-x-toolkit=3Dgtk3 --with-toolkit-scroll-bars 'CFLAGS=3D-g -O2 -ffile-prefix-map=3D/build/reproducible-path/emacs-29.4+1=3D. -fstack-prot= ector-strong -Wformat -Werror=3Dformat-security -Wall' 'CPPFLAGS=3D-Wdate-time -D_FORTIFY_SOURCE=3D2' LDFLAGS=3D-Wl,-z,relro' Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP X11 XDBE XIM XINPUT2 XPM GTK3 ZLIB Important settings: value of $LC_MONETARY: el_GR.UTF-8 value of $LC_NUMERIC: el_GR.UTF-8 value of $LC_TIME: el_GR.UTF-8 value of $LANG: en_US.UTF-8 value of $XMODIFIERS: @im=3Dibus 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 message mailcap yank-media puny dired dired-loaddefs rfc822 mml mml-sec password-cache epa derived epg rfc6068 epg-config gnus-util text-property-search time-date mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader cl-loaddefs comp comp-cstr warnings icons subr-x rx cl-seq cl-macs gv cl-extra help-mode bytecomp byte-compile cl-lib sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils rmc iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/x-win x-win term/common-win x-dnd 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 dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting cairo move-toolbar gtk x-toolkit xinput2 x multi-tty make-network-process native-compile emacs) Memory information: ((conses 16 77029 12726) (symbols 48 7140 0) (strings 32 19388 1382) (string-bytes 1 591546) (vectors 16 15412) (vector-slots 8 325849 20050) (floats 8 27 46) (intervals 56 281 0) (buffers 984 11)) From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 04 04:15:09 2024 Received: (at control) by debbugs.gnu.org; 4 Aug 2024 08:15:09 +0000 Received: from localhost ([127.0.0.1]:55417 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1saWOS-00062z-Ge for submit@debbugs.gnu.org; Sun, 04 Aug 2024 04:15:09 -0400 Received: from eggs.gnu.org ([209.51.188.92]:46118) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1saWOP-000622-Jn; Sun, 04 Aug 2024 04:15:06 -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 1saWNy-0007GD-Ki; Sun, 04 Aug 2024 04:14:38 -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=B+1Rcw84KPnXx3GF6i6dERqUNd94LEcmmOVjXXXjR9k=; b=p8cUzb6VGAkjfKUPIzwo K0+mxEn8wlvmamIStWXGGrzILIAHLSnFCeTNEmw0kiHqq/YPHYfl68adKtUnbefHW9TTDF4DpH0n7 khNLlq10gcgQtpILtwVCxCrJiKMVWu3+K0n1TdylBlgk0NRj4iN8jOOMPlettLcXv4GlIRFP4bhtx lvcbWyNAWzSLjw2AMtmPtBN4buEV2TuG1AlTimBv2sUKpfXHpEXXo/qr6YA3GW/LxPH33AYUWuc2E ItoiA90UuJIX+nFK2AWnHoKzYW/2CabHDlT64meMN+l4zZlpXNUy/JvruFQtcADit964c7TaeAqlg btMGVuaiAXIaDw==; Date: Sun, 04 Aug 2024 11:14:33 +0300 Message-Id: <86o768so0m.fsf@gnu.org> From: Eli Zaretskii To: John Wiegley , Stefan Kangas In-Reply-To: (message from John Wiegley on Sat, 03 Aug 2024 23:01:04 -0700) Subject: Re: bug#72453: 29.4; "use-package" macro does not load all expected related files References: <87plqp9slr.fsf@priss.frightenedpiglet.com> <86v80gucas.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control Cc: 72453@debbugs.gnu.org, derek_upham@mailfence.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 (---) merge 72453 72293 thanks > From: John Wiegley > Cc: Derek Upham , 72453@debbugs.gnu.org > Date: Sat, 03 Aug 2024 23:01:04 -0700 > > >>>>> Eli Zaretskii writes: > > >> Moving the "use-package" macro into the top-level "use-package" file should > >> fix the problem. The "use-package" file explicitly loads the other files, > >> which sets up all of the defaults. > > > John, any comments or suggestions? > > I didn’t write any of the :ensure logic, so I have no comments there, but the > suggestion above sounds like a sound and harmless one to me. Thanks, John. Stefan, would you please handle this? Moving use-package from use-package-core.el to use-package.el would probably mean much more massive load whenever the macro is used, and I wonder whether there's a more light-weight solution. If such a light-weight solution exists, I think we should install it on the emacs-30 release branch, but if the only reasonable solution is what the OP suggested, then I think it should go to master. Btw, I think this bug and bug#72293 are the same bug, so I'm merging them. From unknown Fri Jun 20 19:55:33 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 29 Sep 2024 11:24:12 +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