GNU bug report logs - #63785
29.0.91; Clearing package list filters also clears flags

Previous Next

Package: emacs;

Reported by: Robert Pluim <rpluim <at> gmail.com>

Date: Mon, 29 May 2023 14:45:02 UTC

Severity: normal

Found in version 29.0.91

To reply to this bug, email your comments to 63785 AT debbugs.gnu.org.

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#63785; Package emacs. (Mon, 29 May 2023 14:45:02 GMT) Full text and rfc822 format available.

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

From: Robert Pluim <rpluim <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 29.0.91; Clearing package list filters also clears flags
Date: Mon, 29 May 2023 16:44:53 +0200
M-x list-packages
/ n ack ;; navigate to the line for 'ack'
i ;; 'ack' has the 'I' flag
/ / ;; 'ack' no longer has the I flag


I was expecting the filtering commands and the action commands not to
interact at all. This makes it harder to do 'search for foo, mark,
search for bar, mark, install', you have to remember to execute the
action after each mark command.

Thanks

Robert

In GNU Emacs 29.0.91 (build 25, x86_64-pc-linux-gnu, GTK+ Version
 3.24.24, cairo version 1.16.0) of 2023-05-29 built on rltb
Repository revision: a7883d52f808568816e3f144fadbeacdd6f2cdfe
Repository branch: emacs-29
Windowing system distributor 'The X.Org Foundation', version 11.0.12009000
System Description: Debian GNU/Linux 11 (bullseye)

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NOTIFY
INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF
TOOLKIT_SCROLL_BARS WEBP X11 XDBE XIM XINPUT2 XPM GTK3 ZLIB

Robert
-- 




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#63785; Package emacs. (Mon, 29 May 2023 16:49:01 GMT) Full text and rfc822 format available.

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

From: Eshel Yaron <me <at> eshelyaron.com>
To: Robert Pluim <rpluim <at> gmail.com>
Cc: 63785 <at> debbugs.gnu.org
Subject: Re: bug#63785: 29.0.91; Clearing package list filters also clears
 flags
Date: Mon, 29 May 2023 19:48:45 +0300
[Message part 1 (text/plain, inline)]
Robert Pluim <rpluim <at> gmail.com> writes:

> M-x list-packages
> / n ack ;; navigate to the line for 'ack'
> i ;; 'ack' has the 'I' flag
> / / ;; 'ack' no longer has the I flag
>
> This makes it harder to do 'search for foo, mark,
> search for bar, mark, install', you have to remember to execute the
> action after each mark command.
>

That's an interesting issue, it can be a bit tricky because while
filtering for "bar", "foo" is no longer anywhere to be found in the
buffer.  So AFAIU to solve this Emacs needs to maintain something like a
buffer-local association between list entry (package) ids and the tags
they were given.

This sounds like something that applies more broadly to other
`tabulated-list-mode` derivatives as well.  The attached patch adds a
`tabulated-list-maintain-tags` variable and enables it in
`package-menu-mode`.  With it I can search and mark foo, then search and
mark bar, and then install both, as you say.  WDYT?


[0001-Maintain-tags-when-filtering-packages.patch (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#63785; Package emacs. (Mon, 29 May 2023 17:05:01 GMT) Full text and rfc822 format available.

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

From: Robert Pluim <rpluim <at> gmail.com>
To: Eshel Yaron <me <at> eshelyaron.com>
Cc: 63785 <at> debbugs.gnu.org
Subject: Re: bug#63785: 29.0.91; Clearing package list filters also clears
 flags
Date: Mon, 29 May 2023 19:04:27 +0200
>>>>> On Mon, 29 May 2023 19:48:45 +0300, Eshel Yaron <me <at> eshelyaron.com> said:

    Eshel> Robert Pluim <rpluim <at> gmail.com> writes:
    >> M-x list-packages
    >> / n ack ;; navigate to the line for 'ack'
    >> i ;; 'ack' has the 'I' flag
    >> / / ;; 'ack' no longer has the I flag
    >> 
    >> This makes it harder to do 'search for foo, mark,
    >> search for bar, mark, install', you have to remember to execute the
    >> action after each mark command.
    >> 

    Eshel> That's an interesting issue, it can be a bit tricky because while
    Eshel> filtering for "bar", "foo" is no longer anywhere to be found in the
    Eshel> buffer.  So AFAIU to solve this Emacs needs to maintain something like a
    Eshel> buffer-local association between list entry (package) ids and the tags
    Eshel> they were given.

    Eshel> This sounds like something that applies more broadly to other
    Eshel> `tabulated-list-mode` derivatives as well.  The attached patch adds a
    Eshel> `tabulated-list-maintain-tags` variable and enables it in
    Eshel> `package-menu-mode`.  With it I can search and mark foo, then search and
    Eshel> mark bar, and then install both, as you say.  WDYT?

Itʼs close. The following is still suprising

/ n helm
i
/ /
/ n ack
i
x

That only offer to installs ack, even though Iʼve marked helm. If I
clear the filters then 'x' offers to install both. Although I could
argue that Iʼm in a filtered state, so offering to install only
visible packages is normal :-)

Robert
-- 




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#63785; Package emacs. (Tue, 30 May 2023 08:44:01 GMT) Full text and rfc822 format available.

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

From: Eshel Yaron <me <at> eshelyaron.com>
To: Robert Pluim <rpluim <at> gmail.com>
Cc: 63785 <at> debbugs.gnu.org
Subject: Re: bug#63785: 29.0.91; Clearing package list filters also clears
 flags
Date: Tue, 30 May 2023 11:43:51 +0300
Robert Pluim <rpluim <at> gmail.com> writes:

>>>>>> On Mon, 29 May 2023 19:48:45 +0300, Eshel Yaron <me <at> eshelyaron.com> said:
>
>     Eshel> Robert Pluim <rpluim <at> gmail.com> writes:
>     >> M-x list-packages
>     >> / n ack ;; navigate to the line for 'ack'
>     >> i ;; 'ack' has the 'I' flag
>     >> / / ;; 'ack' no longer has the I flag
>     >> 
>     >> This makes it harder to do 'search for foo, mark,
>     >> search for bar, mark, install', you have to remember to execute the
>     >> action after each mark command.
>     >> 
>
>     Eshel> That's an interesting issue, it can be a bit tricky because while
>     Eshel> filtering for "bar", "foo" is no longer anywhere to be found in the
>     Eshel> buffer.  So AFAIU to solve this Emacs needs to maintain something like a
>     Eshel> buffer-local association between list entry (package) ids and the tags
>     Eshel> they were given.
>
>     Eshel> This sounds like something that applies more broadly to other
>     Eshel> `tabulated-list-mode` derivatives as well.  The attached patch adds a
>     Eshel> `tabulated-list-maintain-tags` variable and enables it in
>     Eshel> `package-menu-mode`.  With it I can search and mark foo, then search and
>     Eshel> mark bar, and then install both, as you say.  WDYT?
>
> Itʼs close. The following is still suprising
>
> / n helm
> i
> / /
> / n ack
> i
> x
>
> That only offer to installs ack, even though Iʼve marked helm. If I
> clear the filters then 'x' offers to install both.  Although I could
> argue that Iʼm in a filtered state, so offering to install only
> visible packages is normal :-)

Yes, that's what I thought.  Only installing visible packages when the
menu is filtered seems sensible to me.  Although I guess
`package-menu-execute` could be extended with some option that says what
to do in these cases, maybe by default it could suggest clearing the
filter first?





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#63785; Package emacs. (Tue, 30 May 2023 09:20:02 GMT) Full text and rfc822 format available.

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

From: Robert Pluim <rpluim <at> gmail.com>
To: Eshel Yaron <me <at> eshelyaron.com>
Cc: 63785 <at> debbugs.gnu.org
Subject: Re: bug#63785: 29.0.91; Clearing package list filters also clears
 flags
Date: Tue, 30 May 2023 11:19:14 +0200
>>>>> On Tue, 30 May 2023 11:43:51 +0300, Eshel Yaron <me <at> eshelyaron.com> said:
    >> That only offer to installs ack, even though Iʼve marked helm. If I
    >> clear the filters then 'x' offers to install both.  Although I could
    >> argue that Iʼm in a filtered state, so offering to install only
    >> visible packages is normal :-)

    Eshel> Yes, that's what I thought.  Only installing visible packages when the
    Eshel> menu is filtered seems sensible to me.  Although I guess
    Eshel> `package-menu-execute` could be extended with some option that says what
    Eshel> to do in these cases, maybe by default it could suggest clearing the
    Eshel> filter first?

Maybe. Iʼm wary of adding too much DWIMery here. Limiting the
installation to the visible packages seems like a reasonable and
unsurprising way to behave (and people who want to install all the
selected packages just need to do '/ /')

Robert
-- 




This bug report was last modified 337 days ago.

Previous Next


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