From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Pedro Andres Aranda Gutierrez Newsgroups: gmane.emacs.bugs Subject: bug#71356: use-package doesn't load org from elpa Date: Thu, 6 Jun 2024 07:46:31 +0200 Message-ID: References: <86plsvk57o.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000077a32061a32369b" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21597"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 71356@debbugs.gnu.org, Eli Zaretskii , Philip Kaludercic To: Andrea Corallo Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jun 06 07:56:25 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 1sF66r-0005Pk-82 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 06 Jun 2024 07:56:25 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sF66I-0007kE-24; Thu, 06 Jun 2024 01:55:50 -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 1sF66G-0007jh-Jr for bug-gnu-emacs@gnu.org; Thu, 06 Jun 2024 01:55: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 1sF66G-00048V-6y for bug-gnu-emacs@gnu.org; Thu, 06 Jun 2024 01:55:48 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sF66T-0008Iy-U0 for bug-gnu-emacs@gnu.org; Thu, 06 Jun 2024 01:56:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Pedro Andres Aranda Gutierrez Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 06 Jun 2024 05:56:01 +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.171765332331833 (code B ref 71356); Thu, 06 Jun 2024 05:56:01 +0000 Original-Received: (at 71356) by debbugs.gnu.org; 6 Jun 2024 05:55:23 +0000 Original-Received: from localhost ([127.0.0.1]:40259 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sF65q-0008HG-U8 for submit@debbugs.gnu.org; Thu, 06 Jun 2024 01:55:23 -0400 Original-Received: from mail-wr1-f42.google.com ([209.85.221.42]:51365) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sF652-0008Ei-Og for 71356@debbugs.gnu.org; Thu, 06 Jun 2024 01:54:33 -0400 Original-Received: by mail-wr1-f42.google.com with SMTP id ffacd0b85a97d-35e4d6f7c5cso604741f8f.2 for <71356@debbugs.gnu.org>; Wed, 05 Jun 2024 22:54:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717653192; x=1718257992; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=45nNOPmQsCEUWP3n349IplJfnPj0nxri/1j3HLLRMc8=; b=P1VJ6f6/Shwfb/zdARgqCDoqeDXIqD+V2r0N1NZbB8OLK8R86PAfTTu5SMfR0Jd9Nb tHgAqY8ju0RD9MjK/+xLK7rzljjn0+aF8GNMO0FZ+ABLcp+nm2Nhi2DnTXI1ch+g1Z9h UUI+pxcIz29pk82sc/v5u3PRFYP8LC2M/povW/WkXrdptDiwrEe9UVT1o+dUhJ48pISj AV+uZJiuDgp3yVDE1d9W3e7ktR9TJnvO+Ct2BeZdbjeLOTZM97CtLtT1poSGlN+Ru3zO 6YYEYaWUHaWMjOCumi/p6sqe/EjoH+uLOMJD2Tfjq4M0Yz8YMJQF13ThXyuhhElboOYd zWPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717653192; x=1718257992; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=45nNOPmQsCEUWP3n349IplJfnPj0nxri/1j3HLLRMc8=; b=dFKzSKnEABpQMT7RfdZp2OAkMIF3KflNIdkBiC709/8uHRK4ag+p7OThQnnnsBhIiR 6PBsN17EuTcW068Pa/smFQGeDj2Ui0phvBkftpWMaPawNWA5fVGldkf9NxQNGr1g41rT i3s/H5IXwKZeQu6ztJ6BduYTcpUVd3nNedKV/2Tk4CbmC7+cJqNxYTNgTOLUOrYKEEI1 FSSSn2kVVLnmkhbsi7Kh7M2cn5CgG+sLWz4vzvBg5I7hzup/bC2j7xSvNXF7pkvaLVL7 uzWu/r0rvcIyw39jRRpvuV4GjfQnlLqoTTCpZAq542LxSkLBehU7Szw1feiOOUwp6uiy 1jLQ== X-Forwarded-Encrypted: i=1; AJvYcCWU1Ki+x4I4o1Ijzhfh38uLTCZpMVVgurQjzIghh7lr768CcUcHUX+Xiiq4TG6rLMp9vz4CL7C8QAUPqoyBL+SME4/IXKY= X-Gm-Message-State: AOJu0YyFLsOdrGOoqDs6Xpq2AY8vApewN/F3yDfb2kqwTY2G8ekvqWQA ZhUpuftlm/Otq3oOpebg/kde0PyV2aV6XK134wdLiDdxZOF05140m+td0lEofISSgPblok5l8C/ yDoGLjj9DdmGnJ06rwAez6AOW76zgLQ== X-Google-Smtp-Source: AGHT+IE9uVOBN+AdwTHxtuyp+g8IxP1RIruF/qM+qR7SIeoIgOENbVgUmjW/N210t4eeo1qAS+VdLu4j1j3mhRlvo2o= X-Received: by 2002:a2e:8609:0:b0:2ea:9449:7719 with SMTP id 38308e7fff4ca-2eac774e64emr23769151fa.0.1717652817408; Wed, 05 Jun 2024 22:46:57 -0700 (PDT) In-Reply-To: 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:286655 Archived-At: --000000000000077a32061a32369b Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, Andrea is right. Reading through all the documentation, I implied that use-package would upgrade built-in packages if I pinned them to an archive and I :ensure'd them. Use case: want to upgrade org from the 9.6.x version packaged with master to the 9.7.x version available in elpa. Maybe this is more a FR and if so, we could move this to the list and have an informed discussion there. Best, /PA On Wed, 5 Jun 2024 at 20:09, Andrea Corallo wrote: > 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 th= e > >> 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 bui= lt-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 candidat= es > > when you type at its prompt. But if you invoke =E2=80=98package-inst= all=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 v= alue is non-=E2=80=98nil=E2=80=99, > > =E2=80=98package-install=E2=80=99 will consider built-in packages eve= n when invoked > > without a prefix argument. Note that the package-menu commands (*not= e > > Package Menu::) are also affected by > =E2=80=98package-install-upgrade-built-in=E2=80=99. > > > > By contrast, =E2=80=98package-upgrade=E2=80=99 and =E2=80=98packag= e-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 n= on-=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 > > --=20 Fragen sind nicht da, um beantwortet zu werden, Fragen sind da um gestellt zu werden Georg Kreisler Headaches with a Juju log: unit-basic-16: 09:17:36 WARNING juju.worker.uniter.operation we should run a leader-deposed hook here, but we can't yet --000000000000077a32061a32369b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,=C2=A0

Andrea is right. Reading thro= ugh all the documentation, I implied
that use-package would upgra= de built-in packages if I pinned them to an archive
and I :ensure= 'd them.=C2=A0

Use case: want to upgrade org f= rom the 9.6.x version packaged with master to the
9.7.x version a= vailable in elpa.=C2=A0

Maybe this is more a FR an= d if so, we could move this to the list and have an informed=C2=A0
discussion there.

Best, /PA

On Wed, 5 Jun 2= 024 at 20:09, Andrea Corallo <acoral= lo@gnu.org> wrote:
Eli Zaretskii <eliz@gnu.org> writes:

>> Cc: 713= 56@debbugs.gnu.org
>> From: Andrea Corallo <acorallo@gnu.org>
>> Date: Tue, 04 Jun 2024 17:44:37 -0400
>>
>> Seems the issue is in 'use-package-ensure-elpa' where we g= ate any
>> installation with "(unless (package-installed-p package)"= ;.=C2=A0 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.<= br> >
> Isn't this because we require an explicit directive by the user in=
> order to upgrade a built-in package?=C2=A0 The Emacs user manual says:=
>
>=C2=A0 =C2=A0 =C2=A0 By default, =E2=80=98package-install=E2=80=99 does= n't consider built-in packages for
>=C2=A0 =C2=A0which new versions are available from the archives.=C2=A0 = (A package is
>=C2=A0 =C2=A0built-in if it is included in the Emacs distribution.)=C2= =A0 In particular,
>=C2=A0 =C2=A0it will not show built-in packages in the list of completi= on candidates
>=C2=A0 =C2=A0when you type at its prompt.=C2=A0 But if you invoke =E2= =80=98package-install=E2=80=99 with a
>=C2=A0 =C2=A0prefix argument, it will also consider built-in packages t= hat can be
>=C2=A0 =C2=A0upgraded.=C2=A0 You can make this behavior the default by = customizing the
>=C2=A0 =C2=A0variable =E2=80=98package-install-upgrade-built-in=E2=80= =99: if its value is non-=E2=80=98nil=E2=80=99,
>=C2=A0 =C2=A0=E2=80=98package-install=E2=80=99 will consider built-in p= ackages even when invoked
>=C2=A0 =C2=A0without a prefix argument.=C2=A0 Note that the package-men= u commands (*note
>=C2=A0 =C2=A0Package Menu::) are also affected by =E2=80=98package-inst= all-upgrade-built-in=E2=80=99.
>
>=C2=A0 =C2=A0 =C2=A0 By contrast, =E2=80=98package-upgrade=E2=80=99 and= =E2=80=98package-upgrade-all=E2=80=99 never
>=C2=A0 =C2=A0consider built-in packages.=C2=A0 If you want to use these= commands for
>=C2=A0 =C2=A0upgrading some built-in packages, you need to upgrade each= of those
>=C2=A0 =C2=A0packages, once, either via =E2=80=98C-u M-x package-instal= l <RET>=E2=80=99, or by
>=C2=A0 =C2=A0customizing =E2=80=98package-install-upgrade-built-in=E2= =80=99 to a non-=E2=80=98nil=E2=80=99 value, and
>=C2=A0 =C2=A0then upgrading the package once via the package menu or by=
>=C2=A0 =C2=A0=E2=80=98package-install=E2=80=99.
>
> We had a long (and somewhat heated) discussion about this a year ago,<= br> > 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 tw= o
keyword parameters as:

:ensure=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Loads the package using package.e= l if necessary.
:pin=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Pin the package to an a= rchive.

So I found reasonable that for the reported case the user expects the
package to be loaded using package.el.=C2=A0 But as I mentioned I'm no = expert
in this area so I might very well be off :)

Thanks

=C2=A0 Andrea



--
Fragen sind nicht da, um bea= ntwortet zu werden,
Fragen sind da um gestellt zu werden
= Georg Kreisler

Headaches with a Juju log:
unit-basic-16: 09:17:36 WARNING juju.worker.uniter.operation we should ru= n a leader-deposed hook here, but we can't yet

--000000000000077a32061a32369b--