From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Andrea Corallo Newsgroups: gmane.emacs.bugs Subject: bug#71356: use-package doesn't load org from elpa Date: Wed, 05 Jun 2024 14:09:22 -0400 Message-ID: References: <86plsvk57o.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24109"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 71356@debbugs.gnu.org, Philip Kaludercic , paaguti@gmail.com To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jun 05 20:36:56 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sEvVH-00062q-3h for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 05 Jun 2024 20:36:55 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sEvVB-0004et-Ji; Wed, 05 Jun 2024 14:36:49 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sEvVA-0004ef-IH for bug-gnu-emacs@gnu.org; Wed, 05 Jun 2024 14:36:48 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sEvVA-00063y-AJ for bug-gnu-emacs@gnu.org; Wed, 05 Jun 2024 14:36:48 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sEvVO-0001Ab-6E for bug-gnu-emacs@gnu.org; Wed, 05 Jun 2024 14:37:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Andrea Corallo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 05 Jun 2024 18:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71356 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 71356-submit@debbugs.gnu.org id=B71356.17176125994438 (code B ref 71356); Wed, 05 Jun 2024 18:37:02 +0000 Original-Received: (at 71356) by debbugs.gnu.org; 5 Jun 2024 18:36:39 +0000 Original-Received: from localhost ([127.0.0.1]:55924 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sEvV0-00019T-Fa for submit@debbugs.gnu.org; Wed, 05 Jun 2024 14:36:39 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:40686) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sEvUy-00018y-B8 for 71356@debbugs.gnu.org; Wed, 05 Jun 2024 14:36:36 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sEv4e-0006w5-Bg; Wed, 05 Jun 2024 14:09:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=mu8KyfibvFmHqS2gCZtrNgYga2952t6N6ufCyWIJMbY=; b=bfvsArgdtgUD+DEFzc86 yW9il4ZtVWfWqniKTstylz8cw40jNsNoSiz+8KeDYQDPKzfqmBrBZDAatqEJb6FzFsYD1SolxCwc6 M2MZyZOB5glNWjntqIyMZ9tQBv8uEPWthv07N/60m7I7s3UKYLTcqQhLFh4X35HmIjkycKAx7A3Ui wWbL/sdJOt6Y+gbP9p2q5xNw0iHsDOOJU6Ah9h0DuFjXL19MHFHULZo0/fcT81CcpvhQpjBjBYYBe LdB+o6yYeQBdfZx1nrZiyCyiDhxRiBmNQhacIALekwL1PQ+LcR+BM1ISSbLAQEH+nZcZF0Erg/ooA vF4ZT759qSxf9w==; Original-Received: from acorallo by fencepost.gnu.org with local (Exim 4.90_1) (envelope-from ) id 1sEv4c-0001co-NW; Wed, 05 Jun 2024 14:09:23 -0400 In-Reply-To: <86plsvk57o.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 05 Jun 2024 14:18:51 +0300") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:286635 Archived-At: Eli Zaretskii writes: >> Cc: 71356@debbugs.gnu.org >> From: Andrea Corallo >> Date: Tue, 04 Jun 2024 17:44:37 -0400 >> >> Seems the issue is in 'use-package-ensure-elpa' where we gate any >> installation with "(unless (package-installed-p package)". I think we >> should progress also if we see that the package is built-in and is >> actually pinned. >> >> The attached seems to do the job for me, but I'm not 100% sure it's the >> best/right fix so I'd appretiate someone else to have a look. > > Isn't this because we require an explicit directive by the user in > order to upgrade a built-in package? The Emacs user manual says: > > By default, =E2=80=98package-install=E2=80=99 doesn't consider built= -in packages for > which new versions are available from the archives. (A package is > built-in if it is included in the Emacs distribution.) In particular, > it will not show built-in packages in the list of completion candidates > when you type at its prompt. But if you invoke =E2=80=98package-instal= l=E2=80=99 with a > prefix argument, it will also consider built-in packages that can be > upgraded. You can make this behavior the default by customizing the > variable =E2=80=98package-install-upgrade-built-in=E2=80=99: if its val= ue is non-=E2=80=98nil=E2=80=99, > =E2=80=98package-install=E2=80=99 will consider built-in packages even = when invoked > without a prefix argument. Note that the package-menu commands (*note > Package Menu::) are also affected by =E2=80=98package-install-upgrade-b= uilt-in=E2=80=99. > > By contrast, =E2=80=98package-upgrade=E2=80=99 and =E2=80=98package-= upgrade-all=E2=80=99 never > consider built-in packages. If you want to use these commands for > upgrading some built-in packages, you need to upgrade each of those > packages, once, either via =E2=80=98C-u M-x package-install =E2=80= =99, or by > customizing =E2=80=98package-install-upgrade-built-in=E2=80=99 to a non= -=E2=80=98nil=E2=80=99 value, and > then upgrading the package once via the package menu or by > =E2=80=98package-install=E2=80=99. > > We had a long (and somewhat heated) discussion about this a year ago, > see bug#62720. I see thanks, OTOH this report is about the use-package macro not package itself. use-package doc doesn't mention built-in packages, but describes the two keyword parameters as: :ensure Loads the package using package.el if necessary. :pin Pin the package to an archive. So I found reasonable that for the reported case the user expects the package to be loaded using package.el. But as I mentioned I'm no expert in this area so I might very well be off :) Thanks Andrea