From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Corwin Brust Newsgroups: gmane.emacs.bugs Subject: bug#53885: 28.0.51 [PATCH] Autoload package-installed-p Date: Thu, 10 Feb 2022 02:49:06 -0600 Message-ID: References: <83y22kupn7.fsf@gnu.org> <87v8xng5ig.fsf@gnus.org> <83bkzfuu8o.fsf@gnu.org> <871r0bfcdy.fsf@gnus.org> <877da39kqj.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9029"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 53885@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Feb 10 10:08:15 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nI5R1-0002Aw-9e for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 10 Feb 2022 10:08:15 +0100 Original-Received: from localhost ([::1]:59122 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nI5Qz-0003qO-OP for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 10 Feb 2022 04:08:13 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:56338) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nI59P-00063j-MR for bug-gnu-emacs@gnu.org; Thu, 10 Feb 2022 03:50:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:59991) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nI59O-0006K8-QF for bug-gnu-emacs@gnu.org; Thu, 10 Feb 2022 03:50:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nI59O-0007Nw-KS for bug-gnu-emacs@gnu.org; Thu, 10 Feb 2022 03:50:02 -0500 X-Loop: help-debbugs@gnu.org 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 Original-Received: via spool by 53885-submit@debbugs.gnu.org id=B53885.164448296728333 (code B ref 53885); Thu, 10 Feb 2022 08:50:02 +0000 Original-Received: (at 53885) by debbugs.gnu.org; 10 Feb 2022 08:49:27 +0000 Original-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 Original-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 Original-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) In-Reply-To: <877da39kqj.fsf@gnus.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:226572 Archived-At: 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.