unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Philip Kaludercic <philipk@posteo.net>
To: Eli Zaretskii <eliz@gnu.org>
Cc: dmitry@gutov.dev,  monnier@iro.umontreal.ca,  emacs-devel@gnu.org
Subject: Re: emacs-29 9b775ddc057 1/2: ; * etc/EGLOT-NEWS: Fix wording of last change.
Date: Sun, 07 May 2023 17:16:31 +0000	[thread overview]
Message-ID: <875y94f4eo.fsf@posteo.net> (raw)
In-Reply-To: <83r0rsebcf.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 07 May 2023 12:32:00 +0300")

[-- Attachment #1: Type: text/plain, Size: 1706 bytes --]

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Philip Kaludercic <philipk@posteo.net>
>> Cc: Dmitry Gutov <dmitry@gutov.dev>,  monnier@iro.umontreal.ca,
>>   emacs-devel@gnu.org
>> Date: Sun, 07 May 2023 08:46:53 +0000
>> 
>> Eli Zaretskii <eliz@gnu.org> writes:
>> 
>> > I think it better did, because using "U" would upgrade Eglot and
>> > use-package in Emacs 28 and before.  So we should give users who want
>> > that the capability of keeping that workflow in Emacs 29, if only as
>> > opt-in behavior.
>> 
>> "Workflow" is really to high of a term for the problem being discussed
>> here.  Installing packages is not a periodical thing people to on a
>> regular basis.
>
> Since we are talking about an optional feature, it will suit this
> well, I think.  The target audience for this are those users who were
> used to upgrade Eglot regularly when it was not a core package.
> Likewise for other packages that would be brought into core in the
> future.
>
>> > Also, "/ u" should ideally show built-in packages as well, when
>> > package-install-upgrade-built-in is non-nil.
>> 
>> So the point here would be that a user who enables this option, regards
>> any newer version of a core-package on ELPA as something that should be
>> installed?
>
> Yes.
>
>> Perhaps this is a tangent, but what would happen if a third-party
>> repository like MELPA adds a package with the same name as a core
>> package?
>
> This problem exists today already, with non-core packages.  Right?
>
>> > Philip, can these two changes be implemented safely for Emacs 29?
>> 
>> It certainly can be done.
>
> I'd appreciate if you could show a patch that we could then consider.
> TIA.

This is an initial, quick sketch:


[-- Attachment #2: Type: text/plain, Size: 1498 bytes --]

diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index 2892728ebd9..4c85db1aedb 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -3740,7 +3740,9 @@ package-menu--find-upgrades
       ;; ENTRY is (PKG-DESC [NAME VERSION STATUS DOC])
       (let ((pkg-desc (car entry))
             (status (aref (cadr entry) 2)))
-        (cond ((member status '("installed" "dependency" "unsigned" "external"))
+        (cond ((member status (append
+                               '("installed" "dependency" "unsigned" "external")
+                               (and package-install-upgrade-built-in '("built-in"))))
                (push pkg-desc installed))
               ((member status '("available" "new"))
                (setq available (package--append-to-alist pkg-desc available))))))
@@ -3749,8 +3751,10 @@ package-menu--find-upgrades
       (let* ((name (package-desc-name pkg-desc))
              (avail-pkg (cadr (assq name available))))
         (and avail-pkg
-             (version-list-< (package-desc-priority-version pkg-desc)
-                             (package-desc-priority-version avail-pkg))
+             (or (version-list-< (package-desc-priority-version pkg-desc)
+                                 (package-desc-priority-version avail-pkg))
+                 (and package-install-upgrade-built-in
+                      (package--active-built-in-p pkg-desc)))
              (push (cons name avail-pkg) upgrades))))
     upgrades))
 

[-- Attachment #3: Type: text/plain, Size: 105 bytes --]


but on my system, it immediately suggests upgrading 24 packages, which
is a lot.

-- 
Philip Kaludercic

  reply	other threads:[~2023-05-07 17:16 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <168335548287.8529.4912240840977468283@vcs2.savannah.gnu.org>
     [not found] ` <20230506064443.56C75C22F15@vcs2.savannah.gnu.org>
2023-05-06 10:14   ` emacs-29 9b775ddc057 1/2: ; * etc/EGLOT-NEWS: Fix wording of last change Dmitry Gutov
2023-05-06 10:35     ` Eli Zaretskii
2023-05-06 10:46       ` Dmitry Gutov
2023-05-06 10:53         ` Eli Zaretskii
2023-05-06 13:03           ` João Távora
2023-05-06 13:22             ` Eli Zaretskii
2023-05-06 13:48               ` João Távora
2023-05-06 14:11                 ` Eli Zaretskii
2023-05-06 14:45                   ` Eli Zaretskii
2023-05-06 15:28                 ` Dmitry Gutov
2023-05-06 15:26               ` Dmitry Gutov
2023-05-06 15:44                 ` Eli Zaretskii
2023-05-06 15:54                   ` Dmitry Gutov
2023-05-06 16:40                     ` Eli Zaretskii
2023-05-06 18:44                       ` Philip Kaludercic
2023-05-06 19:08                         ` Eli Zaretskii
2023-05-07  7:43                           ` Philip Kaludercic
2023-05-06 19:15                         ` Dmitry Gutov
2023-05-06 19:14                       ` Dmitry Gutov
2023-05-06 19:38                         ` Eli Zaretskii
2023-05-06 20:31                           ` Dmitry Gutov
2023-05-06 20:52                             ` João Távora
2023-05-07  5:51                             ` Eli Zaretskii
2023-05-07  8:46                               ` Philip Kaludercic
2023-05-07  9:32                                 ` Eli Zaretskii
2023-05-07 17:16                                   ` Philip Kaludercic [this message]
2023-05-07 18:32                                     ` Eli Zaretskii
2023-05-07 19:24                                       ` Philip Kaludercic
2023-05-07 19:32                                         ` Eli Zaretskii
2023-05-07 19:44                                           ` Philip Kaludercic
2023-05-08 11:19                                             ` Eli Zaretskii
2023-05-12 12:35                                               ` Eli Zaretskii
2023-05-08 11:20                                             ` Eli Zaretskii
2023-05-08 13:34                                               ` Philip Kaludercic
2023-05-08 13:44                                                 ` Eli Zaretskii
2023-05-10  6:59                                                   ` Philip Kaludercic
2023-05-10 11:03                                                     ` Philip Kaludercic
2023-05-10 14:06                                                       ` Eli Zaretskii
2023-05-10 15:02                                                       ` Ruijie Yu via Emacs development discussions.
2023-05-11  7:29                                                         ` Philip Kaludercic
2023-05-10 22:19                                                       ` Dmitry Gutov
2023-05-11  7:26                                                         ` Philip Kaludercic
2023-05-11  9:43                                                           ` Dmitry Gutov
2023-05-11 10:46                                                             ` Eli Zaretskii
2023-05-12  6:43                                                             ` Philip Kaludercic
2023-05-07 20:36                                           ` Dmitry Gutov
2023-05-08 11:24                                             ` Eli Zaretskii
2023-05-08 21:39                                               ` Dmitry Gutov
2023-05-12 12:34                                               ` Eli Zaretskii
2023-05-07  9:50                               ` Dmitry Gutov
2023-05-07 10:55                                 ` Eli Zaretskii
2023-05-06 16:58                 ` João Távora

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=875y94f4eo.fsf@posteo.net \
    --to=philipk@posteo.net \
    --cc=dmitry@gutov.dev \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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).