GNU bug report logs - #41436
26.1; How to list upgradable packages only

Previous Next

Package: emacs;

Reported by: Eduardo Mercovich <eduardo <at> mercovich.net>

Date: Thu, 21 May 2020 14:45:02 UTC

Severity: wishlist

Tags: patch

Found in version 26.1

Fixed in version 28.1

Done: Stefan Kangas <stefan <at> marxist.se>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 41436 in the body.
You can then email your comments to 41436 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#41436; Package emacs. (Thu, 21 May 2020 14:45:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Eduardo Mercovich <eduardo <at> mercovich.net>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 21 May 2020 14:45:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Eduardo Mercovich <eduardo <at> mercovich.net>
To: bug-gnu-emacs <at> gnu.org
Subject: 26.1; How to list upgradable packages only
Date: Thu, 21 May 2020 11:00:23 -0300
Dear Emacs Devs.

Along with my thanks, I'd like to report a feature request, as per the
discussion in the Emacs Reddit group
(https://www.reddit.com/r/emacs/comments/gnci5o/how_to_list_upgradable_packages_only/)
and the suggestion from https://www.reddit.com/user/cpitclaudel/

Here is the case: 

--8<---------------cut here---------------start------------->8---

Upon refreshing the repos, the emacs package manager (PM) tells us
if/how many packages we have to upgrade. With U we can mark them all,
and with X let the PM do it's job (uninstall old versions, install the
new ones). Up to here, everything is great. 

However, being a rookie, I' afraid of upgrading 28 packages at once
since some things may break, so I prefer to upgrade them in small groups
in a more controlled way. 

But, for my life, even after quite some searching and reading I can't
find how to filter the list by that status (the command
package-menu-filter does something different or I don't understand how
to use it for this), so I can see only the packages that can be
upgraded. With that list in front of me, I can pick which ones to
upgrade, slowly and in a more controlled path. 

I'm sure something like that exists, but obviously I'm not finding the
right keywords.

--8<---------------cut here---------------end--------------->8---

Again, thanks a lot for sharing your work with all of us. :)

What follows is part of my local install, although it's probably useless
in this case.

In GNU Emacs 26.1 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.5)
of 2019-09-23, modified by Debian built on x86-grnet-01
Windowing system distributor 'The X.Org Foundation', version 11.0.12004000
System Description:	Debian GNU/Linux 10 (buster)

Configured using:
'configure --build x86_64-linux-gnu --prefix=/usr
--sharedstatedir=/var/lib --libexecdir=/usr/lib
--localstatedir=/var/lib --infodir=/usr/share/info
--mandir=/usr/share/man --enable-libsystemd --with-pop=yes
--enable-locallisppath=/etc/emacs:/usr/local/share/emacs/26.1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/26.1/site-lisp:/usr/share/emacs/site-lisp
--with-sound=alsa --without-gconf --with-mailutils --build
x86_64-linux-gnu --prefix=/usr --sharedstatedir=/var/lib
--libexecdir=/usr/lib --localstatedir=/var/lib
--infodir=/usr/share/info --mandir=/usr/share/man --enable-libsystemd
--with-pop=yes
--enable-locallisppath=/etc/emacs:/usr/local/share/emacs/26.1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/26.1/site-lisp:/usr/share/emacs/site-lisp
--with-sound=alsa --without-gconf --with-mailutils --with-x=yes
--with-x-toolkit=gtk3 --with-toolkit-scroll-bars 'CFLAGS=-g -O2
-fdebug-prefix-map=/build/emacs-StqULU/emacs-26.1+1=.
-fstack-protector-strong -Wformat -Werror=format-security -Wall'
'CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2' LDFLAGS=-Wl,-z,relro'
Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS NOTIFY
ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11 THREADS LIBSYSTEMD LCMS2
Important settings:
 value of $LANG: es_AR.UTF-8
 locale-coding-system: utf-8-unix

Major mode: Org

Minor modes in effect:
 diff-auto-refine-mode: t
 shell-dirtrack-mode: t
 auto-image-file-mode: t
 flyspell-mode: t
 org-indent-mode: t
 org-roam-mode: t
 display-time-mode: t
 desktop-save-mode: t
 pdf-occur-global-minor-mode: t
 wrap-region-mode: t
 async-bytecomp-package-mode: t
 helm-mode: t
 global-hi-lock-mode: t
 hi-lock-mode: t
 electric-pair-mode: t
 delete-selection-mode: t
 savehist-mode: t
 smartparens-global-mode: t
 smartparens-mode: t
 org-bullets-mode: t
 beacon-mode: t
 override-global-mode: t
 tooltip-mode: t
 global-eldoc-mode: t
 electric-indent-mode: t
 mouse-wheel-mode: t
 file-name-shadow-mode: t
 global-font-lock-mode: t
 font-lock-mode: t
 auto-composition-mode: t
 auto-encryption-mode: t
 auto-compression-mode: t
 line-number-mode: t
 global-visual-line-mode: t
 visual-line-mode: t
 transient-mark-mode: t
 abbrev-mode: t

Memory information:
((conses 16 2194798 1708575)
(symbols 48 68434 188)
(miscs 40 1962 3428)
(strings 32 296075 153673)
(string-bytes 1 9977187)
(vectors 16 84246)
(vector-slots 8 2071025 227004)
(floats 8 1245 490)
(intervals 56 271031 239055)
(buffers 992 38))

-- 
eduardo mercovich

Donde se cruzan tus talentos 
con las necesidades del mundo, 
ahí está tu vocación. 
(Anónimo)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#41436; Package emacs. (Sun, 23 Aug 2020 16:17:01 GMT) Full text and rfc822 format available.

Message #8 received at 41436 <at> debbugs.gnu.org (full text, mbox):

From: Marcin Włodarczak <marcin <at> wlodarczak.org>
To: Eduardo Mercovich <eduardo <at> mercovich.net>
Cc: 41436 <at> debbugs.gnu.org
Subject: Re: bug#41436: 26.1; How to list upgradable packages only
Date: Sun, 23 Aug 2020 18:16:00 +0200
Eduardo Mercovich <eduardo <at> mercovich.net> writes:

>
> Upon refreshing the repos, the emacs package manager (PM) tells us
> if/how many packages we have to upgrade. With U we can mark them all,
> and with X let the PM do it's job (uninstall old versions, install the
> new ones). Up to here, everything is great.
>
> However, being a rookie, I' afraid of upgrading 28 packages at once
> since some things may break, so I prefer to upgrade them in small groups
> in a more controlled way. 
>
> But, for my life, even after quite some searching and reading I can't
> find how to filter the list by that status (the command
> package-menu-filter does something different or I don't understand how
> to use it for this), so I can see only the packages that can be
> upgraded. With that list in front of me, I can pick which ones to
> upgrade, slowly and in a more controlled path.

I too think such a feature would be useful. The following would get us
part of the way but it has two problems:

1. It lists both the installed packages and the upgrade candidates.
2. As far as I can see, there is no mechanism for marking individual
packages for upgrading.

As a matter of fact, I think an even more general filtering mechanism
would be useful, which would allow us to show, say, all installed
packages or all dependencies, etc. but it does indeed seem that at the
moment only keyword filtering is supported. I could try to add it if
people think this makes sense.

(defun package-menu-show-upgradable ()
  (interactive)
  (let ((upgrades (mapcar 'car (package-menu--find-upgrades))))
    (package-show-package-list upgrades)))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#41436; Package emacs. (Sun, 23 Aug 2020 16:45:02 GMT) Full text and rfc822 format available.

Message #11 received at 41436 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefankangas <at> gmail.com>
To: Eduardo Mercovich <eduardo <at> mercovich.net>, 41436 <at> debbugs.gnu.org
Subject: Re: bug#41436: 26.1; How to list upgradable packages only
Date: Sun, 23 Aug 2020 12:43:56 -0400
Eduardo Mercovich <eduardo <at> mercovich.net> writes:

> But, for my life, even after quite some searching and reading I can't
> find how to filter the list by that status (the command
> package-menu-filter does something different or I don't understand how
> to use it for this), so I can see only the packages that can be
> upgraded.

This feature is already in master and will be part of Emacs 28.1.
Unfortunately, the patch wasn't merged in time for Emacs 27.

commit aea12d4903136c057bb14d3fd7683bf7a4e1eff6
Author: Stefan Kangas <stefankangas <at> gmail.com>
Date:   Wed Feb 5 13:12:01 2020 +0100

    Add new filter commands to Package Menu (Bug#38424)

    * lisp/emacs-lisp/package.el (package-menu-filter-by-version)
    (package-menu-filter-by-status, package-menu-filter-by-archive):
    New filter commands.

Please try it out and see if it works for you.

Best regards,
Stefan Kangas




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#41436; Package emacs. (Sun, 23 Aug 2020 16:59:01 GMT) Full text and rfc822 format available.

Message #14 received at 41436 <at> debbugs.gnu.org (full text, mbox):

From: Marcin Włodarczak <marcin <at> wlodarczak.org>
To: Stefan Kangas <stefankangas <at> gmail.com>
Cc: Eduardo Mercovich <eduardo <at> mercovich.net>, 41436 <at> debbugs.gnu.org
Subject: Re: bug#41436: 26.1; How to list upgradable packages only
Date: Sun, 23 Aug 2020 18:58:25 +0200
Stefan Kangas <stefankangas <at> gmail.com> writes:

> Eduardo Mercovich <eduardo <at> mercovich.net> writes:
>
>> But, for my life, even after quite some searching and reading I can't
>> find how to filter the list by that status (the command
>> package-menu-filter does something different or I don't understand how
>> to use it for this), so I can see only the packages that can be
>> upgraded.
>
> This feature is already in master and will be part of Emacs 28.1.
> Unfortunately, the patch wasn't merged in time for Emacs 27.

Oh, great. This is precisely what I had in mind but to come back to the
problem at hand the way to show upgradable packages would be to first
mark them (package-menu-mark-upgrades) and then filter marked?

I wonder whether it would not be nice to be able to list all upgradable
packages and then give the user an option of marking them one by one.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#41436; Package emacs. (Sun, 23 Aug 2020 17:56:02 GMT) Full text and rfc822 format available.

Message #17 received at 41436 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefankangas <at> gmail.com>
To: Marcin Włodarczak <marcin <at> wlodarczak.org>
Cc: Eduardo Mercovich <eduardo <at> mercovich.net>, 41436 <at> debbugs.gnu.org
Subject: Re: bug#41436: 26.1; How to list upgradable packages only
Date: Sun, 23 Aug 2020 13:55:36 -0400
Marcin Włodarczak <marcin <at> wlodarczak.org> writes:

> Oh, great. This is precisely what I had in mind but to come back to the
> problem at hand the way to show upgradable packages would be to first
> mark them (package-menu-mark-upgrades) and then filter marked?

Yes.

> I wonder whether it would not be nice to be able to list all upgradable
> packages and then give the user an option of marking them one by one.

I think it sounds useful.

Best regards,
Stefan Kangas




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#41436; Package emacs. (Sun, 23 Aug 2020 21:56:03 GMT) Full text and rfc822 format available.

Message #20 received at 41436 <at> debbugs.gnu.org (full text, mbox):

From: Eduardo Mercovich <eduardo <at> mercovich.net>
To: Stefan Kangas <stefankangas <at> gmail.com>
Cc: Marcin Włodarczak <marcin <at> wlodarczak.org>,
 41436 <at> debbugs.gnu.org
Subject: Re: bug#41436: 26.1; How to list upgradable packages only
Date: Sun, 23 Aug 2020 18:01:08 -0300
Hello. :)

[...]

>> I wonder whether it would not be nice to be able to list all upgradable
>> packages and then give the user an option of marking them one by one.

> I think it sounds useful.

Me too.
Does it helps to make a brief activity diagram to show the task flux?

Here, simplified, in text and linealized:

1. See the list.
2. There is a notice about new packages.
 a. Wanna see them?
   1. If no, let's keep in the list.
   2. If yes, go to new list (only upgradable)

In the ugradable list:
1. mark some or none.
2. upgrade or...
3. ... go to the full list.

Thanks for your effort... :)

-- 
eduardo mercovich

Donde se cruzan tus talentos 
con las necesidades del mundo, 
ahí está tu vocación. 
(Anónimo)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#41436; Package emacs. (Tue, 08 Sep 2020 12:54:02 GMT) Full text and rfc822 format available.

Message #23 received at 41436 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefan <at> marxist.se>
To: Marcin Włodarczak <marcin <at> wlodarczak.org>
Cc: Eduardo Mercovich <eduardo <at> mercovich.net>, 41436 <at> debbugs.gnu.org
Subject: Re: bug#41436: 26.1; How to list upgradable packages only
Date: Tue, 8 Sep 2020 12:53:20 +0000
[Message part 1 (text/plain, inline)]
tags 41436 + patch
thanks

Stefan Kangas <stefankangas <at> gmail.com> writes:

>> I wonder whether it would not be nice to be able to list all upgradable
>> packages and then give the user an option of marking them one by one.
>
> I think it sounds useful.

Could you please try the attached patch and see if it works for you?
It should be applied to the master branch.

Best regards,
Stefan Kangas
[0001-Add-command-package-menu-filter-upgradable.patch (text/x-diff, attachment)]

Added tag(s) patch. Request was from Stefan Kangas <stefan <at> marxist.se> to control <at> debbugs.gnu.org. (Tue, 08 Sep 2020 12:54:03 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#41436; Package emacs. (Mon, 19 Oct 2020 18:43:02 GMT) Full text and rfc822 format available.

Message #28 received at 41436 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefan <at> marxist.se>
To: Marcin Włodarczak <marcin <at> wlodarczak.org>
Cc: Eduardo Mercovich <eduardo <at> mercovich.net>, 41436 <at> debbugs.gnu.org
Subject: Re: bug#41436: 26.1; How to list upgradable packages only
Date: Mon, 19 Oct 2020 18:42:04 +0000
close 41436 28.1
thanks

Stefan Kangas <stefan <at> marxist.se> writes:

> Could you please try the attached patch and see if it works for you?
> It should be applied to the master branch.

No comments within 5 weeks, so I've now pushed this to master as commit
8c96c720fa.




bug marked as fixed in version 28.1, send any further explanations to 41436 <at> debbugs.gnu.org and Eduardo Mercovich <eduardo <at> mercovich.net> Request was from Stefan Kangas <stefan <at> marxist.se> to control <at> debbugs.gnu.org. (Mon, 19 Oct 2020 18:43:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 17 Nov 2020 12:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 131 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.