From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#53885: 28.0.51 [PATCH] Autoload package-installed-p Date: Thu, 10 Feb 2022 09:41:40 +0100 Message-ID: <877da39kqj.fsf@gnus.org> References: <83y22kupn7.fsf@gnu.org> <87v8xng5ig.fsf@gnus.org> <83bkzfuu8o.fsf@gnu.org> <871r0bfcdy.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24047"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: 53885@debbugs.gnu.org To: Corwin Brust Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Feb 10 09:47:30 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 1nI56v-0005zm-Er for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 10 Feb 2022 09:47:29 +0100 Original-Received: from localhost ([::1]:34176 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nI56u-0002xz-6k for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 10 Feb 2022 03:47:28 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:53740) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nI51g-0000t0-5g for bug-gnu-emacs@gnu.org; Thu, 10 Feb 2022 03:42:06 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:59962) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nI51e-00026y-HJ for bug-gnu-emacs@gnu.org; Thu, 10 Feb 2022 03:42:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nI51e-0004os-Gg for bug-gnu-emacs@gnu.org; Thu, 10 Feb 2022 03:42:02 -0500 X-Loop: help-debbugs@gnu.org 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 Original-Received: via spool by 53885-submit@debbugs.gnu.org id=B53885.164448252018517 (code B ref 53885); Thu, 10 Feb 2022 08:42:02 +0000 Original-Received: (at 53885) by debbugs.gnu.org; 10 Feb 2022 08:42:00 +0000 Original-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 Original-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=; Original-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 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" In-Reply-To: (Corwin Brust's message of "Thu, 10 Feb 2022 01:21:59 -0600") 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:226563 Archived-At: 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