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: Fri, 7 Jun 2024 10:05:02 +0200 Message-ID: References: <86plsvk57o.fsf@gnu.org> <86ed9aip6z.fsf@gnu.org> <87ed9abnqn.fsf@posteo.net> <868qziifzd.fsf@gnu.org> <865xumgku6.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000424eda061a48430b" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32848"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 71356@debbugs.gnu.org, philipk@posteo.net, acorallo@gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jun 07 10:14:00 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 1sFUjY-0008H2-1q for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 07 Jun 2024 10:14:00 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sFUjM-0008DQ-Oz; Fri, 07 Jun 2024 04:13:48 -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 1sFUjL-0008C1-14 for bug-gnu-emacs@gnu.org; Fri, 07 Jun 2024 04:13:47 -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 1sFUjK-0002Zz-Mr for bug-gnu-emacs@gnu.org; Fri, 07 Jun 2024 04:13:46 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sFUjZ-0005VY-PX for bug-gnu-emacs@gnu.org; Fri, 07 Jun 2024 04:14: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: Fri, 07 Jun 2024 08:14: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.171774798921016 (code B ref 71356); Fri, 07 Jun 2024 08:14:01 +0000 Original-Received: (at 71356) by debbugs.gnu.org; 7 Jun 2024 08:13:09 +0000 Original-Received: from localhost ([127.0.0.1]:33722 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sFUii-0005Sr-Sa for submit@debbugs.gnu.org; Fri, 07 Jun 2024 04:13:09 -0400 Original-Received: from mail-ed1-f44.google.com ([209.85.208.44]:54738) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sFUig-0005RQ-GT for 71356@debbugs.gnu.org; Fri, 07 Jun 2024 04:13:07 -0400 Original-Received: by mail-ed1-f44.google.com with SMTP id 4fb4d7f45d1cf-57a68b0fbd0so2123989a12.1 for <71356@debbugs.gnu.org>; Fri, 07 Jun 2024 01:12:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717747906; x=1718352706; 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=E1bBzxk7b6QUxVSZZKyoazpTIE5Iwb9GuVIBGYXSUyY=; b=bO/J/rwiRMRipVvHxr3HRwEteb3Y8qZGicUxG7cMUfKJHvVlI55hkU+142xvbU9Kmu Dd7XVFd4O6lJUB/4FugRvdr8gGr3hSpLezo4/Q+npwzUInU0q2iyT22497HE42Ft6kon B7Z9BN5M/3HWW55hoUhKGlCo59kbtovRJeojXOrDVuClyzJRobjO8JrITHDZJir+Ec3M gsXPnHjPl+BbmJOrTVOdRmFIKJyIVzkK7SpYqhPXllVTaV9bxXtd5X+dpoeaD/b7q4dg d28WtkT2aqJqWeTINQP4tZv9Q1TbrsO3FBRyvprk4oiez+lkWaBll0ffJ6QkauVr+8nY vbBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717747906; x=1718352706; 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=E1bBzxk7b6QUxVSZZKyoazpTIE5Iwb9GuVIBGYXSUyY=; b=LmV+zqe0hucwdMfborkTZ7hDHtc5exBqe//cBTwPLmmmj7CAZpJX6spvn3tuBkWtNU RxpcpXkkZZKgA2zwnvedhVQoive/oTc9MWTdZ7Lxl1Aly+31OgLOkyRlVtYNW+y2jWWw thtY7HJ8zcwSPuwKVq+X5w6gX0Xjidsx3dPuOMUu9IhqfUZKobn2M0yN8aw5fAG7f8dq iTFpjTOUJvbC3dUq7h26LpvaNt+IgnMFXmpgnP/TUe6+2cFCWKEcm2656QA0xzdUGi2D TwnF7HxQ8SyFXjXPOA5BXZNfWAA7nirsCDcPBJQjvtgdmZOVOw6rEKjDDsh5WJV3YbAI zXoQ== X-Forwarded-Encrypted: i=1; AJvYcCXnBSrfi7DZMlFn7AiuQ99jrJfP6ud/RsK+abFVtug/Voy7EGIpoSdQCE3l2y2aOPQAcTKQpXXM8GQKwODcTEinmjZ9mJU= X-Gm-Message-State: AOJu0YzVbGK5Jcu4lp6o+DBL7FUF9WUYukGaQ0Bb7PtZE1/sSOze/Ug1 7m6e05okhQdJ0FdZZ7sF0pmloYdKnvQBCO19bHhENgvm7nA4mQs2E4P+OPmCZzvXhSd9zq+7S6d 9Xn+RKQe1paoViwBm5RiPKHMyN3gJ/lTmkqA= X-Google-Smtp-Source: AGHT+IH5eRYSLbh5dlBYSU2bRCJ0y9+YmsIK7S3cbMrh3CMU5eRjAJdhm1EY7yeZk/xxCybmunYHll4Y2nWtk+4Xxto= X-Received: by 2002:a50:8ad5:0:b0:57c:5fca:ab25 with SMTP id 4fb4d7f45d1cf-57c5fcaab6dmr282317a12.25.1717747528646; Fri, 07 Jun 2024 01:05:28 -0700 (PDT) In-Reply-To: <865xumgku6.fsf@gnu.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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:286746 Archived-At: --000000000000424eda061a48430b Content-Type: text/plain; charset="UTF-8" Just for the record. Further tests I have done: --- init.el --- (require 'benchmark) (require 'package) (setq custom-file (locate-user-emacs-file "custom.el")) (when (not package-archive-contents) (package-refresh-contents)) (message "Loading org from elpa took %f s" (benchmark-elapse (setq-default package-install-upgrade-built-in t) (use-package org :ensure t :pin gnu) (message "org-version: %s" org-version))) --- M-x org-version yields 9.6.15 (expected was 9.7.3) Best, /PA On Thu, 6 Jun 2024 at 17:19, Eli Zaretskii wrote: > > From: Pedro Andres Aranda Gutierrez > > Date: Thu, 6 Jun 2024 17:07:02 +0200 > > Cc: Philip Kaludercic , acorallo@gnu.org, > 71356@debbugs.gnu.org > > > > > IIUC the feature would be that if a use-package form has a > > > > > > :pin gnu > > > > > > argument, then this is an indication that we want to install the > package > > > from GNU ELPA, disregarding the fact that Emacs already has a built-in > > > version of the same package. Sort of a package-local version of > > > `package-install-upgrade-built-in'. > > > > I'm not sure. People tend to copy/paste recipes from the Internet > > without really understanding what they do. I think a simple :pin > > should not be sufficient, we need some specialized keyword (in > > addition to supporting package-install-upgrade-built-in). > > > > I didn't arrive at trying :pin gnu from anything in the Internet, but > from > > reading the use-package documentation (just this time ;-) ) > > > > > I am not familiar with the use-package code, but it seems like we > could > > > implement this generally in package-install, by checking > > > `package-pinned-packages'. > > > > I would prefer not to introduce another indication of whether built-in > > packages should or should not be upgraded. If we do, we will next > > need to decide which one "wins" when they contradict each other. > > > > > > My feeling is that if I set package-install-upgrade-built-in to t and pin > > a package to (say) gnu elpa, that should be enough. > > I agree. I was responding to the suggestion that just :pin should be > enough. That use-package currently ignores > package-install-upgrade-built-in is a bug we should surely fix. > -- 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 --000000000000424eda061a48430b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Just for the record. Further tests I have done:

--- init.el ---
(require 'benchmark)
(require = 9;package)
(setq custom-file (locate-user-emacs-file "custom.el&quo= t;))

(when (not package-archive-contents)
=C2=A0 (package-refresh= -contents))
(message "Loading org from elpa took %f s"
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(benchmark-elapse
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0(setq-default package-install-upgrade-built-in t)
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(use-package org
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0:ensure t
=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0:pin gnu)
=C2=A0 (message "org-version: %s&qu= ot; org-version)))
---

M-x org-versi= on yields 9.6.15 (expected was 9.7.3)

Best, /PA

On Thu, 6 Jun 2024 at 17:19, Eli Zaretskii <eliz@gnu.org> wrote:
> From: Pedro Andres Aranda Gutierrez <paaguti@gmail.com>
> Date: Thu, 6 Jun 2024 17:07:02 +0200
> Cc: Philip Kaludercic <philipk@posteo.net>, acorallo@gnu.org, 71356@debbugs.gnu.org
>
>=C2=A0 > IIUC the feature would be that if a use-package form has a<= br> >=C2=A0 >
>=C2=A0 >=C2=A0 =C2=A0 =C2=A0 :pin gnu
>=C2=A0 >
>=C2=A0 > argument, then this is an indication that we want to instal= l the package
>=C2=A0 > from GNU ELPA, disregarding the fact that Emacs already has= a built-in
>=C2=A0 > version of the same package.=C2=A0 Sort of a package-local = version of
>=C2=A0 > `package-install-upgrade-built-in'.
>
>=C2=A0 I'm not sure.=C2=A0 People tend to copy/paste recipes from t= he Internet
>=C2=A0 without really understanding what they do.=C2=A0 I think a simpl= e :pin
>=C2=A0 should not be sufficient, we need some specialized keyword (in >=C2=A0 addition to supporting package-install-upgrade-built-in).
>
> I didn't arrive at trying :pin gnu from anything in the Internet, = but from
> reading the use-package documentation (just this time ;-) )
>
>=C2=A0 > I am not familiar with the use-package code, but it seems l= ike we could
>=C2=A0 > implement this generally in package-install, by checking >=C2=A0 > `package-pinned-packages'.
>
>=C2=A0 I would prefer not to introduce another indication of whether bu= ilt-in
>=C2=A0 packages should or should not be upgraded.=C2=A0 If we do, we wi= ll next
>=C2=A0 need to decide which one "wins" when they contradict e= ach other.
>
>=C2=A0
> My feeling is that if I set package-install-upgrade-built-in to t and = pin
> a package to (say) gnu elpa, that should be enough.

I agree.=C2=A0 I was responding to the suggestion that just :pin should be<= br> enough.=C2=A0 That use-package currently ignores
package-install-upgrade-built-in is a bug we should surely fix.


--
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

--000000000000424eda061a48430b--