From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Thalis Charakas via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#72293: 29.4; use-package-ensure does not get autoloaded (in time?) Date: Thu, 25 Jul 2024 16:09:44 +0000 Message-ID: Reply-To: Thalis Charakas Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4277"; mail-complaints-to="usenet@ciao.gmane.io" To: 72293@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jul 25 18:11:23 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sX13q-000103-U8 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 25 Jul 2024 18:11:23 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sX13R-0001hD-Lg; Thu, 25 Jul 2024 12:10:57 -0400 Original-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 1sX13P-0001h4-Up for bug-gnu-emacs@gnu.org; Thu, 25 Jul 2024 12:10:55 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sX13P-0008BP-MY for bug-gnu-emacs@gnu.org; Thu, 25 Jul 2024 12:10:55 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sX13W-00006O-J2 for bug-gnu-emacs@gnu.org; Thu, 25 Jul 2024 12:11:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Thalis Charakas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 25 Jul 2024 16:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 72293 X-GNU-PR-Package: emacs X-Debbugs-Original-To: "bug-gnu-emacs@gnu.org" Original-Received: via spool by submit@debbugs.gnu.org id=B.1721923809303 (code B ref -1); Thu, 25 Jul 2024 16:11:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 25 Jul 2024 16:10:09 +0000 Original-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 Original-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 Original-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 Original-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== Feedback-ID: 840084:user:proton X-Pm-Message-ID: 5d883fbdd4ffe3bc3bc93b1dda1bc16bb568088d 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:289316 Archived-At: 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))