unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Andrea Corallo <acorallo@gnu.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 71356@debbugs.gnu.org, Philip Kaludercic <philipk@posteo.net>,
	paaguti@gmail.com
Subject: bug#71356: use-package doesn't load org from elpa
Date: Wed, 05 Jun 2024 14:09:22 -0400	[thread overview]
Message-ID: <yp1le3jmfcd.fsf@fencepost.gnu.org> (raw)
In-Reply-To: <86plsvk57o.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 05 Jun 2024 14:18:51 +0300")

Eli Zaretskii <eliz@gnu.org> writes:

>> Cc: 71356@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 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, ‘package-install’ 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 ‘package-install’ 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 ‘package-install-upgrade-built-in’: if its value is non-‘nil’,
>   ‘package-install’ 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 ‘package-install-upgrade-built-in’.
>
>      By contrast, ‘package-upgrade’ and ‘package-upgrade-all’ 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 ‘C-u M-x package-install <RET>’, or by
>   customizing ‘package-install-upgrade-built-in’ to a non-‘nil’ value, and
>   then upgrading the package once via the package menu or by
>   ‘package-install’.
>
> 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






  reply	other threads:[~2024-06-05 18:09 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-04  6:26 bug#71356: use-package doesn't load org from elpa Pedro Andres Aranda Gutierrez
2024-06-04 21:44 ` Andrea Corallo
2024-06-05  6:40   ` Pedro Andres Aranda Gutierrez
2024-06-05 11:18   ` Eli Zaretskii
2024-06-05 18:09     ` Andrea Corallo [this message]
2024-06-06  5:46       ` Pedro Andres Aranda Gutierrez
2024-06-06  6:02         ` Eli Zaretskii
2024-06-06  6:11           ` Pedro Andres Aranda Gutierrez
2024-06-06  9:15             ` Eli Zaretskii
2024-06-06  6:15           ` Philip Kaludercic
2024-06-06  9:21             ` Eli Zaretskii
2024-06-06 15:07               ` Pedro Andres Aranda Gutierrez
2024-06-06 15:19                 ` Eli Zaretskii
2024-06-07  8:05                   ` Pedro Andres Aranda Gutierrez
2024-06-10  6:02               ` Philip Kaludercic
2024-06-10  6:52                 ` Pedro Andres Aranda Gutierrez
2024-06-10  8:17                 ` Andrea Corallo
2024-06-10 12:18                   ` Eli Zaretskii
2024-06-10 15:40                     ` Philip Kaludercic
2024-06-10 16:12                       ` Eli Zaretskii
2024-06-10 16:51                         ` Pedro Andres Aranda Gutierrez
2024-06-10 17:46                           ` Eli Zaretskii
2024-06-10 18:04                             ` Philip Kaludercic
2024-06-11  5:27                             ` Pedro Andres Aranda Gutierrez
2024-06-11  7:29                               ` Eli Zaretskii
2024-06-11  7:53                                 ` Pedro Andres Aranda Gutierrez
2024-06-10 12:14                 ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=yp1le3jmfcd.fsf@fencepost.gnu.org \
    --to=acorallo@gnu.org \
    --cc=71356@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=paaguti@gmail.com \
    --cc=philipk@posteo.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).