From unknown Sun Jun 22 07:48:20 2025 X-Loop: help-debbugs@gnu.org Subject: bug#53885: Autoload package-installed-p Resent-From: Corwin Brust Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 08 Feb 2022 23:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 53885 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 53885@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.164436454832651 (code B ref -1); Tue, 08 Feb 2022 23:56:02 +0000 Received: (at submit) by debbugs.gnu.org; 8 Feb 2022 23:55:48 +0000 Received: from localhost ([127.0.0.1]:49106 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nHaKp-0008UX-Oe for submit@debbugs.gnu.org; Tue, 08 Feb 2022 18:55:48 -0500 Received: from lists.gnu.org ([209.51.188.17]:56594) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nHaKn-0008UQ-ST for submit@debbugs.gnu.org; Tue, 08 Feb 2022 18:55:46 -0500 Received: from eggs.gnu.org ([209.51.188.92]:33614) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nHaKn-0008JG-KX for bug-gnu-emacs@gnu.org; Tue, 08 Feb 2022 18:55:45 -0500 Received: from mail-ed1-f47.google.com ([209.85.208.47]:44802) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nHaKl-0003Yh-FE for bug-gnu-emacs@gnu.org; Tue, 08 Feb 2022 18:55:45 -0500 Received: by mail-ed1-f47.google.com with SMTP id bx2so1641888edb.11 for ; Tue, 08 Feb 2022 15:55:41 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=Y8zMc6Y95doeqh3AP5tPFcW7fdY7jelO14UGvwSrHRo=; b=7NE5sWwJizf1wvg7Fip83O+KGMOU3V7tjsQAi21rjxQrn7EEiK2uXoNka6y1hJycg1 w8uhJ1uc6VWoc2VpyVxd2NDIKbe2oDpQcvfEAEe8YCVm7LwYv8H0By2GnvoG7bhPgnFN AhB+CmUBDYSw4GI4Gyq80kRkioyYu10qfiGbjNXHlx4fyyFSs+qDRwUXiksJPI117C5i bSVVttO3pfnDOw7BlndMRtz5dZiVMQKyIL1W/mOZtDx7bMe+j0e3bsyx5Mp+iKGZuQFo LmZw7pABigJGvpLk3KHF4QNGneCnOaGtesHy/gZ/I1WfKy6p7Ae71s+tVpoE5unlVvDp cQ2Q== X-Gm-Message-State: AOAM530Zz+07P7t5JxrIavvI9HLUsHm4d7JuY7WoCI+jPeDqlpT5pS2r lhYdK27KQ42ykSHPqzno+Eak9mF2RtEOX6OzUSiyRUKNVsw= X-Google-Smtp-Source: ABdhPJxUuU++CDzuN9WFJTkhBYQ0DeuPoWuKmib2UL+Jtj28OUeNr1HpMIrfwU2SSizCkHYRu8ec4uF2AI6JLeOemCc= X-Received: by 2002:a05:6402:298e:: with SMTP id eq14mr6886517edb.240.1644364540534; Tue, 08 Feb 2022 15:55:40 -0800 (PST) MIME-Version: 1.0 From: Corwin Brust Date: Tue, 8 Feb 2022 17:55:29 -0600 Message-ID: Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=209.85.208.47; envelope-from=mplscorwin@gmail.com; helo=mail-ed1-f47.google.com X-Spam_score_int: -13 X-Spam_score: -1.4 X-Spam_bar: - X-Spam_report: (-1.4 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.248, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: -0.8 (/) 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.8 (-) Commentary: If the change is accpted, please consider fixing this for emacs-28. The reproducer represents a common use-case, e.g. see bug #31397. Moverover, it is a one-line change unlikely to affect anything aside this and similar use-cases. I will submit a patch as soon as I have a BugID from the tracker. Although this change is rather trivial I need to practice this process. Reproducer: NOTE: Make sure you have a folder beneth your home directory called "elpa" and that it is empty. Launch emacs -Q Insert and evaluate: (progn (setq package-user-dir "~/elpa") (setq package-archives '(("MELPA" . "https://melpa.org/packages/"))) (require 'package) (unless (package-installed-p 'use-package) (package-install 'use-package))) Expected result: Packages are installed under ~/elpa Actual Result: Debugger entered--Lisp error: (void-function package-installed-p) (package-installed-p 'use-package) (if (package-installed-p 'use-package) nil (package-install 'use-package)) (progn (if (package-installed-p 'use-package) nil (package-install 'use-package))) elisp--eval-last-sexp(nil) eval-last-sexp(nil) funcall-interactively(eval-last-sexp nil) command-execute(eval-last-sexp) Work-around: (progn (setq package-user-dir "~/elpa") (setq package-archives '(("MELPA" . "https://melpa.org/packages/"))) (require 'package) ;; workaround (unless (package-installed-p 'use-package) (package-install 'use-package))) -- In GNU Emacs 28.0.91 (build 6, x86_64-w64-mingw32) of 2022-02-05 built on AVALON Repository revision: 821c240075e3b850a61207d18d520126292421ce Repository branch: emacs-28-nt-dist-build Windowing system distributor 'Microsoft Corp.', version 10.0.19043 System Description: Microsoft Windows 10 Home (v10.0.2009.19043.1503) Configured using: 'configure --with-json --without-dbus --with-native-compilation --without-compress-install CFLAGS=-O2' Configured features: ACL GIF GMP GNUTLS HARFBUZZ JPEG JSON LCMS2 LIBXML2 MODULES NATIVE_COMP NOTIFY W32NOTIFY PDUMPER PNG RSVG SOUND THREADS TIFF TOOLKIT_SCROLL_BARS XPM ZLIB Important settings: value of $LANG: ENU locale-coding-system: cp1252 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 auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t indent-tabs-mode: t transient-mark-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs rfc822 mml mml-sec epa derived epg rfc6068 epg-config gnus-util rmail rmail-loaddefs auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache json map text-property-search seq byte-opt gv bytecomp byte-compile cconv mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils help-fns radix-tree cl-print debug backtrace help-mode find-func time-date subr-x cl-loaddefs cl-lib iso-transl tooltip eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel dos-w32 ls-lisp disp-table term/w32-win w32-win w32-vars 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 cl-generic 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 simple abbrev obarray cl-preloaded nadvice button loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads w32notify w32 lcms2 multi-tty make-network-process native-compile emacs) Memory information: ((conses 16 78996 5653) (symbols 48 7157 0) (strings 32 22876 2110) (string-bytes 1 755191) (vectors 16 14673) (vector-slots 8 308167 12600) (floats 8 30 232) (intervals 56 376 0) (buffers 992 11)) From unknown Sun Jun 22 07:48:20 2025 X-Loop: help-debbugs@gnu.org Subject: bug#53885: 28.0.51 [PATCH] Autoload package-installed-p Resent-From: Corwin Brust Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 09 Feb 2022 00:07:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53885 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 53885@debbugs.gnu.org, Eli Zaretskii Received: via spool by 53885-submit@debbugs.gnu.org id=B53885.16443651641379 (code B ref 53885); Wed, 09 Feb 2022 00:07:02 +0000 Received: (at 53885) by debbugs.gnu.org; 9 Feb 2022 00:06:04 +0000 Received: from localhost ([127.0.0.1]:49128 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nHaUm-0000MA-8x for submit@debbugs.gnu.org; Tue, 08 Feb 2022 19:06:04 -0500 Received: from mail-ej1-f52.google.com ([209.85.218.52]:33300) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nHaUl-0000Lc-7Y for 53885@debbugs.gnu.org; Tue, 08 Feb 2022 19:06:03 -0500 Received: by mail-ej1-f52.google.com with SMTP id fy20so2533773ejc.0 for <53885@debbugs.gnu.org>; Tue, 08 Feb 2022 16:06:03 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=wN+5KOjw/wEAKmJ1GiLGpbaetpxnkhr9Oyg2E39Q6Lw=; b=v22WIdZm4Qh8AgPaer2HnD1RfADY5ayxPR9T+YGUCaG65oGke4W204ZoUe9bap8eeP scuVj521Rohub+sTImeALjXVWizRqPjoq/9CaMEtv5DH6ujGE3ar/7aSf9yo39u70xtl eQvmvd7dBTalEEfa5ERxjtl4dPoV1IlUswGbbGewaM/BIcO5c8N3x9ONFeD77AtvIUUG 0fUMBtz1qf6WfkokVBX/unLEHeCxO0rwPxDXw6uSZIl9kHhNVNh9/jLAmc0ouIFxBJzK lmKGLx4JysdSdY8v31gWnzRy8cew8epMxT87U6J/X9mIHubxtCHf9GFauKx422Pq/VBN 7V3Q== X-Gm-Message-State: AOAM532tvn99pBYgRSc+Nv2Yll9OXLYSJjlFMULuISkRk0IrSWPBTlOK KP0HCCv4hUw7wUs6eHdMzkT1x7cmrZeoN29HvC/tRU3Tg5g= X-Google-Smtp-Source: ABdhPJw9psgzqFkxS0WALejDy0JI5xAMy8SGH+Rtb5LWf0+klYh/BvYnWRmZ6EnLvbnGMO39fnKbtTWk/yWANGqW1Vc= X-Received: by 2002:a17:906:9756:: with SMTP id o22mr5827413ejy.448.1644365156945; Tue, 08 Feb 2022 16:05:56 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Corwin Brust Date: Tue, 8 Feb 2022 18:05:45 -0600 Message-ID: Content-Type: multipart/mixed; boundary="0000000000000fa2a105d78a9958" X-Spam-Score: 0.5 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) --0000000000000fa2a105d78a9958 Content-Type: text/plain; charset="UTF-8" On Tue, Feb 8, 2022 at 5:56 PM Corwin Brust wrote: > > Commentary: > > If the change is accpted, please consider fixing this for emacs-28. > The reproducer represents a common use-case, e.g. see bug #31397. > Moverover, it is a one-line change unlikely to affect anything aside > this and similar use-cases. > Eli, Would this be okay for the release branch or should I check if changes are needed to rebase against master? Also, hould this receive a NEWS entry? > I will submit a patch as soon as I have a BugID from the tracker. > Although this change is rather trivial I need to practice this > process. > Now attached. TIA for tips and corrections. --0000000000000fa2a105d78a9958 Content-Type: application/octet-stream; name="autoload_package-installed-p.patch" Content-Disposition: attachment; filename="autoload_package-installed-p.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_kzesfvve0 Y29tbWl0IDgzMTdkZTU4NmI2ZGMwMmNkN2E4MmQ0NDY5ZGRhNGIzY2VkYmE3YTMKQXV0aG9yOiBD b3J3aW4gQnJ1c3QgPGNvcndpbkBicnUuc3Q+CkRhdGU6ICAgVHVlIEZlYiA4IDE3OjQ4OjE0IDIw MjIgLTA2MDAKCiAgICBBdXRvbG9hZCBwYWNrYWdlLWluc3RhbGxlZC1wCiAgICAKICAgICogbGlz cC9lbWFjcy1saXNwL3BhY2thZ2UuZWwgKHBhY2thZ2UtaW5zdGFsbGVkLXApOiBBZGQgYXV0b2xv YWQKICAgIGNvb2tpZS4gKGJ1ZyM1Mzg4NSkKCmRpZmYgLS1naXQgYS9saXNwL2VtYWNzLWxpc3Av cGFja2FnZS5lbCBiL2xpc3AvZW1hY3MtbGlzcC9wYWNrYWdlLmVsCmluZGV4IDc2NzliYTJmYWUu LjRhYWQ1OGVkNmYgMTAwNjQ0Ci0tLSBhL2xpc3AvZW1hY3MtbGlzcC9wYWNrYWdlLmVsCisrKyBi L2xpc3AvZW1hY3MtbGlzcC9wYWNrYWdlLmVsCkBAIC0yMDcyLDYgKzIwNzIsNyBAQCBwYWNrYWdl LWluc3RhbGwtZnJvbS1hcmNoaXZlCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgcGFja2FnZS1hbGlzdCkpKSkKICAgICAgICAgICAgICAgICAgKHNldGYg KHBhY2thZ2UtZGVzYy1zaWduZWQgKGNhciBwa2ctZGVzY3MpKSB0KSkpKSkpKSkpKQogCis7Ozsj IyNhdXRvbG9hZAogKGRlZnVuIHBhY2thZ2UtaW5zdGFsbGVkLXAgKHBhY2thZ2UgJm9wdGlvbmFs IG1pbi12ZXJzaW9uKQogICAiUmV0dXJuIG5vbi1uaWwgaWYgUEFDS0FHRSwgb2YgTUlOLVZFUlNJ T04gb3IgbmV3ZXIsIGlzIGluc3RhbGxlZC4KIElmIFBBQ0tBR0UgaXMgYSBzeW1ib2wsIGl0IGlz IHRoZSBwYWNrYWdlIG5hbWUgYW5kIE1JTi1WRVJTSU9OCg== --0000000000000fa2a105d78a9958-- From unknown Sun Jun 22 07:48:20 2025 X-Loop: help-debbugs@gnu.org Subject: bug#53885: Autoload package-installed-p Resent-From: Corwin Brust Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 09 Feb 2022 05:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53885 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 53885@debbugs.gnu.org Received: via spool by 53885-submit@debbugs.gnu.org id=B53885.164438519620441 (code B ref 53885); Wed, 09 Feb 2022 05:40:02 +0000 Received: (at 53885) by debbugs.gnu.org; 9 Feb 2022 05:39:56 +0000 Received: from localhost ([127.0.0.1]:49411 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nHfhs-0005Jc-62 for submit@debbugs.gnu.org; Wed, 09 Feb 2022 00:39:56 -0500 Received: from mail-ed1-f44.google.com ([209.85.208.44]:39828) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nHfhq-0005JN-Jn for 53885@debbugs.gnu.org; Wed, 09 Feb 2022 00:39:54 -0500 Received: by mail-ed1-f44.google.com with SMTP id u18so2881315edt.6 for <53885@debbugs.gnu.org>; Tue, 08 Feb 2022 21:39:54 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=5oMU5+RugFF+vL2TGMPuG/e1nJRVs2kWYZagsByoI3I=; b=KzAtrdBfKhduefAlz0ehkqrut6efE9FcCq8ZwfLhXmTuPtyhmfcVFcW2fAGOLfi4Qv KgQ4UZY7ZPENZJ995mrSt7ZAd/Smt2R/YpwC9iC5awn3dLAa3rtc52fyjGkj0hew/Bx2 PlPraNUnM6E14TbOrFhokHsqp5QmulR7yISWfVc9M+nDER+7Kb3n8ZhieS+74OE58MvK Esjf3x3R2H9xuF5xgqX/l+o62ODVcrvUGAqf8g+nlyDKZTUDSMavWwdTy4fDx40tvC5J vfzNCDgwI17/wmzue2+bazeRpkHeDLEocDTQQpBdBlJGh3UTAFtmyWO55fbAtf4+2bAP 0f0g== X-Gm-Message-State: AOAM530dC38f5VqF+QChqmtpavfNclZBJT0R59CHmAMgEO679nXGc94w gmD1CQovogNU8YyAUZHsDTeY/8NYz5rToLi+DbxMmHTeHDU= X-Google-Smtp-Source: ABdhPJyP9ApjJA8CSCCJS1sgYgiLfB7atXRGleI49eAYq9OdmZEqSsp8G/NhhAgB+pppPe37gz1hDRGTbZkHushl4sY= X-Received: by 2002:a05:6402:5248:: with SMTP id t8mr764617edd.14.1644385188545; Tue, 08 Feb 2022 21:39:48 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Corwin Brust Date: Tue, 8 Feb 2022 23:39:37 -0600 Message-ID: Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.5 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) retitle 53885 28.0.91 [PATCH] Autoload package-installed-p thanks I inadvertently included an explicit call to `require' in the reproducer, which functions as a work-around for this (IMO) missing autoload. Sorry for any confusion caused. > > Reproducer: > > NOTE: Make sure you have a folder beneth your home directory called > "elpa" and that it is empty. > > Launch emacs -Q > Insert and evaluate: Corrected reproducer: (progn (setq package-user-dir "~/elpa") (setq package-archives '(("MELPA" . "https://melpa.org/packages/"))) (unless (package-installed-p 'use-package) (package-install 'use-package))) From unknown Sun Jun 22 07:48:20 2025 X-Loop: help-debbugs@gnu.org Subject: bug#53885: 28.0.51 [PATCH] Autoload package-installed-p Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 09 Feb 2022 13:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53885 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Corwin Brust , Lars Ingebrigtsen Cc: 53885@debbugs.gnu.org Received: via spool by 53885-submit@debbugs.gnu.org id=B53885.164441393828889 (code B ref 53885); Wed, 09 Feb 2022 13:39:02 +0000 Received: (at 53885) by debbugs.gnu.org; 9 Feb 2022 13:38:58 +0000 Received: from localhost ([127.0.0.1]:50243 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nHnBS-0007Vt-BP for submit@debbugs.gnu.org; Wed, 09 Feb 2022 08:38:58 -0500 Received: from eggs.gnu.org ([209.51.188.92]:53128) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nHnBQ-0007Ve-8A for 53885@debbugs.gnu.org; Wed, 09 Feb 2022 08:38:56 -0500 Received: from [2001:470:142:3::e] (port=56982 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nHnBK-0007Ks-AP; Wed, 09 Feb 2022 08:38:50 -0500 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=FWPY3kSFfVaWV1yurp1cSC1+7PgCeGLl8IaDzc6NhJA=; b=AjD8JjImwODU I25j53VYp9Cm8VaG8O4XxYNDTJX33NzWVJJ4f1/j79a0HH3IMZ8h5A2Cpy2+1oWVCAnREobML6JZF 2a17w+et1CzGWN7FxSvhvteSRhdaMumsEUTYryH/h4v/90NT1g/Ylom3ObinU7BmCksK4fcWZPqXM r5XFbbsImNCTqCOya9Rv4t8rOEP9KvkmYs3xlDTOi45OxIK5TBKaO34iw3SJYysM3cDuae5QBn5If 8dUR2NW1tX/X3814E5EwxXz3sz0Pn3OIxO3z9KcBF3FRmjQUaP9uyuh7Hxc6XyeASDhpXuG+Txk4w 2zCOBZFdLRbCLLKC3gX35w==; Received: from [87.69.77.57] (port=1532 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 1nHnAT-0006k5-8v; Wed, 09 Feb 2022 08:38:15 -0500 Date: Wed, 09 Feb 2022 15:37:48 +0200 Message-Id: <83y22kupn7.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: (message from Corwin Brust on Tue, 8 Feb 2022 18:05:45 -0600) References: X-Spam-Score: -2.3 (--) 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: Corwin Brust > Date: Tue, 8 Feb 2022 18:05:45 -0600 > > > Commentary: > > > > If the change is accpted, please consider fixing this for emacs-28. > > The reproducer represents a common use-case, e.g. see bug #31397. > > Moverover, it is a one-line change unlikely to affect anything aside > > this and similar use-cases. > > > > Eli, > > Would this be okay for the release branch or should I check if changes > are needed to rebase against master? Also, hould this receive a NEWS > entry? > > > I will submit a patch as soon as I have a BugID from the tracker. > > Although this change is rather trivial I need to practice this > > process. > > > > Now attached. TIA for tips and corrections. It's not really a bugfix, it's an enhancement. Not sure if it's important enough for the release branch. But it's quite simple and probably safe. Lars, WDYT? (No need for a NEWS entry.) From unknown Sun Jun 22 07:48:20 2025 X-Loop: help-debbugs@gnu.org Subject: bug#53885: Autoload package-installed-p Resent-From: Augusto Stoffel Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 09 Feb 2022 14:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53885 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Corwin Brust Cc: Lars Ingebrigtsen , Eli Zaretskii , 53885@debbugs.gnu.org Received: via spool by 53885-submit@debbugs.gnu.org id=B53885.16444175852868 (code B ref 53885); Wed, 09 Feb 2022 14:40:02 +0000 Received: (at 53885) by debbugs.gnu.org; 9 Feb 2022 14:39:45 +0000 Received: from localhost ([127.0.0.1]:50329 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nHo8G-0000kC-Tv for submit@debbugs.gnu.org; Wed, 09 Feb 2022 09:39:45 -0500 Received: from mail-ed1-f50.google.com ([209.85.208.50]:41840) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nHo8F-0000k0-1d for 53885@debbugs.gnu.org; Wed, 09 Feb 2022 09:39:43 -0500 Received: by mail-ed1-f50.google.com with SMTP id cz16so5475073edb.8 for <53885@debbugs.gnu.org>; Wed, 09 Feb 2022 06:39:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=CaFihuXfbUrwchrRaSYxRu4r72JUFXadVud2odF/GHU=; b=oYiSd5JKkRLTXLrbBS64+j4yfkCVr/2XX10ID5MrOnR8lYV0gnpqDnGgt9gziLm2cz t4QqYUWZDmHTrDBTi+s1ZIBA/uL2O3NkWdmTmSdP14Ei6psFYzg/mGRoZzGq+0QbARJK ppijdXtcDqu3KLj2IxD07/N4Qu/KD2rmd/giwdm3WgdGdFScQX9WiXxej0EeAt9I72MZ QFJKCkQUsMwK0MqdOuzKyDBrFJ5Qwh0QbYiFBdd822wjiBnjmcuYgAb+hDH/e3f94pzD 75EgCg77zpyL9EfQFCS9wHTJFv+0lDiDZrXcKZU5LFXDLQvLcH5u1BbCKGSevtHeNrkQ P8ZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=CaFihuXfbUrwchrRaSYxRu4r72JUFXadVud2odF/GHU=; b=or7CNxOi2PMgivRMil+6tDYANjaGnf98q+Pi0u4Sad6KH/7OD+7JUvGMGKCoWfOhKr +JZD6Y8cSYOWiocDkG8ixH0v+JkEpT6hv49RjMzx8POlXCHvExWmLvjLROXTt4Stmov8 eXUgI02GefQyV0UMMuH1XKvvZXoStLlIRwBv7pnZ4D8bzz1WjsObcgZXGyxoJXQr6agC zpB0KEUzxp98NYXCtD4ef5plRSdfp7kQ4IyGp6RfhnD1rvSP9hpWduLT+b8DKsEu5O0p V6goj9IWqUXIgjRPZGQzb4qOvfVXMsFcWBHKMXQXz5MWKM0OxTf72nhB6BcZJjuGzIS4 klPw== X-Gm-Message-State: AOAM533BbP+yhZBs3hgfpuMUiaQZRNjjBVDLj2Zsq7qL4rKkwmYu/HDP D1o2hkIGvOYhsaKWKjVPU60= X-Google-Smtp-Source: ABdhPJyxfMNnjrcpNIuVnrBOCtbXl23sKg8+yjvFQ/Q4BJr2cg+rve2GnV/3FTzM1+DClJ/ok2Jwzg== X-Received: by 2002:aa7:df1a:: with SMTP id c26mr2848207edy.416.1644417575908; Wed, 09 Feb 2022 06:39:35 -0800 (PST) Received: from ars3 ([2a02:8109:8ac0:56d0::758e]) by smtp.gmail.com with ESMTPSA id s8sm5978591ejb.59.2022.02.09.06.39.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Feb 2022 06:39:35 -0800 (PST) From: Augusto Stoffel References: Date: Wed, 09 Feb 2022 15:39:34 +0100 In-Reply-To: (Corwin Brust's message of "Tue, 8 Feb 2022 23:39:37 -0600") Message-ID: <87a6f0nly1.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) 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 Tue, 8 Feb 2022 at 23:39, Corwin Brust wrote: > Corrected reproducer: > > (progn > (setq package-user-dir "~/elpa") > (setq package-archives > '(("MELPA" . > "https://melpa.org/packages/"))) > (unless (package-installed-p 'use-package) > (package-install 'use-package))) By the way, there are two issues with this code snippet. First, you should call '(package-refresh-contents)' to make sure you have the package list from MELPA. Second, and more subtly, calling package install during init time doesn't add the package to the list of selected packages, so 'use-package' would be subject to removal by 'package-autoremove'. To fix this, something like (add-hook 'after-init-hook (lambda () (package--update-selected-packages '(use-package) nil))) is needed. I think a more user-friendly 'package-ensure-installed' function is in order here. I believe the use-package package provides some functionality for this, but there is no good built-in equivalent (which is needed even by use-package users). From unknown Sun Jun 22 07:48:20 2025 X-Loop: help-debbugs@gnu.org Subject: bug#53885: Autoload package-installed-p Resent-From: Corwin Brust Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 09 Feb 2022 15:41:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53885 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Augusto Stoffel Cc: Lars Ingebrigtsen , Eli Zaretskii , 53885@debbugs.gnu.org Received: via spool by 53885-submit@debbugs.gnu.org id=B53885.164442120819979 (code B ref 53885); Wed, 09 Feb 2022 15:41:01 +0000 Received: (at 53885) by debbugs.gnu.org; 9 Feb 2022 15:40:08 +0000 Received: from localhost ([127.0.0.1]:52356 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nHp4h-0005CB-WE for submit@debbugs.gnu.org; Wed, 09 Feb 2022 10:40:08 -0500 Received: from mail-ej1-f47.google.com ([209.85.218.47]:36361) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nHp4e-0005BW-AO for 53885@debbugs.gnu.org; Wed, 09 Feb 2022 10:40:06 -0500 Received: by mail-ej1-f47.google.com with SMTP id u20so4182563ejx.3 for <53885@debbugs.gnu.org>; Wed, 09 Feb 2022 07:40:04 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=LAG7BSfrbM7sn9DLYfNiifl3E0L108U7+Dsa8cByEtE=; b=3sOvxpq9iyKpfGzzon8V5JJAQ7QlHRFAnVrCdsu2UdVB2o+r4j8re9bsNodKEbr8tD H0tzfeAsy3P7iKhjmLRceFImLn3VGHPtpVdHACEoVPLR/Bv0XP0UN7X2tQ6r/6IePimT /KnsmfxnerUbxqbF5tKI+WBOri1i4y8OIMPToBU6BZXBAbwvMrcEcOIfrTwgmMMOxCxp hnRSxV5a8jCDBvSGil0M6l7Zf1G8HN/FrTl3aoIVfRoPYqLOrp/A2gnuxbdrRVeeBxw3 asowVZTZpKjxNEYyITJqnqIt/rnMuosVWahtBUbTmE6eSlHL1NB4C/L4lN0PKs6q8kCk mqGg== X-Gm-Message-State: AOAM533wJB7kUyeZJ+ePFCyopuejIkz8qB6ZxSUB34LrjKvMT58goCB4 igiq0PFAf8ntaKJGpYs+zn/hVp7cRFJEc5AC/UY= X-Google-Smtp-Source: ABdhPJyv2hvueDazkU/FYpFRvyQfOObTE/1CzBabJn5S0RsDJT6NrG2067GdRMVQPDyXa+kbVhkX09ELWrWgj2Rwpws= X-Received: by 2002:a17:907:7292:: with SMTP id dt18mr2348821ejc.667.1644421198228; Wed, 09 Feb 2022 07:39:58 -0800 (PST) MIME-Version: 1.0 References: <87a6f0nly1.fsf@gmail.com> In-Reply-To: <87a6f0nly1.fsf@gmail.com> From: Corwin Brust Date: Wed, 9 Feb 2022 09:39:46 -0600 Message-ID: Content-Type: multipart/alternative; boundary="00000000000061b21205d797a57a" X-Spam-Score: 0.5 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) --00000000000061b21205d797a57a Content-Type: text/plain; charset="UTF-8" Hi Augusto! On Wed, Feb 9, 2022, 08:39 Augusto Stoffel wrote: > > By the way, there are two issues with this code snippet. First, you > should call '(package-refresh-contents)' to make sure you have the > package list from MELPA. > I believe this was changed with the implementation of "early-init". We don't need to expressly call `package-refresh-contents' since Emacs 27, see: https://github.com/emacs-mirror/emacs/blob/master/etc/NEWS.27#L227 > 'use-package' would be subject to removal by 'package-autoremove'. To > fix this, something like > > (add-hook 'after-init-hook > (lambda () (package--update-selected-packages '(use-package) > nil))) > > is needed. > I wasn't aware of this idiosyncrasy. I will look at package.el further FTR, in my own configuration I expressly set-up package-selected-packages. In any case, this bug report stems from a Reddit user's perception of breakage with the Emacs 28 pre-release binaries recently added to alpha. I simply created a minimal reproducer from that person's use/expectations. Do you agree the (corrected) reproducer given should be sufficient to demonstrate the change provided by adding the autoload, if the patch is applied? As things stand presently, I'm having trouble thinking of use-cases for package-installed-p that would not start with (require 'package). > I think a more user-friendly 'package-ensure-installed' function is in > order here. I believe the use-package package provides some > functionality for this, but there is no good built-in equivalent (which > is needed even by use-package users). > I love this idea. Would you be interested to open a new bug report for this feature request, perhaps offering a patch if you are so inclined? FWIW, I agree that ,if/when something more robust is added expressly to support the batch installation of packages, the need for this autoload (and perhaps all user-facing use-cases for package-installed-p) may be greatly reduced. That said, it's not clear to me whether general consensus will be to support a "default automation" function (or functions) for this, or that what we have is "enough" for each of us to do things as we wish. It might make sense to open a discussion on the development list to discuss this potential improvement. Finally, in case it may help, here is a formula I have often used to 'bootstrap' a batch install of packages: (setq package-selected-packages '(foo bar baz)) (mapc (lambda(pkg) (when (not (require pkg nil t) (package-install pkg)) package-selected-packages) For myself, I'm not using `package-autoremove'. I typically remove (actually rename, usually) my ELPA folder and then relaunch Emacs. My configuration (just like the user on behalf of whom I reported this "bug"), will then install the features I'm (still) using. I'm glad you are watching out for people who do use the auto-remove package feature. Regards, Corwin --00000000000061b21205d797a57a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Augusto!

On Wed, Feb 9, 2022, 08:39= Augusto Stoffel <arstoffel@gmail.com> wrote:

By the way, there are two issues with this code snippet.=C2=A0 First, you should call '(package-refresh-contents)' to make sure you have the<= br> package list from MELPA.

=
I believe this was changed with the implementation = of "early-init".=C2=A0 We don't need to expressly call `packa= ge-refresh-contents' since Emacs 27, see:
https://github.com/ema= cs-mirror/emacs/blob/master/etc/NEWS.27#L227



'use-package' would be subject to removal by 'package-autoremov= e'.=C2=A0 To
fix this, something like

=C2=A0 =C2=A0 (add-hook 'after-init-hook
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (lambda () (package--updat= e-selected-packages '(use-package) nil)))

is needed.

I wasn't aware of this idiosyncrasy. I will look at package.e= l further=C2=A0 FTR, in my own configuration I expressly set-up package-sel= ected-packages.

In any c= ase, this bug report stems from a Reddit user's perception of breakage = with the Emacs 28 pre-release binaries recently added to alpha.=C2=A0 I sim= ply created a minimal reproducer from that person's use/expectations.

Do you agree the (corrected) reproduce= r given should be sufficient to demonstrate the change provided by adding t= he autoload, if the patch is applied?

As things st= and presently, I'm having trouble thinking of use-cases for package-ins= talled-p that would not start with (require 'package).


I think a more user-friendly 'package-ensure-installed' function is= in
order here.=C2=A0 I believe the use-package package provides some
functionality for this, but there is no good built-in equivalent (which
is needed even by use-package users).

I= love this idea.=C2=A0 Would you be interested to open a new bug report for= this feature request, perhaps offering a patch if you are so inclined?=C2= =A0=C2=A0

FWIW, I agree that ,if/when something mo= re robust is added expressly to support the batch installation of packages,= the need for this autoload (and perhaps all user-facing use-cases for pack= age-installed-p) may be greatly reduced.=C2=A0=C2=A0

That said, it's not clear to me whether general consensus will be to= support a "default automation" function (or functions) for this,= or that what we have is "enough" for each of us to do things as = we wish.=C2=A0 It might make sense to open a discussion on the development = list to discuss this potential improvement.

Finall= y, in case it may help, here is a formula I have often used to 'bootstr= ap' a batch install of packages:

(setq package-select= ed-packages '(foo bar baz))
(mapc (lambda(pkg) (when (not (re= quire pkg nil t) (package-install pkg)) package-selected-packages)

For myself, I'm not using `package-autoremove'.=C2= =A0 I typically remove (actually rename, usually) my ELPA folder and then r= elaunch Emacs.=C2=A0 My configuration (just like the user on behalf of whom= I reported this "bug"), will then install the features I'm (= still) using. I'm glad you are watching out for people who do use the a= uto-remove package feature.

Regards,
Corwin
--00000000000061b21205d797a57a-- From unknown Sun Jun 22 07:48:20 2025 X-Loop: help-debbugs@gnu.org Subject: bug#53885: 28.0.51 [PATCH] Autoload package-installed-p Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 09 Feb 2022 20:17:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53885 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: Corwin Brust , 53885@debbugs.gnu.org Received: via spool by 53885-submit@debbugs.gnu.org id=B53885.164443779632767 (code B ref 53885); Wed, 09 Feb 2022 20:17:02 +0000 Received: (at 53885) by debbugs.gnu.org; 9 Feb 2022 20:16:36 +0000 Received: from localhost ([127.0.0.1]:52843 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nHtOF-0008WC-Lk for submit@debbugs.gnu.org; Wed, 09 Feb 2022 15:16:36 -0500 Received: from quimby.gnus.org ([95.216.78.240]:39534) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nHtOD-0008Pk-Ct for 53885@debbugs.gnu.org; Wed, 09 Feb 2022 15:16:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=nHKRmGkXiDsqqVhawWmd7tkJIxbYsef+BKqEfsKqyW0=; b=Rf8mxjnc/lpnaQzoYgwxjH30G9 k3Uk6BGB1JC/v9wSBhQU3RxoKo64e02YNrqdYP3zmTxmTQCO/otZ8/YFbgILu+uFOhUcW+LeuGjEL xVt3Fsf/Du3RW79AaSNHbImFfA26HGUOLHX24wI56L56HdTFpk3s3Z5fWlTBNHTh1tAA=; Received: from [84.212.220.105] (helo=giant) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nHtO4-0006iu-Hl; Wed, 09 Feb 2022 21:16:27 +0100 From: Lars Ingebrigtsen References: <83y22kupn7.fsf@gnu.org> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAGFBMVEVPKhRiUDWKbks0 FgUjGhDZuXDUtm3///+pBA8CAAAAAWJLR0QHFmGI6wAAAAd0SU1FB+YCCRQMDLUtRl4AAAF7SURB VDjLjZPBioMwEIYnjdtzItKzltZzwH2AKLN7LgU911J9/0fYmUkEbSPsIKj/5/yTcRIAyM+pgKaB dDSNblIB8QaOLq01uDfglDAKvQFKpARwmhXtQOut1W5x18Si+g2wP/k4B/AGDC/JKAcKtgD4yfGK 9f+KJ8H3Hug2vzsrENtSwFe/jqJC/L0J+Fnr8ytHPD0S4NYRGD/BcG8RrwnQz8UO6F974L4HhhSY pJPEqobr0PcXPATQ1v39GMDYTQyOoUGv6kcn+tNkJ8koI7AXAVMJgFcCPF+2Alu09dQPkwHEenoh mPjbn1k3c1DTaOcLqgjqGdunDMNm6M+41GhpOj7ovFPMB7AGveUy2JXLaMmgIlkRwzWgaZIC1pIX g3axKunFk0xGGQNvaO9xH4tOCVnMYCCPohvF3yh7Ht0CVDAKFWw+ukYACICg02teCfBQ4KoApRwW kEUQdPRLhkUMJRZgKynuyYH8fTSSPuTIYfIU7B2cXeD+AMqs3g245F3CAAAAJXRFWHRkYXRlOmNy ZWF0ZQAyMDIyLTAyLTA5VDIwOjEyOjEyKzAwOjAw9CN9ugAAACV0RVh0ZGF0ZTptb2RpZnkAMjAy Mi0wMi0wOVQyMDoxMjoxMiswMDowMIV+xQYAAAAASUVORK5CYII= X-Now-Playing: Karen Dalton's _In My Own Time_: "Take Me" Date: Wed, 09 Feb 2022 21:16:23 +0100 In-Reply-To: <83y22kupn7.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 09 Feb 2022 15:37:48 +0200") Message-ID: <87v8xng5ig.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Eli Zaretskii writes: > It's not really a bugfix, it's an enhancement. Not sure if it's > important enough for the release branch. But it's quite simple and > probably safe. Lars, WDYT? Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) 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: > It's not really a bugfix, it's an enhancement. Not sure if it's > important enough for the release branch. But it's quite simple and > probably safe. Lars, WDYT? It should be safe for the release branch, so installing it is fine by me, but I didn't really understand the use case. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From unknown Sun Jun 22 07:48:20 2025 X-Loop: help-debbugs@gnu.org Subject: bug#53885: 28.0.51 [PATCH] Autoload package-installed-p Resent-From: Corwin Brust Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 09 Feb 2022 23:59:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53885 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Lars Ingebrigtsen Cc: Eli Zaretskii , 53885@debbugs.gnu.org Received: via spool by 53885-submit@debbugs.gnu.org id=B53885.16444511253684 (code B ref 53885); Wed, 09 Feb 2022 23:59:02 +0000 Received: (at 53885) by debbugs.gnu.org; 9 Feb 2022 23:58:45 +0000 Received: from localhost ([127.0.0.1]:53103 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nHwrF-0000xL-H3 for submit@debbugs.gnu.org; Wed, 09 Feb 2022 18:58:45 -0500 Received: from mail-ed1-f45.google.com ([209.85.208.45]:44957) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nHwrD-0000x8-Oz for 53885@debbugs.gnu.org; Wed, 09 Feb 2022 18:58:44 -0500 Received: by mail-ed1-f45.google.com with SMTP id bx2so8091376edb.11 for <53885@debbugs.gnu.org>; Wed, 09 Feb 2022 15:58:43 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=FYxlcOQkwCmwlWyFrmlC8Y0dweZbTJfIWSdco7VDNgI=; b=GHIRiIRXqYAWTOMI7QR6Z9wmAoS4G1JFAcCmK5wWmAB2wOT71muhcCwng2FPYCd9Go /cqUGJCXdbyTly5bXhG2qPDdb4/4pRb+OovvERkF4KQI5sf0w319WSUYGAK2YA98VyG1 uHpkDdjvu+/GIyP0HK3DGBrMqKlooUQnRzPpzO0l6z28hsluzQUrzj7DEKE8TXUdNQIB sn6r1q7uL3wdIdZzj25QJGgHF3pHPt+b9vk+3xhLEMzduSrgWJyHQYIBiYHRUuGpWwiB tdCukXbezssda1sT4BAlNkve982gPl/yOo1hB8iQsh6ph/AHb4besbVcE868TEXIpHf2 KT3A== X-Gm-Message-State: AOAM533K/G5SQl1oF5bgzfLGE5F7BEX5XfOQYFF/LNobjUvFt2wdJ7H7 1SGZY0z+/E+qWnhL3QmJRX5my//LVefb7uE2aTEK3r+HYiQ= X-Google-Smtp-Source: ABdhPJyrNGNGUrOdSWz2ZSLxS5ly64Ac6mCHecq3H9w+/zMsb3uP5H4fq+1mHUKpN2irbrnPI99JRoRoit5T1l2P3Xo= X-Received: by 2002:aa7:cd1a:: with SMTP id b26mr5669466edw.335.1644451117633; Wed, 09 Feb 2022 15:58:37 -0800 (PST) MIME-Version: 1.0 References: <83y22kupn7.fsf@gnu.org> <87v8xng5ig.fsf@gnus.org> In-Reply-To: <87v8xng5ig.fsf@gnus.org> From: Corwin Brust Date: Wed, 9 Feb 2022 17:58:25 -0600 Message-ID: Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.5 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) On Wed, Feb 9, 2022 at 2:16 PM Lars Ingebrigtsen wrote: > > It should be safe for the release branch, so installing it is fine by > me, but I didn't really understand the use case. Sorry I failed in making the case for users clear. The primary use-case here is "repeatable configuration", especially bootstrapping `use-package'. By "repeatable configuration" we mean, we get the same setup each time we start Emacs, even when launching for the first time on a new host. The use package feature provides an "ensure" capability that is well suited to this job. (use-package 'foo :ensure t) This appears widely used, especially to create literate Emacs configurations. For this to work, however, "bootstrapping" (installing use-package via Emacs core features) is needed. The reproducer I gave shows one way of bootstrapping use-package. Considering the similarity of my reproducer to the recipe in #31397, I think it is a fairly common approach and has been for some years. From unknown Sun Jun 22 07:48:20 2025 X-Loop: help-debbugs@gnu.org Subject: bug#53885: 28.0.51 [PATCH] Autoload package-installed-p Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 10 Feb 2022 06:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53885 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Corwin Brust Cc: larsi@gnus.org, 53885@debbugs.gnu.org Received: via spool by 53885-submit@debbugs.gnu.org id=B53885.164447346812011 (code B ref 53885); Thu, 10 Feb 2022 06:12:02 +0000 Received: (at 53885) by debbugs.gnu.org; 10 Feb 2022 06:11:08 +0000 Received: from localhost ([127.0.0.1]:53389 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nI2fb-00037f-Tt for submit@debbugs.gnu.org; Thu, 10 Feb 2022 01:11:08 -0500 Received: from eggs.gnu.org ([209.51.188.92]:40734) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nI2fa-00036e-Us for 53885@debbugs.gnu.org; Thu, 10 Feb 2022 01:11:07 -0500 Received: from [2001:470:142:3::e] (port=49784 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nI2fU-0007Tz-UI; Thu, 10 Feb 2022 01:11:01 -0500 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=zLLOG7lYmSzNI8XKqGkRuR5ySBV03EzTnWrWBmHnrRs=; b=mrMnxWAWaCuY iB5SyrrB2VUSC6W3Wu9ZUXRxaVKL3mZruqqxWXDF+jLrofyMEDXZbXmheKWCgz/H5NSC5N919HOxk Qa5fNJkUEshngRfk0HD8/5NzEZm1AORa1HozyR1CcOTH1htCvTcmz0UfUZ+3JTs2SL5uDCdBpVHJ3 LRQQjarA03wlt3lD4f4e2+9sDM3T3xFHennXC0RCL03qWX1odvslzXAmvOIGAtbdvDc7SQntdZz7n ZP6FMP++COKba3PQiqSa7I8l6yyeXH1xSlNSmevoku6t8B2XbSEBOdF+MoRtBc8vuf0bBAP9IZoFS sYnsmMp2eKA9xm0FbdL9uA==; Received: from [87.69.77.57] (port=2635 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 1nI2fM-0000zd-Er; Thu, 10 Feb 2022 01:11:00 -0500 Date: Thu, 10 Feb 2022 08:10:47 +0200 Message-Id: <83bkzfuu8o.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: (message from Corwin Brust on Wed, 9 Feb 2022 17:58:25 -0600) References: <83y22kupn7.fsf@gnu.org> <87v8xng5ig.fsf@gnus.org> X-Spam-Score: -2.3 (--) 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: Corwin Brust > Date: Wed, 9 Feb 2022 17:58:25 -0600 > Cc: Eli Zaretskii , 53885@debbugs.gnu.org > > On Wed, Feb 9, 2022 at 2:16 PM Lars Ingebrigtsen wrote: > > > > It should be safe for the release branch, so installing it is fine by > > me, but I didn't really understand the use case. > > Sorry I failed in making the case for users clear. > > The primary use-case here is "repeatable configuration", especially > bootstrapping `use-package'. > > By "repeatable configuration" we mean, we get the same setup each time > we start Emacs, even when launching for the first time on a new host. > > The use package feature provides an "ensure" capability that is well > suited to this job. > > (use-package 'foo :ensure t) > > This appears widely used, especially to create literate Emacs configurations. > > For this to work, however, "bootstrapping" (installing use-package via > Emacs core features) is needed. The reproducer I gave shows one way > of bootstrapping use-package. Considering the similarity of my > reproducer to the recipe in #31397, I think it is a fairly common > approach and has been for some years. Thanks, but I don't think I understand the relevance, probably because I don't use use-package. Why do you need package-installed-p to be autoloaded in this scenario, and why cannot use-package do that by itself? From unknown Sun Jun 22 07:48:20 2025 X-Loop: help-debbugs@gnu.org Subject: bug#53885: 28.0.51 [PATCH] Autoload package-installed-p Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 10 Feb 2022 06:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53885 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: Corwin Brust , 53885@debbugs.gnu.org Received: via spool by 53885-submit@debbugs.gnu.org id=B53885.164447554116337 (code B ref 53885); Thu, 10 Feb 2022 06:46:02 +0000 Received: (at 53885) by debbugs.gnu.org; 10 Feb 2022 06:45:41 +0000 Received: from localhost ([127.0.0.1]:53491 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nI3D3-0004FR-2y for submit@debbugs.gnu.org; Thu, 10 Feb 2022 01:45:41 -0500 Received: from quimby.gnus.org ([95.216.78.240]:44278) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nI3D1-0004F4-FQ for 53885@debbugs.gnu.org; Thu, 10 Feb 2022 01:45:39 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=YGqYUztx4SL7eHNuu4UhBY+KgUuY8jxQ2qSsMquR47I=; b=nIuikp7UhcWTigEPk71mhLmhfl Cil+YtiP3wx3C218YJlNf9BR88nu1JiSsN6KlpW7jiXU2iu87teyW8gNuZXqM8adQwTHL4pD9NT1I SFKOePfhSxCdX7c1A9rfOCN6GnRL7SQb+FqGx6PlN+yE9W+OK/O04wA5vPP0TuEedPZ0=; Received: from [84.212.220.105] (helo=giant) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nI3Cs-0003Td-7R; Thu, 10 Feb 2022 07:45:33 +0100 From: Lars Ingebrigtsen References: <83y22kupn7.fsf@gnu.org> <87v8xng5ig.fsf@gnus.org> <83bkzfuu8o.fsf@gnu.org> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAGFBMVEVqh58YExhQUVpT Zqq0uLl3jNHWhHn///+10Or2AAAAAWJLR0QHFmGI6wAAAAd0SU1FB+YCCgYlNaN5iU0AAAG0SURB VDjLdZNBc6MwDIUdcDnHTqbn2Mly3ta7nF2q9pxp8J2EGf3/n1DJ2IRQqmRIxh/vPRkLIabaKHsQ K1UoqhVSKvULKX4hcC4MA71Yl3AO5yjZLUAIHayZAa1D9Ho0A6riZJYSCSBgo5OVUrPbvfpjDlKp o3shsJ3uJ7D9OnmlnHOThNehVfvWWrUjYHIKRGC6VpgIslcUAByiLAN5noCMQI9WGnxyIoVnQOGv JNjfwYclKQFtOZv3lYA/0eUt7U/DDFh5B3STz+Fe2RNsEoAZAFakZ7iPTtnLkPGDIEuK2C3XNgkS 8V3OzoJk1mppZr1OB/X5aU3ehJ+drIApYjk+QrSLc11O4hwgCvR408sZqRB7+mCansNMgIwQb9ai WQNc1zVQ33T9AwwMrs+k2D6EV1FxrWsGJY1EkpQNeVV4rfF2dGONIvqlgTIKj4NzTdmUdzBOGg4R /HULcMR+qHizwyPYOWqDu+j7DLgP9+oIDA021CYBLz2djB9boc56Aj2Hg/Q8oglw281o9ST4m2J6 R0+gGSoOB+hoTLyEcIFAdenCRwj/L/k1IPg+/vvHl/D+DeJPonq6OgoZAAAAJXRFWHRkYXRlOmNy ZWF0ZQAyMDIyLTAyLTEwVDA2OjM3OjUzKzAwOjAwcw3UnAAAACV0RVh0ZGF0ZTptb2RpZnkAMjAy Mi0wMi0xMFQwNjozNzo1MyswMDowMAJQbCAAAAAASUVORK5CYII= X-Now-Playing: Ultra =?UTF-8?Q?Nat=C3=A9's?= _Is It Love? Ultra =?UTF-8?Q?Nat=C3=A9?= Best Remixes Volume 1_: "Rejoicing (Deep-Liteful Stomp Mix)" Date: Thu, 10 Feb 2022 07:45:29 +0100 In-Reply-To: <83bkzfuu8o.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 10 Feb 2022 08:10:47 +0200") Message-ID: <871r0bfcdy.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Eli Zaretskii writes: > Thanks, but I don't think I understand the relevance, probably because > I don't use use-package. Why do you need package-installed-p to be > autoloaded in this scenario, and why cannot use-package [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) 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: > Thanks, but I don't think I understand the relevance, probably because > I don't use use-package. Why do you need package-installed-p to be > autoloaded in this scenario, and why cannot use-package do that by > itself? Yes, that's the puzzling thing. But I've never used use-package myself -- I assumed that it was a framework built around package.el, but perhaps it's not related to package.el at all? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From unknown Sun Jun 22 07:48:20 2025 X-Loop: help-debbugs@gnu.org Subject: bug#53885: 28.0.51 [PATCH] Autoload package-installed-p Resent-From: Corwin Brust Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 10 Feb 2022 07:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53885 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Lars Ingebrigtsen Cc: Eli Zaretskii , 53885@debbugs.gnu.org Received: via spool by 53885-submit@debbugs.gnu.org id=B53885.164447773829484 (code B ref 53885); Thu, 10 Feb 2022 07:23:02 +0000 Received: (at 53885) by debbugs.gnu.org; 10 Feb 2022 07:22:18 +0000 Received: from localhost ([127.0.0.1]:53587 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nI3mT-0007fT-UY for submit@debbugs.gnu.org; Thu, 10 Feb 2022 02:22:18 -0500 Received: from mail-ej1-f49.google.com ([209.85.218.49]:35441) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nI3mS-0007f6-Io for 53885@debbugs.gnu.org; Thu, 10 Feb 2022 02:22:16 -0500 Received: by mail-ej1-f49.google.com with SMTP id y3so13153955ejf.2 for <53885@debbugs.gnu.org>; Wed, 09 Feb 2022 23:22:16 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=sdnZF80h2RC7RMwtpPOhLpZOvdX7ibhuX+6j+OEES6s=; b=yauK0QBdWq+dtGkbNncgbaVnnDqW7bIJeZj61z0sdMgYXN8oVmSRNmn3G0VyhgqgEF cvwNKf+o8A93tgkyFKTg2Dxj5ioTkZ8tACcbOAgUOzdt5lYkaYMWLLyUZWIaAH/Ao4MO uxjL2RdjsKsCCS0l/wF493PQ5FmlkH2BWwySGbC8hAXonx6fc99V/U+xChMD0EeboCcW 6YDmBewjydi/Gxg6sZS9fkAnGJS8jTyZ5FDztpX07b96+TC10EiXJ0iWzAr3kZOHK2Zx XYBzEGfq4JrB/VoChdQ5pJIweaMeaeYB640Jem+0nuF3VjGeeQb1f9GWX8ox4Eyd5jHL xeqw== X-Gm-Message-State: AOAM533xey9oaDVAaSF0GpXDCdvZcIwQamVCjjWqmFrVnaBBHbBvUSXl N/Rh/NypIrr46BWbBR7vqhuWU6pTv4dsA8+Wb6Q= X-Google-Smtp-Source: ABdhPJx4rvUbiEgjH3kJ4GV+GmvNLdAAdI/LZk8IrqsFeLLRPIe6eycyBRZANfQR4kKgwURj3kZnEk8CFeSPrL+75pA= X-Received: by 2002:a17:907:3f97:: with SMTP id hr23mr5177882ejc.578.1644477730700; Wed, 09 Feb 2022 23:22:10 -0800 (PST) MIME-Version: 1.0 References: <83y22kupn7.fsf@gnu.org> <87v8xng5ig.fsf@gnus.org> <83bkzfuu8o.fsf@gnu.org> <871r0bfcdy.fsf@gnus.org> In-Reply-To: <871r0bfcdy.fsf@gnus.org> From: Corwin Brust Date: Thu, 10 Feb 2022 01:21:59 -0600 Message-ID: Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.5 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) On Thu, Feb 10, 2022 at 12:45 AM Lars Ingebrigtsen wrote: > > Eli Zaretskii writes: > > > Thanks, but I don't think I understand the relevance, probably because > > I don't use use-package. Why do you need package-installed-p to be > > autoloaded in this scenario, and why cannot use-package do that by > > itself? > > Yes, that's the puzzling thing. But I've never used use-package > myself -- I assumed that it was a framework built around package.el, but > perhaps it's not related to package.el at all? > I'm sure I follow the logic here. If use-package isn't installed, how does it matter what relationship it may have to package.el? That said, one can replace `use-package' with any feature not present in Emacs as shipped. Perhaps the use-case is more generally expressed as such: I would like to have my init scripts automatically install a package that isn't available "out of the box", but only if that feature hasn't already been installed. As things presently stand, `package-installed-p' is nearly perfect for this, however one must take care to ensure package.el has been manually loaded before calling it, in order to avoid Emacs raising the error shown in the original report. From unknown Sun Jun 22 07:48:20 2025 X-Loop: help-debbugs@gnu.org Subject: bug#53885: 28.0.51 [PATCH] Autoload package-installed-p Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 10 Feb 2022 07:58:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53885 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Corwin Brust Cc: larsi@gnus.org, 53885@debbugs.gnu.org Received: via spool by 53885-submit@debbugs.gnu.org id=B53885.164447985418837 (code B ref 53885); Thu, 10 Feb 2022 07:58:01 +0000 Received: (at 53885) by debbugs.gnu.org; 10 Feb 2022 07:57:34 +0000 Received: from localhost ([127.0.0.1]:53681 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nI4Kc-0004tl-1D for submit@debbugs.gnu.org; Thu, 10 Feb 2022 02:57:34 -0500 Received: from eggs.gnu.org ([209.51.188.92]:34782) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nI4Ka-0004tV-Lz for 53885@debbugs.gnu.org; Thu, 10 Feb 2022 02:57:33 -0500 Received: from [2001:470:142:3::e] (port=50854 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nI4KV-000636-BA; Thu, 10 Feb 2022 02:57:27 -0500 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=I66RlFvuV9eH5icPkYGX3fOb5Hi8nkjRbKfctCFSREI=; b=au7mLcWI85R1 NVLKYBomqD4QeEF4EiVxYas+kCSpovsztx9Zq55jXaaDQlnMI+ndcc4Spl/Df1gMlrJJ3vGLtZxYL +jTB/TTwIox1CP3wL0IWBBtRO9tKPSLcg5uo8c84/8GydwzlQZ8RjdwNwRP/vcFmzh60IVS/jQPQO uC6fwjCQPdXVAwRjlLrj7Mdd7AUuOh9VpI0yn7+umjoXgdMrqgeDhAYd8Z2xc9EV5Cb9NwbrYb1xx iNQTiBi/61A6KDJ85us2uuyAqn45BfojN2vXiLmErt5DbmMFhLwrjorQ3hYUkxicQqhgYlnQmSAtr +5CpdOxZlNWxo14/yHFExQ==; Received: from [87.69.77.57] (port=1172 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 1nI4KR-0001Gs-2d; Thu, 10 Feb 2022 02:57:27 -0500 Date: Thu, 10 Feb 2022 09:57:17 +0200 Message-Id: <831r0bupb6.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: (message from Corwin Brust on Thu, 10 Feb 2022 01:21:59 -0600) References: <83y22kupn7.fsf@gnu.org> <87v8xng5ig.fsf@gnus.org> <83bkzfuu8o.fsf@gnu.org> <871r0bfcdy.fsf@gnus.org> X-Spam-Score: -2.3 (--) 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: Corwin Brust > Date: Thu, 10 Feb 2022 01:21:59 -0600 > Cc: Eli Zaretskii , 53885@debbugs.gnu.org > > On Thu, Feb 10, 2022 at 12:45 AM Lars Ingebrigtsen wrote: > > > > Eli Zaretskii writes: > > > > > Thanks, but I don't think I understand the relevance, probably because > > > I don't use use-package. Why do you need package-installed-p to be > > > autoloaded in this scenario, and why cannot use-package do that by > > > itself? > > > > Yes, that's the puzzling thing. But I've never used use-package > > myself -- I assumed that it was a framework built around package.el, but > > perhaps it's not related to package.el at all? > > > > I'm sure I follow the logic here. If use-package isn't installed, how > does it matter what relationship it may have to package.el? > > That said, one can replace `use-package' with any feature not present > in Emacs as shipped. > > Perhaps the use-case is more generally expressed as such: > > I would like to have my init scripts automatically install a package > that isn't available "out of the box", but only if that feature hasn't > already been installed. > > As things presently stand, `package-installed-p' is nearly perfect for > this, however one must take care to ensure package.el has been > manually loaded before calling it, in order to avoid Emacs raising the > error shown in the original report. Now I'm confused: which code calls package-installed-p in the scenarios you have in mind? I thought it was use-package, but you seem to say that's not the case? From unknown Sun Jun 22 07:48:20 2025 X-Loop: help-debbugs@gnu.org Subject: bug#53885: 28.0.51 [PATCH] Autoload package-installed-p Resent-From: Corwin Brust Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 10 Feb 2022 08:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53885 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: Lars Ingebrigtsen , 53885@debbugs.gnu.org Received: via spool by 53885-submit@debbugs.gnu.org id=B53885.164448059329219 (code B ref 53885); Thu, 10 Feb 2022 08:10:02 +0000 Received: (at 53885) by debbugs.gnu.org; 10 Feb 2022 08:09:53 +0000 Received: from localhost ([127.0.0.1]:53734 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nI4WX-0007bD-A8 for submit@debbugs.gnu.org; Thu, 10 Feb 2022 03:09:53 -0500 Received: from mail-ed1-f53.google.com ([209.85.208.53]:41858) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nI4WV-0007ah-Oj for 53885@debbugs.gnu.org; Thu, 10 Feb 2022 03:09:52 -0500 Received: by mail-ed1-f53.google.com with SMTP id cz16so9459180edb.8 for <53885@debbugs.gnu.org>; Thu, 10 Feb 2022 00:09:51 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=G09a7WBkH4A0xocuTpgroxMf3igYJjIPLxdzhSw2Yb4=; b=P7UDIuz3230psyz/VUFaw2emQsif5XtUrUI+Mb7PqQ8A/1QWYMEoSTxj5W6sjUhBqu VzuX96Kl2ZgyxDxpEbWwX2urkBBt8X9TPZ0IG8x3VoRYLRiv+rioIvVyAD3USU2j57HG RVfnQeVGnWL4SVbHRD20DzKFD3TP0ogXgtGRFiRwDmqfAZAsk2ILWJCEqR8H3nS0O0EV Qu4A5Le3z8/rcNBiv9/2HdKsZuie6xwtJ1xfQswn3+EDUBRoVej7ixvpdJ5TmmkusCX2 YNjHSpKHoiSZA3PuK0gzrhwuBDVgasNAbfkHrKcCpmielLxfd2FVz0X78G2y3OX4552Q btfw== X-Gm-Message-State: AOAM530Z6GvmFakx57XQAbDD/yP9WhqisrdvlqNFVsihGtt8rLrV0qv3 GYKw/nspoZ7gVZLe+VSCzPtL3DCm+hEDIEBmMpI= X-Google-Smtp-Source: ABdhPJxEHkgqPU05FbBtzeQ/ep7E2DXA2H+CIsddFqh0u3ABd+4qNKcAKHIlNVhjGDtZwp0XKN7e6Q1BPvPJYafTylY= X-Received: by 2002:a50:bb0a:: with SMTP id y10mr7107984ede.441.1644480585740; Thu, 10 Feb 2022 00:09:45 -0800 (PST) MIME-Version: 1.0 References: <83y22kupn7.fsf@gnu.org> <87v8xng5ig.fsf@gnus.org> <83bkzfuu8o.fsf@gnu.org> <871r0bfcdy.fsf@gnus.org> <831r0bupb6.fsf@gnu.org> In-Reply-To: <831r0bupb6.fsf@gnu.org> From: Corwin Brust Date: Thu, 10 Feb 2022 02:09:34 -0600 Message-ID: Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.5 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) On Thu, Feb 10, 2022 at 1:57 AM Eli Zaretskii wrote: > > Now I'm confused: which code calls package-installed-p in the > scenarios you have in mind? I thought it was use-package, but you > seem to say that's not the case? The user's Emacs configuration, e.g. init.el From unknown Sun Jun 22 07:48:20 2025 X-Loop: help-debbugs@gnu.org Subject: bug#53885: 28.0.51 [PATCH] Autoload package-installed-p Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 10 Feb 2022 08:19:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53885 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Corwin Brust Cc: larsi@gnus.org, 53885@debbugs.gnu.org Received: via spool by 53885-submit@debbugs.gnu.org id=B53885.16444811176712 (code B ref 53885); Thu, 10 Feb 2022 08:19:02 +0000 Received: (at 53885) by debbugs.gnu.org; 10 Feb 2022 08:18:37 +0000 Received: from localhost ([127.0.0.1]:53770 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nI4ez-0001kB-6V for submit@debbugs.gnu.org; Thu, 10 Feb 2022 03:18:37 -0500 Received: from eggs.gnu.org ([209.51.188.92]:40864) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nI4ex-0001jw-37 for 53885@debbugs.gnu.org; Thu, 10 Feb 2022 03:18:36 -0500 Received: from [2001:470:142:3::e] (port=51154 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nI4er-0005AL-I5; Thu, 10 Feb 2022 03:18:29 -0500 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=THFENMYOwNP4VviUh6LenVKRnhxYzrPuG/OAbpNqVSA=; b=Cq/vM1R8KGw5 GWojFygXMwCeDpqJhV2UBX8R5Sa1wJZOTN3qIzEqvn89i4bd7+ep81FRzRe/TvjIE1PXpih9+xyRq 0mRJ2yHl6XKV6DujECmDP9MblYoDEuiUeBK2cntQS5gBlXeLOgKxKiBP7QF3W/7K5QWoD8T/8hO24 NDu73OIdxo3/ogjerloNNT7VataWRMCuyCad0rcO7i311CBmIEVJh4KXOjDQAH14FoKhsV8ur683W nHTNjP6J7528wJeUci4rtHhCpxGGE8TwJVXk3vsQg4UMlqbui3Yn46/Fxe3ozy0v2wgkkJBz+GeWT 56b9pYsI43jH0RtV2VIPOQ==; Received: from [87.69.77.57] (port=2455 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 1nI4eq-0006EX-Mt; Thu, 10 Feb 2022 03:18:29 -0500 Date: Thu, 10 Feb 2022 10:18:22 +0200 Message-Id: <83y22jt9rl.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: (message from Corwin Brust on Thu, 10 Feb 2022 02:09:34 -0600) References: <83y22kupn7.fsf@gnu.org> <87v8xng5ig.fsf@gnus.org> <83bkzfuu8o.fsf@gnu.org> <871r0bfcdy.fsf@gnus.org> <831r0bupb6.fsf@gnu.org> X-Spam-Score: -2.3 (--) 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: Corwin Brust > Date: Thu, 10 Feb 2022 02:09:34 -0600 > Cc: Lars Ingebrigtsen , 53885@debbugs.gnu.org > > On Thu, Feb 10, 2022 at 1:57 AM Eli Zaretskii wrote: > > > > Now I'm confused: which code calls package-installed-p in the > > scenarios you have in mind? I thought it was use-package, but you > > seem to say that's not the case? > > The user's Emacs configuration, e.g. init.el Why do users do that without making sure the relevant feature is loaded? And what makes package-installed-p special in this case? From unknown Sun Jun 22 07:48:20 2025 X-Loop: help-debbugs@gnu.org Subject: bug#53885: 28.0.51 [PATCH] Autoload package-installed-p Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 10 Feb 2022 08:42:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53885 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Corwin Brust Cc: Eli Zaretskii , 53885@debbugs.gnu.org Received: via spool by 53885-submit@debbugs.gnu.org id=B53885.164448252018517 (code B ref 53885); Thu, 10 Feb 2022 08:42:02 +0000 Received: (at 53885) by debbugs.gnu.org; 10 Feb 2022 08:42:00 +0000 Received: from localhost ([127.0.0.1]:53859 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nI51b-0004oY-7S for submit@debbugs.gnu.org; Thu, 10 Feb 2022 03:42:00 -0500 Received: from quimby.gnus.org ([95.216.78.240]:45980) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nI51S-0004oB-3w for 53885@debbugs.gnu.org; Thu, 10 Feb 2022 03:41:57 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=9WAVyrOpGog9cgXQaFWaqUVG1VI5JKj96aJnbLKjcSg=; b=EY6j1W7rZ/ryK/WrdxFDg5u9b2 /Bnj+JkD+G8xMwbklGGcpl5+wd/OUp6QzBJso3H88seTr0kOPPi6ZFDWlpiGTmWm7spO90cowf24b nrd2WJThEDcRn6P3JR1LsnQdiunimIT8EjPDZ6FN9QcF4jvt2b2fKzY/QAF6Tppi84qg=; Received: from [84.212.220.105] (helo=giant) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nI51J-0004fD-De; Thu, 10 Feb 2022 09:41:44 +0100 From: Lars Ingebrigtsen References: <83y22kupn7.fsf@gnu.org> <87v8xng5ig.fsf@gnus.org> <83bkzfuu8o.fsf@gnu.org> <871r0bfcdy.fsf@gnus.org> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAIVBMVEX27tn1797QxrqU jImKgX2Ee3hvZ2crJihDOz5STE3////GrS5UAAAAAWJLR0QKaND0VgAAAAd0SU1FB+YCCggdGhWp JeUAAAGDSURBVDjLjZJNboMwEIWHngBu0B+p6wiSqnvMCQBL3VbCiS8Qc4IwbFsJ4dt2xoZgKpDy pAR437w3TgRAoDiZFcNa0Z0kPLdJ1j4pSPxTAnEUbYJoIxEuj+KNBQ5s++uq5KHEQ1XRHoA9ED90 qp0VCbxuCyDbEWTiWAlRnYQQayCKmiT4K8tDQEaZvmWn2qnKsqOYElVRHN6NB1VVZ0VZHfPcJeQh 6mQtG7ptHC+LPAdyVPqMUqmmljzFgD6U+BrSJzPcmg9FUEpO0YFAKTneZI8ezGoaAmfjpIcAqHoB l2sIOHFx/nWdUAS0tdbYtT0DvQU0gQsBrelRh4CabGudtF2AVtYqjeTey/R9hwfBGjohWK4ae1+l iE0DQFupGz0Yp+vAwNIDTolABHrX1c/TC2DNiXEB2HLVenqgE8DIJvo/2NCuuRFoumsR0bTLCbTu ezDkYI/+sGhH85PSG5qewfpfyBlXNn6z//IJnYuw76oQf+ltK/MLA9N2OC9A0/FtZ/4A7BBH78of cLkAAAAldEVYdGRhdGU6Y3JlYXRlADIwMjItMDItMTBUMDg6Mjk6MjYrMDA6MDAOURHhAAAAJXRF WHRkYXRlOm1vZGlmeQAyMDIyLTAyLTEwVDA4OjI5OjI2KzAwOjAwfwypXQAAAABJRU5ErkJggg== X-Now-Playing: Contriva's _If you had stayed..._: "instead" Date: Thu, 10 Feb 2022 09:41:40 +0100 In-Reply-To: (Corwin Brust's message of "Thu, 10 Feb 2022 01:21:59 -0600") Message-ID: <877da39kqj.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Corwin Brust writes: > I would like to have my init scripts automatically install a package > that isn't available "out of the box", but only if that feature hasn't > already been installed. > > As things presently stand, [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) 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 (---) Corwin Brust writes: > I would like to have my init scripts automatically install a package > that isn't available "out of the box", but only if that feature hasn't > already been installed. > > As things presently stand, `package-installed-p' is nearly perfect for > this, however one must take care to ensure package.el has been > manually loaded before calling it, in order to avoid Emacs raising the > error shown in the original report. Oh, I see -- this has nothing to do with use-package, and you could have used some other package manager. You just want to be able to check whether a package is installed in .emacs (without saying `require 'package') which seems reasonable to me. However, this comes firmly under "new functionality" and not "bug fix", so I'm not sure we should put it in emacs-28 at this point, no matter how innocuous it looks like. But if Eli thinks otherwise, I won't object. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From unknown Sun Jun 22 07:48:20 2025 X-Loop: help-debbugs@gnu.org Subject: bug#53885: Autoload package-installed-p Resent-From: Augusto Stoffel Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 10 Feb 2022 08:43:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53885 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Corwin Brust , Philip Kaludercic Cc: Lars Ingebrigtsen , Eli Zaretskii , 53885@debbugs.gnu.org Received: via spool by 53885-submit@debbugs.gnu.org id=B53885.164448257218628 (code B ref 53885); Thu, 10 Feb 2022 08:43:01 +0000 Received: (at 53885) by debbugs.gnu.org; 10 Feb 2022 08:42:52 +0000 Received: from localhost ([127.0.0.1]:53863 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nI52S-0004qN-Bc for submit@debbugs.gnu.org; Thu, 10 Feb 2022 03:42:52 -0500 Received: from mail-ed1-f43.google.com ([209.85.208.43]:38667) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nI52Q-0004q6-43 for 53885@debbugs.gnu.org; Thu, 10 Feb 2022 03:42:51 -0500 Received: by mail-ed1-f43.google.com with SMTP id cn6so9619525edb.5 for <53885@debbugs.gnu.org>; Thu, 10 Feb 2022 00:42:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=T0JIJGvqEBwKoCyKo2aRYnIa1YDK9ZNHdfyQNM9Mius=; b=L3oRdaW0ak79x0jiyMsBodcl8EtET2bzmjAqMphvaeFXvvddSIZpZvQ5R6Ud5rQlx4 TBtT/C4Vh5pGWzwifEp8jnUvU347NW138sR6Y5Xb41CZuA0Vlmy0NcuKxWEvupj5eUBs 3j31rgn30EDlSYO0R21jutCToDGbSXTGwCykwBpDlVd1SxLjEfMD+CYR2Iv9wuGMfnxp n99nTFMqlYLG7c8usCYfXVLcL4gVZK3BfItAHXUmLK0IOHfswy/m8KDreSlmeJMsWwTk 6Fm3C8hfq15NpaWPFplW/MHnDLqLpU+3aXC74Tipoz8CfhOI5PZ6YNs7VtxWAeY4nDYp Ydzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=T0JIJGvqEBwKoCyKo2aRYnIa1YDK9ZNHdfyQNM9Mius=; b=xO8qgyTqffKT6zqRs6uZaL7Yen//WehrR2BelW+JB+EE7WWPnM7CZ3B3VS3H3SqTW7 CIsITMaEEv3kHjNMmdQa2L4y9pQ8EXWqsE6GU2e+QaJRFypps9x5oQSt+r4utaVs31cG VW0pv9XPg4hMFWtcElj/OOczg/OQuBLrqreG1agI38x2uL+xbw0r0vZ2DqQYwx1ByFJU IO2151lgb29r8ZQAUNyE7NXeNX0eKko3cQujh3U1HdFtxvFVtRN/XKwPRi1aMncAwKkg Okad2RX4mC6q2UuDSBwdOAjH54m8BBODmRSpgwfXc1wl/Hla6JOAC/HvCmYdfw0TLA65 DbhA== X-Gm-Message-State: AOAM531hundzRj8Pa6BWH+dHmrwd3b31Ro6KbYZE3o+svkhKnJ/D55Vu QLAH7yEPaeSJwhexwbF7dQU= X-Google-Smtp-Source: ABdhPJzxiZhJRa13A6fE4kmIffiPub/x1KyhwZ06PROeFtUQqI4JuuHKLFTQBBbbV2+QXHVyLHG4+g== X-Received: by 2002:a05:6402:5145:: with SMTP id n5mr7209248edd.109.1644482564106; Thu, 10 Feb 2022 00:42:44 -0800 (PST) Received: from ars3 ([2a02:8109:8ac0:56d0::758e]) by smtp.gmail.com with ESMTPSA id eo14sm6071610edb.46.2022.02.10.00.42.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Feb 2022 00:42:43 -0800 (PST) From: Augusto Stoffel References: <87a6f0nly1.fsf@gmail.com> Date: Thu, 10 Feb 2022 09:42:41 +0100 In-Reply-To: (Corwin Brust's message of "Wed, 9 Feb 2022 09:39:46 -0600") Message-ID: <87y22jm7su.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) 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 (-) Hi Corwin, On Wed, 9 Feb 2022 at 09:39, Corwin Brust wrote: > Hi Augusto! > > On Wed, Feb 9, 2022, 08:39 Augusto Stoffel wrote: > > By the way, there are two issues with this code snippet. First, you > should call '(package-refresh-contents)' to make sure you have the > package list from MELPA. > > I believe this was changed with the implementation of "early-init". We don't need to expressly call > `package-refresh-contents' since Emacs 27, see: > https://github.com/emacs-mirror/emacs/blob/master/etc/NEWS.27#L227 This is a different matter. What I was saying is, you need to download the package list from MELPA before trying to install a missing package. If you delete ~/.emacs.d/elpa, your configuration as you showed it won't be able to bootstrap. > 'use-package' would be subject to removal by 'package-autoremove'. To > fix this, something like > > (add-hook 'after-init-hook > (lambda () (package--update-selected-packages '(use-package) nil))) > > is needed. > > I wasn't aware of this idiosyncrasy. I will look at package.el further FTR, in my own configuration I > expressly set-up package-selected-packages. > > In any case, this bug report stems from a Reddit user's perception of breakage with the Emacs 28 > pre-release binaries recently added to alpha. I simply created a minimal reproducer from that > person's use/expectations. > > Do you agree the (corrected) reproducer given should be sufficient to demonstrate the change > provided by adding the autoload, if the patch is applied? > > As things stand presently, I'm having trouble thinking of use-cases for package-installed-p that > would not start with (require 'package). > > I think a more user-friendly 'package-ensure-installed' function is in > order here. I believe the use-package package provides some > functionality for this, but there is no good built-in equivalent (which > is needed even by use-package users). > > I love this idea. Would you be interested to open a new bug report for this feature request, perhaps > offering a patch if you are so inclined? I recall Philip giving a similar suggestion on the mailing list but I can't find that thread anymore. So I added him to this message. > FWIW, I agree that ,if/when something more robust is added expressly to support the batch > installation of packages, the need for this autoload (and perhaps all user-facing use-cases for > package-installed-p) may be greatly reduced. Autoloading 'package-installed-p' wouldn't cause any harm, but it also doesn't solve any problems, so why bother? > That said, it's not clear to me whether general consensus will be to support a "default automation" > function (or functions) for this, or that what we have is "enough" for each of us to do things as we > wish. It might make sense to open a discussion on the development list to discuss this potential > improvement. > > Finally, in case it may help, here is a formula I have often used to 'bootstrap' a batch install of > packages: > > (setq package-selected-packages '(foo bar baz)) > (mapc (lambda(pkg) (when (not (require pkg nil t) (package-install pkg)) > package-selected-packages) > > For myself, I'm not using `package-autoremove'. I typically remove (actually rename, usually) my > ELPA folder and then relaunch Emacs. My configuration (just like the user on behalf of whom I > reported this "bug"), will then install the features I'm (still) using. I'm glad you are watching out for > people who do use the auto-remove package feature. > > Regards, > Corwin From unknown Sun Jun 22 07:48:20 2025 X-Loop: help-debbugs@gnu.org Subject: bug#53885: 28.0.51 [PATCH] Autoload package-installed-p Resent-From: Corwin Brust Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 10 Feb 2022 08:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53885 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Lars Ingebrigtsen Cc: Eli Zaretskii , 53885@debbugs.gnu.org Received: via spool by 53885-submit@debbugs.gnu.org id=B53885.164448296728333 (code B ref 53885); Thu, 10 Feb 2022 08:50:02 +0000 Received: (at 53885) by debbugs.gnu.org; 10 Feb 2022 08:49:27 +0000 Received: from localhost ([127.0.0.1]:53888 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nI58p-0007Mv-8H for submit@debbugs.gnu.org; Thu, 10 Feb 2022 03:49:27 -0500 Received: from mail-ej1-f41.google.com ([209.85.218.41]:44880) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nI58m-0007Mg-Ht for 53885@debbugs.gnu.org; Thu, 10 Feb 2022 03:49:25 -0500 Received: by mail-ej1-f41.google.com with SMTP id ka4so13434012ejc.11 for <53885@debbugs.gnu.org>; Thu, 10 Feb 2022 00:49:24 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=UELPaOuCFO+hqmC1CBD3XilQ1+VvV8UYO2HuImH0C6A=; b=lFdcDmhVrRwFUrhG1nYd1V+f3Zsw3UzpCB73fnSYcO26XE+ZcdmckUSEQmPQiCRm4w CZNyhu5zPf+oUPq+DA8tzH4nwwK31mLPautVbKHkQ+2uZDDUKGnqXxMZRp+ImIIDJnfk v3R8Vmg66QI4hWcSkgUuI4vl3JPJOqFvCT07lc/DLxJGdn+7k6fOxt7iRpHPfDC/up5j 0hiQTCKTsMOzj0ETLL1u96D9hlMN4eqyn/ZLIGttEtqMXfdajWQpX1Jx/rnVU9QmZ8GS oEJpZCzX48tJ4BwOSHXFbQkijqVeOJ3aBlFRdCjxw8jfQKOQdcghy9pUEbuiEqK6pyjB ST9A== X-Gm-Message-State: AOAM530Bpfs4bdIOeAZRYtYMjrB+K6Wliumoxm/on4niwvs0dLN2xyiT iUhO1c6CTyzzv/S0Em+adYAwyRIMy5V47vlX7y4= X-Google-Smtp-Source: ABdhPJy7FkCWkODF2zbd+0xYQoXnfCyc96xDD/PfbCMkHkA3SnGotgadYDabONhEOVgnQD3SGDBwsdZH/ocFBIskBew= X-Received: by 2002:a17:907:3f97:: with SMTP id hr23mr5402499ejc.578.1644482958706; Thu, 10 Feb 2022 00:49:18 -0800 (PST) MIME-Version: 1.0 References: <83y22kupn7.fsf@gnu.org> <87v8xng5ig.fsf@gnus.org> <83bkzfuu8o.fsf@gnu.org> <871r0bfcdy.fsf@gnus.org> <877da39kqj.fsf@gnus.org> In-Reply-To: <877da39kqj.fsf@gnus.org> From: Corwin Brust Date: Thu, 10 Feb 2022 02:49:06 -0600 Message-ID: Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.5 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) On Thu, Feb 10, 2022 at 2:41 AM Lars Ingebrigtsen wrote: > > Corwin Brust writes: > > > I would like to have my init scripts automatically install a package > > that isn't available "out of the box", but only if that feature hasn't > > already been installed. > > > > As things presently stand, `package-installed-p' is nearly perfect for > > this, however one must take care to ensure package.el has been > > manually loaded before calling it, in order to avoid Emacs raising the > > error shown in the original report. > > Oh, I see -- this has nothing to do with use-package, and you could have > used some other package manager. You just want to be able to check > whether a package is installed in .emacs (without saying `require > 'package') which seems reasonable to me. Thanks much. I've been struggling to reply to Ell's last succinctly, but maybe your response has helped clarify and thus saved me from that. Eli, please let me know if you have further what/why questions, otherwise > > However, this comes firmly under "new functionality" and not "bug fix", > so I'm not sure we should put it in emacs-28 at this point, no matter > how innocuous it looks like. But if Eli thinks otherwise, I won't > object. Fine by me either way. From unknown Sun Jun 22 07:48:20 2025 X-Loop: help-debbugs@gnu.org Subject: bug#53885: Autoload package-installed-p Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 10 Feb 2022 09:00:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53885 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Augusto Stoffel Cc: Lars Ingebrigtsen , Corwin Brust , Eli Zaretskii , 53885@debbugs.gnu.org Received: via spool by 53885-submit@debbugs.gnu.org id=B53885.164448358729533 (code B ref 53885); Thu, 10 Feb 2022 09:00:03 +0000 Received: (at 53885) by debbugs.gnu.org; 10 Feb 2022 08:59:47 +0000 Received: from localhost ([127.0.0.1]:53915 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nI5Ip-0007gH-KC for submit@debbugs.gnu.org; Thu, 10 Feb 2022 03:59:47 -0500 Received: from mout01.posteo.de ([185.67.36.65]:37315) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nI5In-0007g0-5X for 53885@debbugs.gnu.org; Thu, 10 Feb 2022 03:59:46 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 3CD5D240029 for <53885@debbugs.gnu.org>; Thu, 10 Feb 2022 09:59:39 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1644483579; bh=zIJqATDMKSWIiVsTmHoLUQixEsfckDBBT+pzsNA8Kws=; h=From:To:Cc:Subject:Autocrypt:Date:From; b=e+oYFdXQlprSJbgpsuFTNVYJxOziiyOZET9RCaIr6GF1+DLKuAg31MWIjS53+DTei zLn/F6xzpT7+YxqrD62sJ1G2d8OAymfPDnpCVrKoDlZIDXO+5baiq+HW7woSzBEKNr 0L4PrMi2zVJVp6WJhv9FzaPDfYpd0hnKZRsGOzKRCyQZOZ/5EbphrjsQ5fWQq/wPIX vQZHdPlxB536NcnEO2WH0Dz5IVtCYwJRZz7XsiSz5uY14OJZZ7ixaV/GLJ4vFOsg90 zpeD4OOXN58WNnIRJQlRjSvtrufwd/JK/XDRk1vklw+Y1rGEJ1eftkZRATwnjoiTNi ow2m/cWG5s1KA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4JvW0B0r7Qz9rxB; Thu, 10 Feb 2022 09:59:37 +0100 (CET) From: Philip Kaludercic References: <87a6f0nly1.fsf@gmail.com> <87y22jm7su.fsf@gmail.com> Autocrypt: addr=philipk@posteo.net; prefer-encrypt=nopreference; keydata= mDMEYHHqUhYJKwYBBAHaRw8BAQdAp3GdmYJ6tm5McweY6dEvIYIiry+Oz9rU4MH6NHWK0Ee0QlBo aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0 ZW8ubmV0PoiQBBMWCAA4FiEEDM2H44ZoPt9Ms0eHtVrAHPRh1FwFAmBx6lICGwMFCwkIBwIGFQoJ CAsCBBYCAwECHgECF4AACgkQtVrAHPRh1FyTkgEAjlbGPxFchvMbxzAES3r8QLuZgCxeAXunM9gh io0ePtUBALVhh9G6wIoZhl0gUCbQpoN/UJHI08Gm1qDob5zDxnIHuDgEYHHqUhIKKwYBBAGXVQEF AQEHQNcRB+MUimTMqoxxMMUERpOR+Q4b1KgncDZkhrO2ql1tAwEIB4h4BBgWCAAgFiEEDM2H44Zo Pt9Ms0eHtVrAHPRh1FwFAmBx6lICGwwACgkQtVrAHPRh1Fw1JwD/Qo7kvtib8jy7puyWrSv0MeTS g8qIxgoRWJE/KKdkCLEA/jb9b9/g8nnX+UcwHf/4VfKsjExlnND3FrBviXUW6NcB Date: Thu, 10 Feb 2022 08:59:37 +0000 In-Reply-To: <87y22jm7su.fsf@gmail.com> (Augusto Stoffel's message of "Thu, 10 Feb 2022 09:42:41 +0100") Message-ID: <87v8xn14hy.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) 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 (---) Augusto Stoffel writes: >> I think a more user-friendly 'package-ensure-installed' function is in >> order here. I believe the use-package package provides some >> functionality for this, but there is no good built-in equivalent (which >> is needed even by use-package users). >> >> I love this idea. Would you be interested to open a new bug report for this feature request, perhaps >> offering a patch if you are so inclined? > > I recall Philip giving a similar suggestion on the mailing list but I > can't find that thread anymore. So I added him to this message. Sadly I don't remember either, nor what the thread was about, but I agree that such a function would be useful to have. -- Philip Kaludercic From unknown Sun Jun 22 07:48:20 2025 X-Loop: help-debbugs@gnu.org Subject: bug#53885: Autoload package-installed-p Resent-From: Corwin Brust Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 10 Feb 2022 09:24:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53885 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Augusto Stoffel Cc: Philip Kaludercic , Lars Ingebrigtsen , 53885@debbugs.gnu.org Received: via spool by 53885-submit@debbugs.gnu.org id=B53885.16444850188672 (code B ref 53885); Thu, 10 Feb 2022 09:24:02 +0000 Received: (at 53885) by debbugs.gnu.org; 10 Feb 2022 09:23:38 +0000 Received: from localhost ([127.0.0.1]:53959 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nI5ft-0002Fo-WF for submit@debbugs.gnu.org; Thu, 10 Feb 2022 04:23:38 -0500 Received: from mail-ed1-f43.google.com ([209.85.208.43]:36559) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nI5fs-0002FY-Hv for 53885@debbugs.gnu.org; Thu, 10 Feb 2022 04:23:36 -0500 Received: by mail-ed1-f43.google.com with SMTP id s7so9851539edd.3 for <53885@debbugs.gnu.org>; Thu, 10 Feb 2022 01:23:36 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=I2/+NI4ihiNbzCXUEr/giqcNB9tFOs7Vmbs4l2ebJ5A=; b=LNJHRw3BSyQ4Zcs+wi9HFeep0m+Rx4gkeftPNgAvswLTeahEcAF9nUoQAIF7iRjuAX YS+gC2hUTpJmlBCBciDaeH62GzjssxlPkz9g2AXKCNItzVNNALKkStX1qdwUd81qVusw WTEzNLrWk7iPn3Ontrn4v+Q1Ny1HVKZiIBx/3jyQcpb2VYr2PaZYLzD6ox7EZrSDRyJf XjDYlb5AghdmHi3O/+UtTn9XlfwxKlUTYzxLKT83nWKFklyxOvthFsOHe1w3SyydMcCi cZJOqEIUmVsllVYc6CA+oPOW513mR9YrM+J2r7QghRZNIpnZYhRmggzkuQ7DCy4aG9XM JJVA== X-Gm-Message-State: AOAM530xHrg8RxU8kU5oEWcLeBuGO0F7k90ft8MmC7nN+r+NJ2G6/NMA EPcR46bVy6lNdQZYHfhEOEBrKBoO5UFh9CvblEo= X-Google-Smtp-Source: ABdhPJxZSZr2OSpwW+dzQB9xwzjiGw+r2lqJYU4af4QBgtMk5YD1WuVqbjFxJo5Vj0tZuu7bO7E79CnErzThE9MYALA= X-Received: by 2002:a05:6402:f17:: with SMTP id i23mr7333423eda.196.1644485010741; Thu, 10 Feb 2022 01:23:30 -0800 (PST) MIME-Version: 1.0 References: <87a6f0nly1.fsf@gmail.com> <87y22jm7su.fsf@gmail.com> In-Reply-To: <87y22jm7su.fsf@gmail.com> From: Corwin Brust Date: Thu, 10 Feb 2022 03:23:19 -0600 Message-ID: Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.5 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) On Thu, Feb 10, 2022 at 3:06 AM Augusto Stoffel wrote: > > On Wed, 9 Feb 2022 at 09:39, Corwin Brust wrote: > > > On Wed, Feb 9, 2022, 08:39 Augusto Stoffel wrote: > > > > By the way, there are two issues with this code snippet. First, you > > should call '(package-refresh-contents)' to make sure you have the > > package list from MELPA. > > > > I believe this was changed with the implementation of "early-init". We don't need to expressly call > > `package-refresh-contents' since Emacs 27, see: > > https://github.com/emacs-mirror/emacs/blob/master/etc/NEWS.27#L227 > > This is a different matter. What I was saying is, you need to download > the package list from MELPA before trying to install a missing package. This is taken care of by a call to package-installed-p in the case where it does not receive a package description as the first argument and when no min-version is passed, as in my "reproducer". Or maybe I still don't understand. > If you delete ~/.emacs.d/elpa, your configuration as you showed it won't > be able to bootstrap. I don't think I called for deleting anything; I just set-up a non-standard place for the installation of packages. But I suspect I'm missing your point. > > Autoloading 'package-installed-p' wouldn't cause any harm, but it also > doesn't solve any problems, so why bother? Here I don't agree. Consider: (when (not (package-installed-p 'foo)) (package-install-package 'foo)) This seems to DTRT; the package does get installed whereas in the present world a backtrace is triggered unless we first take care to load package.el. From unknown Sun Jun 22 07:48:20 2025 X-Loop: help-debbugs@gnu.org Subject: bug#53885: Autoload package-installed-p Resent-From: Augusto Stoffel Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 10 Feb 2022 09:29:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53885 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Philip Kaludercic Cc: Lars Ingebrigtsen , Corwin Brust , Eli Zaretskii , 53885@debbugs.gnu.org Received: via spool by 53885-submit@debbugs.gnu.org id=B53885.16444852999211 (code B ref 53885); Thu, 10 Feb 2022 09:29:01 +0000 Received: (at 53885) by debbugs.gnu.org; 10 Feb 2022 09:28:19 +0000 Received: from localhost ([127.0.0.1]:53970 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nI5kR-0002OV-3X for submit@debbugs.gnu.org; Thu, 10 Feb 2022 04:28:19 -0500 Received: from mail-ej1-f50.google.com ([209.85.218.50]:41784) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nI5kP-0002OH-4W for 53885@debbugs.gnu.org; Thu, 10 Feb 2022 04:28:17 -0500 Received: by mail-ej1-f50.google.com with SMTP id a8so13732582ejc.8 for <53885@debbugs.gnu.org>; Thu, 10 Feb 2022 01:28:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=ajtZ2gtMhubqQzugrMceyuuYfCDqkjmrNj6AC7lOdrM=; b=b23aYcUHYPOVxz/tC0F7p7hud/unzNFcjsBD1mwrOijU6WPG8ChwBIGPZhxtjjtX2Q XLu8Zf/C3rGcbjrERNB9K5Cp45JAksY6/T2AbznLjkKniCif+SjF7KMNJhAZl4fW0E32 tBVShExWOZ6ANYtMZfOhCFRJmvHcjkgcKqpMSo5zzc0bkoS6tb77y7imswmgeRltJNu2 qqg0I5pSPklQCFwAuBWVI5qXqFwEF1NM8xUKitSPJXLNs0OYW4rc0yWH1eDOwHIjJr/K e1bxt+7zOe44CIZUrm/B8RIWqX7kmUtZNlwgd/rQnBlrgbWTXJJWecRTmmfVI4Mq1CNj 86+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=ajtZ2gtMhubqQzugrMceyuuYfCDqkjmrNj6AC7lOdrM=; b=ojYm23jY/ziDh0vIXSK34/o0FzPsyJ9tCZDGNke4mke0J3AGeEeLTFBAVDmPR0ZINp nB6cCgbHitbKZuVoJnfHq31CGZQEWXVGySP1s2Ocb1U8cvPxLFIQ0SfVXyPaRtRKfsCX DekNVRT4ylNyT54WzaCCEOITdvPf92sVgv5vSMb8Lm4DBP1+6DZfPkQ22aPXFZ64uBN6 o8KWZnfhtEFnVkMjQbx/bUbkuXY1Alpv3Sc6dMiKabOr2gqntrlkrhm7IJWQrifwZFSZ Fg+qoHRuRQoX31Yr6rGzMGqxkZ5q5z1UsYYyfV59NRYDNJv3DE82K+uHJbcidH6tmYeb voVw== X-Gm-Message-State: AOAM531FNDfStDph5fOrDkilDXVZUNJGK6miYAykOxALaKsSHiKn503R k2N75RF9wkn8xhghaWy13Ek= X-Google-Smtp-Source: ABdhPJyE8Lo/LDy3Wwmur0n6o2LmKWtNY4X1ryk6ApmI6yI23M6taqc3uMKbOZyljFziRZm7SAHE4g== X-Received: by 2002:a17:906:7a10:: with SMTP id d16mr5639340ejo.290.1644485291259; Thu, 10 Feb 2022 01:28:11 -0800 (PST) Received: from ars3 ([2a02:8109:8ac0:56d0::758e]) by smtp.gmail.com with ESMTPSA id o4sm4226213edq.45.2022.02.10.01.28.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Feb 2022 01:28:10 -0800 (PST) From: Augusto Stoffel References: <87a6f0nly1.fsf@gmail.com> <87y22jm7su.fsf@gmail.com> <87v8xn14hy.fsf@posteo.net> Date: Thu, 10 Feb 2022 10:28:09 +0100 In-Reply-To: <87v8xn14hy.fsf@posteo.net> (Philip Kaludercic's message of "Thu, 10 Feb 2022 08:59:37 +0000") Message-ID: <87r18bul3q.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) 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 Thu, 10 Feb 2022 at 08:59, Philip Kaludercic wrote: > Sadly I don't remember either, nor what the thread was about, but I > agree that such a function would be useful to have. IIRC, you suggested adding a file called site-lisp.el which included some stuff useful in this context. In general I thought that little library was a very good idea. From unknown Sun Jun 22 07:48:20 2025 X-Loop: help-debbugs@gnu.org Subject: bug#53885: Autoload package-installed-p Resent-From: Augusto Stoffel Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 10 Feb 2022 09:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53885 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Corwin Brust Cc: Philip Kaludercic , Lars Ingebrigtsen , 53885@debbugs.gnu.org Received: via spool by 53885-submit@debbugs.gnu.org id=B53885.16444854579590 (code B ref 53885); Thu, 10 Feb 2022 09:31:02 +0000 Received: (at 53885) by debbugs.gnu.org; 10 Feb 2022 09:30:57 +0000 Received: from localhost ([127.0.0.1]:53974 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nI5mz-0002Ub-G9 for submit@debbugs.gnu.org; Thu, 10 Feb 2022 04:30:57 -0500 Received: from mail-ed1-f42.google.com ([209.85.208.42]:43661) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nI5mw-0002UF-R4 for 53885@debbugs.gnu.org; Thu, 10 Feb 2022 04:30:55 -0500 Received: by mail-ed1-f42.google.com with SMTP id y17so7917856edd.10 for <53885@debbugs.gnu.org>; Thu, 10 Feb 2022 01:30:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=tuEr7cQRmo+KCRBcc1MqAhbLBHYDE13/2/CbxmABZBw=; b=hb0vM926FlfYFLWcIW76W+gxQPXZJa1NSSeFoSipibwc4swqyh9BEDkAe/V7ESUIB0 zqty/XQZVbsfNbaon+FJXWlljUT2zRAxly30e9BXqnUJt56A57RVGM3LfY0RD94eEjhF OSh2MwQ/pj/cS3CIgAEeeF8lTJmRGvHKkdoOsTFIACXlPUqeddxlAwPikr55Awo8Npph WwD1fkxN/GsUXeccx5DsmJiFytK1+SwrVDTGAXBPvo7C65gsk1odd8zkYYUtz48MavWj gI1lRSBQgUtk9lEXP/22oxZ8Ng9qAbWJldnhfi7NZlbTQ1s0Mg9E/wf7gToqk9kclkKi frgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=tuEr7cQRmo+KCRBcc1MqAhbLBHYDE13/2/CbxmABZBw=; b=r0Tb2Zzaov8c+7iZjMeRqx6boJNhrHWwaNENkPmA7cNAcGfSFWQm9mfOUS4RDy9AEB O25t0QjxF3uHS1uBb5Cty58MN5W/BmTxczba4RHM8xij9nBCEPfxTuXpMqQ5DFAk2QGE YrasdU+5WzGl8rzwjRTtyhO22mCSVoqzJa2TvpaytsmosdozZhZD+zibxuB+V4o4w+Z5 STUtSa0QAQb4UpnnoWZnNpgoCzr1Y6sXC4E5zbJN+N2bm+MdtlFql2lv8rrfpbs2/xHM i5lK6VFiJn6nXUiLG39Ybvvma7nHgBIH5eZGSRhzOgEfSQp1YqZaPB4/T+sN6A0D83sN ih0A== X-Gm-Message-State: AOAM531C3lSrTw0E71lHYsoF4ENVKD+lgi5aah+xXzccX3acb/5p9Yad DsbO1AfkWcXtczZpIfTyDEDFMw47K0Twlg== X-Google-Smtp-Source: ABdhPJxHcFvZaALpF7IGvr0Zn5woXC84TEXSgP/2k13ZIAGm0YiNoIbgTBvgj+Pwh4+t9rqljX7sKQ== X-Received: by 2002:a05:6402:11ca:: with SMTP id j10mr2563554edw.351.1644485448952; Thu, 10 Feb 2022 01:30:48 -0800 (PST) Received: from ars3 ([2a02:8109:8ac0:56d0::758e]) by smtp.gmail.com with ESMTPSA id c11sm10047204edx.42.2022.02.10.01.30.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Feb 2022 01:30:48 -0800 (PST) From: Augusto Stoffel References: <87a6f0nly1.fsf@gmail.com> <87y22jm7su.fsf@gmail.com> Date: Thu, 10 Feb 2022 10:30:47 +0100 In-Reply-To: (Corwin Brust's message of "Thu, 10 Feb 2022 03:23:19 -0600") Message-ID: <87mtizukzc.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) 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 Thu, 10 Feb 2022 at 03:23, Corwin Brust wrote: >> If you delete ~/.emacs.d/elpa, your configuration as you showed it won't >> be able to bootstrap. > > I don't think I called for deleting anything; I just set-up a > non-standard place for the installation of packages. But I suspect > I'm missing your point. I thought your goal was to have Emacs download all the packages you need if you copy your configuration files to a new computer. Maybe I misunderstood. >> Autoloading 'package-installed-p' wouldn't cause any harm, but it also >> doesn't solve any problems, so why bother? > > Here I don't agree. Consider: > > (when (not (package-installed-p 'foo)) > (package-install-package 'foo)) > > This seems to DTRT; the package does get installed whereas in the > present world a backtrace is triggered unless we first take care to > load package.el. The first time you start Emacs, it doesn't have a list of packages from ELPA et al (and even if you do, it may be out of date), so 'package-install-pakcage' will fail. From unknown Sun Jun 22 07:48:20 2025 X-Loop: help-debbugs@gnu.org Subject: bug#53885: 28.0.51 [PATCH] Autoload package-installed-p Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 10 Feb 2022 12:05:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53885 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Lars Ingebrigtsen Cc: corwin@bru.st, 53885@debbugs.gnu.org Received: via spool by 53885-submit@debbugs.gnu.org id=B53885.164449468212826 (code B ref 53885); Thu, 10 Feb 2022 12:05:01 +0000 Received: (at 53885) by debbugs.gnu.org; 10 Feb 2022 12:04:42 +0000 Received: from localhost ([127.0.0.1]:54202 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nI8Bm-0003Ko-4e for submit@debbugs.gnu.org; Thu, 10 Feb 2022 07:04:42 -0500 Received: from eggs.gnu.org ([209.51.188.92]:43532) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nI8Bj-0003KU-O4 for 53885@debbugs.gnu.org; Thu, 10 Feb 2022 07:04:40 -0500 Received: from [2001:470:142:3::e] (port=54458 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nI8BZ-0003jx-0X; Thu, 10 Feb 2022 07:04:33 -0500 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=Jbx0VK7pPC1Qr18MymR+0uhF9aemnUqTuS7yIT3wUnA=; b=S0JBWAhFQ3pj 917T2Z70xEiq33zAcEbjBtUO/W4qXv1eQVf2V3wvzou8l3ZKzWZ5/6V3Sq2EzjAB1q7dikEAzDy4r RBuFigLd4Fq2R/YJL5pnBV0gR0HiJcwVKmB4nRwqHH16WefMDXPQcJd1i2Q0W+t+w0mHC6Oyf4iMx NwJH1xbRRI5Lr1JWr+MCtRr5jfkdxcl3stDqr/C0gMi+sfybl3T5tOyiCWWJmGHopKqSn685IsHie w9NU6rVlfLNok3McW6ShYk1zVPKMvvW3kXJmeAa2Mr8880uTja7F9cX/8vcFFljZPmXNXPlN37S3E 1182ADgRjH8CfSY3XwE2RQ==; Received: from [87.69.77.57] (port=4308 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 1nI8BN-0007kd-Qz; Thu, 10 Feb 2022 07:04:22 -0500 Date: Thu, 10 Feb 2022 14:04:13 +0200 Message-Id: <83r18bszb6.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <877da39kqj.fsf@gnus.org> (message from Lars Ingebrigtsen on Thu, 10 Feb 2022 09:41:40 +0100) References: <83y22kupn7.fsf@gnu.org> <87v8xng5ig.fsf@gnus.org> <83bkzfuu8o.fsf@gnu.org> <871r0bfcdy.fsf@gnus.org> <877da39kqj.fsf@gnus.org> X-Spam-Score: -2.3 (--) 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: Lars Ingebrigtsen > Cc: Eli Zaretskii , 53885@debbugs.gnu.org > Date: Thu, 10 Feb 2022 09:41:40 +0100 > > Oh, I see -- this has nothing to do with use-package, and you could have > used some other package manager. You just want to be able to check > whether a package is installed in .emacs (without saying `require > 'package') which seems reasonable to me. > > However, this comes firmly under "new functionality" and not "bug fix", > so I'm not sure we should put it in emacs-28 at this point, no matter > how innocuous it looks like. But if Eli thinks otherwise, I won't > object. Those were my thoughts as well, so we agree here. From unknown Sun Jun 22 07:48:20 2025 X-Loop: help-debbugs@gnu.org Subject: bug#53885: 28.0.51 [PATCH] Autoload package-installed-p Resent-From: Corwin Brust Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 10 Feb 2022 14:55:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53885 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: Lars Ingebrigtsen , 53885@debbugs.gnu.org Received: via spool by 53885-submit@debbugs.gnu.org id=B53885.164450488826144 (code B ref 53885); Thu, 10 Feb 2022 14:55:01 +0000 Received: (at 53885) by debbugs.gnu.org; 10 Feb 2022 14:54:48 +0000 Received: from localhost ([127.0.0.1]:54526 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nIAqO-0006nc-JM for submit@debbugs.gnu.org; Thu, 10 Feb 2022 09:54:48 -0500 Received: from mail-ed1-f44.google.com ([209.85.208.44]:38848) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nIAqM-0006nM-V0 for 53885@debbugs.gnu.org; Thu, 10 Feb 2022 09:54:47 -0500 Received: by mail-ed1-f44.google.com with SMTP id cn6so11350787edb.5 for <53885@debbugs.gnu.org>; Thu, 10 Feb 2022 06:54:46 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=z1ZFBLgQyyTtr5CRBQX2UvDKuRwmQyqPl53spmR4mp4=; b=qn15lu7AROGXtUcyBP9QaYMCSYjlOroyM0KYkC4DPPluCnqFvoiiMLrCiSxpET1rXU s4sZOs19LLETgSsoPK1VR/WvMmPhsJtdffnTLOL1TER0/fqVK9HaJ9xMQ8WNcYKKQ5ua 3xqYbkMbBEtggXRJIYjJNl4XsjfuEa3B2jd8ztFf8Ia3qn+h8QnkNQUMH25hA7DFxQd7 Rw0kX4+MxvPSmQB3tckdRW2KxWoH+rVtnPSpHknHis4eGxdgB7senvCNNdJwSgCQTB+4 FzFjGJkoVGf2M1byRq7tG5kcu35h8ePs0br04T+rviZsbD9lmNTPLqzx/fx44YAwAEOl LaXg== X-Gm-Message-State: AOAM533ZKOtIQJckWGkTw+k7VkyC/90i8mPmv6eqpLr+ffTrBhmEoTKg aissF9Kvez7pJ2Dd8wOYK/MyjKthhP0RTVTlvn0= X-Google-Smtp-Source: ABdhPJyEzyy1ujmXfMblWapIO4kDR2PYpGK4em41x9D14RhMkZxG3+oLMtlfIxsySdN9KCYovEd3qnhRmhRefyc3hf0= X-Received: by 2002:a05:6402:5248:: with SMTP id t8mr8806005edd.14.1644504881105; Thu, 10 Feb 2022 06:54:41 -0800 (PST) MIME-Version: 1.0 References: <83y22kupn7.fsf@gnu.org> <87v8xng5ig.fsf@gnus.org> <83bkzfuu8o.fsf@gnu.org> <871r0bfcdy.fsf@gnus.org> <877da39kqj.fsf@gnus.org> <83r18bszb6.fsf@gnu.org> In-Reply-To: <83r18bszb6.fsf@gnu.org> From: Corwin Brust Date: Thu, 10 Feb 2022 08:54:28 -0600 Message-ID: Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.5 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) On Thu, Feb 10, 2022 at 6:04 AM Eli Zaretskii wrote: > > > From: Lars Ingebrigtsen > > > > However, this comes firmly under "new functionality" and not "bug fix", > > so I'm not sure we should put it in emacs-28 at this point, no matter > > how innocuous it looks like. But if Eli thinks otherwise, I won't > > object. > > Those were my thoughts as well, so we agree here. In that case.. I've confirmed my patch applies cleanly to master. May I ask one of you to push it and then close this bug report (which was actually a feature request)? Thank you. From unknown Sun Jun 22 07:48:20 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Corwin Brust Subject: bug#53885: closed (Re: bug#53885: 28.0.51 [PATCH] Autoload package-installed-p) Message-ID: References: <83czjutyt8.fsf@gnu.org> X-Gnu-PR-Message: they-closed 53885 X-Gnu-PR-Package: emacs Reply-To: 53885@debbugs.gnu.org Date: Thu, 10 Feb 2022 17:30:03 +0000 Content-Type: multipart/mixed; boundary="----------=_1644514203-13982-1" This is a multi-part message in MIME format... ------------=_1644514203-13982-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #53885: Autoload package-installed-p which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 53885@debbugs.gnu.org. --=20 53885: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D53885 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1644514203-13982-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 53885-done) by debbugs.gnu.org; 10 Feb 2022 17:29:52 +0000 Received: from localhost ([127.0.0.1]:56978 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nIDGS-0003cm-Ca for submit@debbugs.gnu.org; Thu, 10 Feb 2022 12:29:52 -0500 Received: from eggs.gnu.org ([209.51.188.92]:50062) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nIDGQ-0003cX-Nm for 53885-done@debbugs.gnu.org; Thu, 10 Feb 2022 12:29:51 -0500 Received: from [2001:470:142:3::e] (port=32838 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nIDGK-0004bw-TB; Thu, 10 Feb 2022 12:29:44 -0500 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=WfIEjDaaf002BiBQQzW+PNocxsenwhzqDdwEGJjT37w=; b=NRtNocpAY2Tr mQFFIWOxNKtMHN5EkZCchiZhUj9Q4fxVVEEcuxIZ5QUlQzWXxPYxrVtermRwLvhPZMSB5PcETVnRO xork/j42XD+LrWW9Tatwut+yJ/1mpGwaGcvjUoLk5ZAkTWEJ6w9OqNywgrgMEjHvgQzbqnGkkMz3i buJfoxnpInCcR2xS1bktI/7eXqrJxGIEF80dKT0xbmVWPbCMnqgpzSLsr/W7fmbSvFxN2FYY08gRd YRc3iDaPZv2qfAH6ostTz/A/egRBsPk29YVYxCGf845A2jA6R6YxnPFA3UxXVQlLj2qih0C0VoFVR yeiirPMjSvBn6nSC/zK9/w==; Received: from [87.69.77.57] (port=4304 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 1nIDGK-0004Zs-BA; Thu, 10 Feb 2022 12:29:44 -0500 Date: Thu, 10 Feb 2022 19:29:39 +0200 Message-Id: <83czjutyt8.fsf@gnu.org> From: Eli Zaretskii To: Corwin Brust In-Reply-To: (message from Corwin Brust on Thu, 10 Feb 2022 08:54:28 -0600) Subject: Re: bug#53885: 28.0.51 [PATCH] Autoload package-installed-p References: <83y22kupn7.fsf@gnu.org> <87v8xng5ig.fsf@gnus.org> <83bkzfuu8o.fsf@gnu.org> <871r0bfcdy.fsf@gnus.org> <877da39kqj.fsf@gnus.org> <83r18bszb6.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 53885-done Cc: larsi@gnus.org, 53885-done@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 (---) > From: Corwin Brust > Date: Thu, 10 Feb 2022 08:54:28 -0600 > Cc: Lars Ingebrigtsen , 53885@debbugs.gnu.org > > I've confirmed my patch applies cleanly to master. > May I ask one of you to push it and then close this bug report (which > was actually a feature request)? Done, thanks. ------------=_1644514203-13982-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 8 Feb 2022 23:55:48 +0000 Received: from localhost ([127.0.0.1]:49106 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nHaKp-0008UX-Oe for submit@debbugs.gnu.org; Tue, 08 Feb 2022 18:55:48 -0500 Received: from lists.gnu.org ([209.51.188.17]:56594) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nHaKn-0008UQ-ST for submit@debbugs.gnu.org; Tue, 08 Feb 2022 18:55:46 -0500 Received: from eggs.gnu.org ([209.51.188.92]:33614) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nHaKn-0008JG-KX for bug-gnu-emacs@gnu.org; Tue, 08 Feb 2022 18:55:45 -0500 Received: from mail-ed1-f47.google.com ([209.85.208.47]:44802) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nHaKl-0003Yh-FE for bug-gnu-emacs@gnu.org; Tue, 08 Feb 2022 18:55:45 -0500 Received: by mail-ed1-f47.google.com with SMTP id bx2so1641888edb.11 for ; Tue, 08 Feb 2022 15:55:41 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=Y8zMc6Y95doeqh3AP5tPFcW7fdY7jelO14UGvwSrHRo=; b=7NE5sWwJizf1wvg7Fip83O+KGMOU3V7tjsQAi21rjxQrn7EEiK2uXoNka6y1hJycg1 w8uhJ1uc6VWoc2VpyVxd2NDIKbe2oDpQcvfEAEe8YCVm7LwYv8H0By2GnvoG7bhPgnFN AhB+CmUBDYSw4GI4Gyq80kRkioyYu10qfiGbjNXHlx4fyyFSs+qDRwUXiksJPI117C5i bSVVttO3pfnDOw7BlndMRtz5dZiVMQKyIL1W/mOZtDx7bMe+j0e3bsyx5Mp+iKGZuQFo LmZw7pABigJGvpLk3KHF4QNGneCnOaGtesHy/gZ/I1WfKy6p7Ae71s+tVpoE5unlVvDp cQ2Q== X-Gm-Message-State: AOAM530Zz+07P7t5JxrIavvI9HLUsHm4d7JuY7WoCI+jPeDqlpT5pS2r lhYdK27KQ42ykSHPqzno+Eak9mF2RtEOX6OzUSiyRUKNVsw= X-Google-Smtp-Source: ABdhPJxUuU++CDzuN9WFJTkhBYQ0DeuPoWuKmib2UL+Jtj28OUeNr1HpMIrfwU2SSizCkHYRu8ec4uF2AI6JLeOemCc= X-Received: by 2002:a05:6402:298e:: with SMTP id eq14mr6886517edb.240.1644364540534; Tue, 08 Feb 2022 15:55:40 -0800 (PST) MIME-Version: 1.0 From: Corwin Brust Date: Tue, 8 Feb 2022 17:55:29 -0600 Message-ID: Subject: Autoload package-installed-p To: bug-gnu-emacs@gnu.org Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=209.85.208.47; envelope-from=mplscorwin@gmail.com; helo=mail-ed1-f47.google.com X-Spam_score_int: -13 X-Spam_score: -1.4 X-Spam_bar: - X-Spam_report: (-1.4 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.248, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: -0.8 (/) 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: -1.8 (-) Commentary: If the change is accpted, please consider fixing this for emacs-28. The reproducer represents a common use-case, e.g. see bug #31397. Moverover, it is a one-line change unlikely to affect anything aside this and similar use-cases. I will submit a patch as soon as I have a BugID from the tracker. Although this change is rather trivial I need to practice this process. Reproducer: NOTE: Make sure you have a folder beneth your home directory called "elpa" and that it is empty. Launch emacs -Q Insert and evaluate: (progn (setq package-user-dir "~/elpa") (setq package-archives '(("MELPA" . "https://melpa.org/packages/"))) (require 'package) (unless (package-installed-p 'use-package) (package-install 'use-package))) Expected result: Packages are installed under ~/elpa Actual Result: Debugger entered--Lisp error: (void-function package-installed-p) (package-installed-p 'use-package) (if (package-installed-p 'use-package) nil (package-install 'use-package)) (progn (if (package-installed-p 'use-package) nil (package-install 'use-package))) elisp--eval-last-sexp(nil) eval-last-sexp(nil) funcall-interactively(eval-last-sexp nil) command-execute(eval-last-sexp) Work-around: (progn (setq package-user-dir "~/elpa") (setq package-archives '(("MELPA" . "https://melpa.org/packages/"))) (require 'package) ;; workaround (unless (package-installed-p 'use-package) (package-install 'use-package))) -- In GNU Emacs 28.0.91 (build 6, x86_64-w64-mingw32) of 2022-02-05 built on AVALON Repository revision: 821c240075e3b850a61207d18d520126292421ce Repository branch: emacs-28-nt-dist-build Windowing system distributor 'Microsoft Corp.', version 10.0.19043 System Description: Microsoft Windows 10 Home (v10.0.2009.19043.1503) Configured using: 'configure --with-json --without-dbus --with-native-compilation --without-compress-install CFLAGS=-O2' Configured features: ACL GIF GMP GNUTLS HARFBUZZ JPEG JSON LCMS2 LIBXML2 MODULES NATIVE_COMP NOTIFY W32NOTIFY PDUMPER PNG RSVG SOUND THREADS TIFF TOOLKIT_SCROLL_BARS XPM ZLIB Important settings: value of $LANG: ENU locale-coding-system: cp1252 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 auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t indent-tabs-mode: t transient-mark-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs rfc822 mml mml-sec epa derived epg rfc6068 epg-config gnus-util rmail rmail-loaddefs auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache json map text-property-search seq byte-opt gv bytecomp byte-compile cconv mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils help-fns radix-tree cl-print debug backtrace help-mode find-func time-date subr-x cl-loaddefs cl-lib iso-transl tooltip eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel dos-w32 ls-lisp disp-table term/w32-win w32-win w32-vars 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 cl-generic 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 simple abbrev obarray cl-preloaded nadvice button loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads w32notify w32 lcms2 multi-tty make-network-process native-compile emacs) Memory information: ((conses 16 78996 5653) (symbols 48 7157 0) (strings 32 22876 2110) (string-bytes 1 755191) (vectors 16 14673) (vector-slots 8 308167 12600) (floats 8 30 232) (intervals 56 376 0) (buffers 992 11)) ------------=_1644514203-13982-1--