From unknown Fri Jun 20 07:17:39 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#63785 <63785@debbugs.gnu.org> To: bug#63785 <63785@debbugs.gnu.org> Subject: Status: 29.0.91; Clearing package list filters also clears flags Reply-To: bug#63785 <63785@debbugs.gnu.org> Date: Fri, 20 Jun 2025 14:17:39 +0000 retitle 63785 29.0.91; Clearing package list filters also clears flags reassign 63785 emacs submitter 63785 Robert Pluim severity 63785 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Mon May 29 10:45:01 2023 Received: (at submit) by debbugs.gnu.org; 29 May 2023 14:45:01 +0000 Received: from localhost ([127.0.0.1]:58716 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q3e7I-0001Fy-Sq for submit@debbugs.gnu.org; Mon, 29 May 2023 10:45:01 -0400 Received: from lists.gnu.org ([209.51.188.17]:49166) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q3e7G-0001Fq-Io for submit@debbugs.gnu.org; Mon, 29 May 2023 10:44:59 -0400 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 1q3e7G-00012x-CN for bug-gnu-emacs@gnu.org; Mon, 29 May 2023 10:44:58 -0400 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q3e7E-0002EX-Of for bug-gnu-emacs@gnu.org; Mon, 29 May 2023 10:44:58 -0400 Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-3f6a6b9c079so22066635e9.1 for ; Mon, 29 May 2023 07:44:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1685371495; x=1687963495; h=mime-version:message-id:date:subject:to:from:from:to:cc:subject :date:message-id:reply-to; bh=bRidPrp9HG89pGIHu7cUGoD2HNMEykPUXu/jorEh5/U=; b=CAf6h+NrQM9PUVUQYdyqsXl2R35YNVx9MhaHMC6lOjR1YHHeOEE55clFQJru2qT8As 0Mnxgjs91Qu+oIM2qW4Ct9crcdRGCpaKMbTYOQAPkeisa3GS0D+u5PxGIkU/jak7VP5i Y5vLO9jBX//onnaeJhZEwtdLvfYnJYqmF6AfimNvo50OzFbHvLakNjQGtJdzcl8yteP6 ARBRSJmLgxxNShBbCBCmbOqkpAwaryBzbkCeQG1h3N9raLMgWly5FOCA36k5guJKYcfa Y1Pd2nwYnX0TL3y13npB3mizSWLcIZDes63XEl3Xk0DhaaEAsEK2RhZ37zgsDbU0tvx+ TTyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685371495; x=1687963495; h=mime-version:message-id:date:subject:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=bRidPrp9HG89pGIHu7cUGoD2HNMEykPUXu/jorEh5/U=; b=NcjbqfKWD9UYo7scWjjwhjlHDlf+DWABF/2M1s4pwl7yKnxOC2HKkPjhkkGRnGJKOL VASAihCQTQMbjzc29W1r266qnVZvkYtbdgd9PQMrF4ZctyFhiyoCKKpPzQ+U67rfCLxF q16n3mJ1fYZjkGXjGTj96lufbdslc1NdhfyNLzK4QU5rW7Dppm8nbCc+49GY8CuJtCJi AKXh6yr68q9BaE76H/SHTVzOC8iu69SPrnHbuCVEbBFjQumX3tnuSMbEwytkOH9UMwBj ghhKZmYXwCfBIGYRrVSLXo8l/kJ3Ft+Hr/vJ4+phXSRIHAUDEyKtsLNgfgVxZsjY9JFk 3c7g== X-Gm-Message-State: AC+VfDySw/bHs49wD5CdbCVx7bTyTe7Im/YbMZvIM7ZAPukp3iFYDrbV q872rUl9lIw0v7KeNWJJzzg9AVbUbz8= X-Google-Smtp-Source: ACHHUZ67jeCQhHlEnkZUq9A2mzp2pPc5ElYXimhK6EEJp4GdeCu9ft3rvtstKkyo5z6e0YDejIzhSg== X-Received: by 2002:a05:600c:2113:b0:3f4:28db:f5ff with SMTP id u19-20020a05600c211300b003f428dbf5ffmr8233995wml.35.1685371494707; Mon, 29 May 2023 07:44:54 -0700 (PDT) Received: from rltb ([82.66.8.55]) by smtp.gmail.com with ESMTPSA id l6-20020a7bc446000000b003f6d564db48sm14093392wmi.4.2023.05.29.07.44.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 May 2023 07:44:54 -0700 (PDT) From: Robert Pluim To: bug-gnu-emacs@gnu.org Subject: 29.0.91; Clearing package list filters also clears flags X-Debbugs-No-Ack: yes Date: Mon, 29 May 2023 16:44:53 +0200 Message-ID: <87y1l7b3iy.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2a00:1450:4864:20::332; envelope-from=rpluim@gmail.com; helo=mail-wm1-x332.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) 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 -- From debbugs-submit-bounces@debbugs.gnu.org Mon May 29 12:48:55 2023 Received: (at 63785) by debbugs.gnu.org; 29 May 2023 16:48:55 +0000 Received: from localhost ([127.0.0.1]:59015 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q3g3C-0001Mo-Pl for submit@debbugs.gnu.org; Mon, 29 May 2023 12:48:55 -0400 Received: from mail.eshelyaron.com ([107.175.124.16]:58012 helo=eshelyaron.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q3g39-0001Mf-GD for 63785@debbugs.gnu.org; Mon, 29 May 2023 12:48:52 -0400 From: Eshel Yaron DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eshelyaron.com; s=mail; t=1685378930; bh=9aUwbvusIjzXWEAqLuzIKH7UKITsqXHnMRmfYQG5JuE=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=uU+E3F4hPmZrRpo+jBflVn8tRTfXIU3rfS14sZl3f+KE6T04Qyqdv6oxAXrRHFdHR Agpgdsk8f1Mf0Smkf1VkwgTacxbTfe6m1dNVuh5hJ+qoCiQ1n5EcBZpg/1P5NRW1Pl BK3fyZyNBvZTrtU4DA8QUjTcWB9Cd0PJ6GNtmnYcNiZKoshb0djTx48foWGEhvPxX4 6wAZ/Eomac87IbPFEkfi6mO2zIgWqX5EuMuJXip+v98A5qX69Sz79KHmybYGS26upW O6lYb8P3SLieUgjLGmnq3FF7JHybJo+/Htktlpyc8SEIjcHBk6DHhzenJJCXfke0aM iambl46EeYPsw== To: Robert Pluim Subject: Re: bug#63785: 29.0.91; Clearing package list filters also clears flags In-Reply-To: <87y1l7b3iy.fsf@gmail.com> (Robert Pluim's message of "Mon, 29 May 2023 16:44:53 +0200") References: <87y1l7b3iy.fsf@gmail.com> Date: Mon, 29 May 2023 19:48:45 +0300 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 63785 Cc: 63785@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain Robert Pluim 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? --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Maintain-tags-when-filtering-packages.patch >From d94febc93f840a28187cd9e3831be0deb0fa4c61 Mon Sep 17 00:00:00 2001 From: Eshel Yaron Date: Mon, 29 May 2023 19:23:12 +0300 Subject: [PATCH] Maintain tags when filtering packages Allow 'tabulated-list-mode' derivatives to maintain tags when repopulating the buffer. Enable this option in 'package-menu-mode'. * lisp/emacs-lisp/tabulated-list.el (tabulated-list-tags-alist) (tabulated-list-maintain-tags): New buffer-local variables. (tabulated-list-put-tag): Associate entries with tags in 'tabulated-list-tags-alist'. (tabulated-list-print): Restore tags if 'tabulated-list-maintain-tags' is non-nil. * lisp/emacs-lisp/package.el (package-menu-mode): Enable 'tabulated-list-maintain-tags'. (Bug#63785) --- lisp/emacs-lisp/package.el | 1 + lisp/emacs-lisp/tabulated-list.el | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 69595601bc8..a050f405ba0 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -3145,6 +3145,7 @@ package-menu-mode ("Description" 0 package-menu--description-predicate)]) (setq tabulated-list-padding 2) (setq tabulated-list-sort-key (cons "Status" nil)) + (setq tabulated-list-maintain-tags t) (add-hook 'tabulated-list-revert-hook #'package-menu--refresh nil t) (tabulated-list-init-header) (setq revert-buffer-function 'package-menu--refresh-contents) diff --git a/lisp/emacs-lisp/tabulated-list.el b/lisp/emacs-lisp/tabulated-list.el index ddac6ed1746..e1922279039 100644 --- a/lisp/emacs-lisp/tabulated-list.el +++ b/lisp/emacs-lisp/tabulated-list.el @@ -167,6 +167,12 @@ tabulated-list-sort-key non-nil, means to invert the resulting sort.") (put 'tabulated-list-sort-key 'permanent-local t) +(defvar-local tabulated-list-tags-alist nil + "Association between entry ids and their tags in the current buffer.") + +(defvar-local tabulated-list-maintain-tags nil + "When non-nil, maintain tags when repopulating the current tabulated list.") + (defsubst tabulated-list-get-id (&optional pos) "Return the entry ID of the Tabulated List entry at POS. The value is an ID object from `tabulated-list-entries', or nil. @@ -200,6 +206,8 @@ tabulated-list-put-tag (make-string (- tabulated-list-padding width) ?\s)) (truncate-string-to-width tag tabulated-list-padding)))) (delete-region beg (+ beg tabulated-list-padding))))) + (when-let ((id (tabulated-list-get-id))) + (setf (alist-get id tabulated-list-tags-alist) tag)) (if advance (forward-line))) @@ -497,6 +505,14 @@ tabulated-list-print (setq entries (cdr entries))) (when update (delete-region (point) (point-max))) + (when tabulated-list-maintain-tags + (save-excursion + (goto-char (point-min)) + (while (not (eobp)) + (when-let ((id (tabulated-list-get-id)) + (tag (alist-get id tabulated-list-tags-alist))) + (tabulated-list-put-tag tag)) + (forward-line)))) (set-buffer-modified-p nil) ;; If REMEMBER-POS was specified, move to the "old" location. (if saved-pt -- 2.40.1 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Mon May 29 13:04:38 2023 Received: (at 63785) by debbugs.gnu.org; 29 May 2023 17:04:38 +0000 Received: from localhost ([127.0.0.1]:59030 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q3gIQ-0001lv-6A for submit@debbugs.gnu.org; Mon, 29 May 2023 13:04:38 -0400 Received: from mail-wr1-f41.google.com ([209.85.221.41]:54402) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q3gIN-0001lf-Il for 63785@debbugs.gnu.org; Mon, 29 May 2023 13:04:36 -0400 Received: by mail-wr1-f41.google.com with SMTP id ffacd0b85a97d-30ad8f33f1aso2077517f8f.0 for <63785@debbugs.gnu.org>; Mon, 29 May 2023 10:04:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1685379869; x=1687971869; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=zmc8htqQdJt4JbEN7JND2kGu5RLJ7prAv+VxpMFHGlg=; b=BSu30YzJamCa5+wdf/GnSCqPXlwxK6aqod0IwQYh4s6lyf3DVDGZoHgLTtOmbSRqKP rdImhCtXV/UgCMjVOkz2sZ6TxEGepuefFsNzfFUMMsjCaaeDCRJSz2q7KG8zK1quvRm1 JwR0BxxSCVlT33RGIJ2ar0iHzmhbTq8hgcMHbn+d2T4/fSmBzbj1w2ZyDxGXq7i/oAEy MJmhs1bHp5SLvS+JtpZRhTP7Vf8XBp9xDGOzQAjDxvAtzGJtsgFAw0L1DEj6Euh4lQDh LawdDVgwwcAaQDLoqdPflD9Zv1K/44Fwlfr2O71BOwCHUFJusCnSY3vz5IjGHaKDr3S5 1ugA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685379869; x=1687971869; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=zmc8htqQdJt4JbEN7JND2kGu5RLJ7prAv+VxpMFHGlg=; b=G7Jow+3IXPSC9AFmm5hARh4Dzz2qFjxyw/Fa4clBIuSMiW+tsYhYozeEtSlVnBjQR4 LWQ1OZ4mikIHStlW7rtLbjrZRYBMG09M0GvkFRl1MpWTOykx6eSLRVAvxkFR81loKwGC lacNs6QMl7v0Hu19XucaE54fDYFDGmmt6ZU269A2E7/8mNVvFhlGZ6hyIeL+wFG6C6/A Im6M8AsIvaCstzSP2FNAaTFGcHt39MgPxeYvgKbaMfA3rxiyTgnuzuN4lkIolNt7WrvD 3FhOChLHeDFZ4L0pi3dsP6Qitsv3+5a40OSy+0IcWY/RqbRMJYax1zu4sHGcRxqCgUIO MrBQ== X-Gm-Message-State: AC+VfDzK4XRnzlXJMNBx1TbjGsHp4bflcpeH//QI26bDFuGGyhU0oeHW SPMtCkWHURoBTQ+LWNQe1Qb4gzJnfdQ= X-Google-Smtp-Source: ACHHUZ52AXzRJeJ/A1LzxS0e+K358eVYwzFcgPtbIKfoSGzY8WX+7PhEy9kQRKHtCIY4TzuyH5Lxrw== X-Received: by 2002:a5d:4092:0:b0:309:4cd5:76f8 with SMTP id o18-20020a5d4092000000b003094cd576f8mr9043001wrp.2.1685379869182; Mon, 29 May 2023 10:04:29 -0700 (PDT) Received: from rltb ([82.66.8.55]) by smtp.gmail.com with ESMTPSA id b21-20020a05600c4e1500b003f4283f5c1bsm27145781wmq.2.2023.05.29.10.04.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 May 2023 10:04:28 -0700 (PDT) From: Robert Pluim To: Eshel Yaron Subject: Re: bug#63785: 29.0.91; Clearing package list filters also clears flags In-Reply-To: (Eshel Yaron's message of "Mon, 29 May 2023 19:48:45 +0300") References: <87y1l7b3iy.fsf@gmail.com> Date: Mon, 29 May 2023 19:04:27 +0200 Message-ID: <87o7m3ax2c.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 63785 Cc: 63785@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >>>>> On Mon, 29 May 2023 19:48:45 +0300, Eshel Yaron s= aid: Eshel> Robert Pluim 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 >>=20 >> 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. >>=20 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 somethin= g like a Eshel> buffer-local association between list entry (package) ids and th= e 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 a= dds a Eshel> `tabulated-list-maintain-tags` variable and enables it in Eshel> `package-menu-mode`. With it I can search and mark foo, then se= arch and Eshel> mark bar, and then install both, as you say. WDYT? It=CA=BCs close. The following is still suprising / n helm i / / / n ack i x That only offer to installs ack, even though I=CA=BCve marked helm. If I clear the filters then 'x' offers to install both. Although I could argue that I=CA=BCm in a filtered state, so offering to install only visible packages is normal :-) Robert --=20 From debbugs-submit-bounces@debbugs.gnu.org Tue May 30 04:43:56 2023 Received: (at 63785) by debbugs.gnu.org; 30 May 2023 08:43:56 +0000 Received: from localhost ([127.0.0.1]:60029 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q3uxQ-000511-Eb for submit@debbugs.gnu.org; Tue, 30 May 2023 04:43:56 -0400 Received: from mail.eshelyaron.com ([107.175.124.16]:37648 helo=eshelyaron.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q3uxO-00050t-M1 for 63785@debbugs.gnu.org; Tue, 30 May 2023 04:43:55 -0400 From: Eshel Yaron DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eshelyaron.com; s=mail; t=1685436234; bh=cEvQlmW2QQJmRafEt98yXgAyzj/m9L/cfaWHu6Tw824=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=pmrWE3qjz2M7nsBJapQK5YczcRzEft7HI+OH15+cj7nmGwISMik8IqhMDQz2LuM2P 3L1i/kOTyCiSNnow18bfH7xApOQdtqZHlApLAONgRlpwHTcZy4ygBBECD3+f1WL0mN M0pCC4CkA++XUsbaU1ypOXOIdejfiNsetaE1fl+0nuDZNxSlnakNvf6zaJ3iwuE2rG kiV6uZ/2VNYnH7Hk7hC3Jd6J+HacNRedwgUW+zBCRh7v8rBwKhLd0ubSIT5gLQBWAG 54r6E8miE5uWyGLQIulzyEM/9+fCKqyuhZnLmKECrXS1Hq73YxDVh1UnIJ4S6m+1dZ ncFlRcTJHmdQg== To: Robert Pluim Subject: Re: bug#63785: 29.0.91; Clearing package list filters also clears flags In-Reply-To: <87o7m3ax2c.fsf@gmail.com> (Robert Pluim's message of "Mon, 29 May 2023 19:04:27 +0200") References: <87y1l7b3iy.fsf@gmail.com> <87o7m3ax2c.fsf@gmail.com> Date: Tue, 30 May 2023 11:43:51 +0300 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 63785 Cc: 63785@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Robert Pluim writes: >>>>>> On Mon, 29 May 2023 19:48:45 +0300, Eshel Yaron = said: > > Eshel> Robert Pluim 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 > >>=20 > >> 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. > >>=20 > > Eshel> That's an interesting issue, it can be a bit tricky because wh= ile > Eshel> filtering for "bar", "foo" is no longer anywhere to be found i= n the > Eshel> buffer. So AFAIU to solve this Emacs needs to maintain someth= ing 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=CA=BCs close. The following is still suprising > > / n helm > i > / / > / n ack > i > x > > That only offer to installs ack, even though I=CA=BCve marked helm. If I > clear the filters then 'x' offers to install both. Although I could > argue that I=CA=BCm 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? From debbugs-submit-bounces@debbugs.gnu.org Tue May 30 05:19:24 2023 Received: (at 63785) by debbugs.gnu.org; 30 May 2023 09:19:24 +0000 Received: from localhost ([127.0.0.1]:60066 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q3vVk-0005yC-6N for submit@debbugs.gnu.org; Tue, 30 May 2023 05:19:24 -0400 Received: from mail-wm1-f49.google.com ([209.85.128.49]:56695) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q3vVh-0005xw-OC for 63785@debbugs.gnu.org; Tue, 30 May 2023 05:19:22 -0400 Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-3f60dfc6028so43841185e9.1 for <63785@debbugs.gnu.org>; Tue, 30 May 2023 02:19:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1685438355; x=1688030355; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=HmbaBCtnjDSK2jZzkc8dp5L0/YqNluXnyrHWnkzhw+4=; b=CeDfRjscr9RxRr7LLE9KFnzShHwyzzGpXYWtpwuRjs1f7GjQ+XRhsXNp9yYt0XQMVU fsqKNXQFu1OgCdh5hrr2lsNJuNuQhP7oEPgwBXpk9bhUitth3Q+1K/FvOrjkG//gx/Ui D/E7IwQhTFW52zdqD3sCUsSW3gjUk3ZCGIkYmyF7MHqjv2IJD7J+qFMRaF3A0NgfhT60 z0KUb8H41jKNgTHL8cwgUaplkbH7iWL16Wuz0H6zEyD5zYrrVxHGnYbjYjSKaoNVzubY YA9LGUBjjAAgxkW+/lmXXog1vK5U4Tp8lmcJ7DO3sIMLnINw1NwAWMLZVmaoHaDDb/m0 ygzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685438355; x=1688030355; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=HmbaBCtnjDSK2jZzkc8dp5L0/YqNluXnyrHWnkzhw+4=; b=QTVLNcepTaRqLDxsf/P11RqPfY6qh/QNWJUuptJJlQikitxRZ8KJN4MTaksr/PBEuF dhW2E5xPyzGlZzbN1kx/YAzFCrDetkMu3bgpwlTOj36aNMR/Vu+cdUvrqlb0tJax3uW1 JlQEnn42rTd+Wqn/rj5Jfe4CePMAN/3gcCJ6v/Dzq0B3/s0UptKEbCNxWeTByjFuvOYX RXzbyhCYc3Fc5/tj1dN2x9usM6ZrsvoPVxC9dMk+j6gcxPNSkKrzoOp5AKVOnVpp1sJO FZtZDFy/Xxlru1s1ZL8W8lDmq7eVRn/6y5eJ+020CEAcJ6dvyGmh0/8Gzav2eHwqATmL K17w== X-Gm-Message-State: AC+VfDzRZBd1suZzn887/KvIvkPi5eehwg5+CFjzUkhoMs4FsegcqXzV MOaE+OJO4ukhUIKYcxC0UBstigDDtxU= X-Google-Smtp-Source: ACHHUZ770fuYYjTm/A6q5ivocs0XuBm5q57ZyXQlt0hem2hi8GeoAjZ7XaNN4aDcuBg1FRbB+tckoQ== X-Received: by 2002:a05:600c:ac4:b0:3f6:906:1195 with SMTP id c4-20020a05600c0ac400b003f609061195mr998451wmr.35.1685438355360; Tue, 30 May 2023 02:19:15 -0700 (PDT) Received: from rltb ([82.66.8.55]) by smtp.gmail.com with ESMTPSA id p19-20020a1c7413000000b003f60e143d38sm16797137wmc.11.2023.05.30.02.19.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 May 2023 02:19:14 -0700 (PDT) From: Robert Pluim To: Eshel Yaron Subject: Re: bug#63785: 29.0.91; Clearing package list filters also clears flags In-Reply-To: (Eshel Yaron's message of "Tue, 30 May 2023 11:43:51 +0300") References: <87y1l7b3iy.fsf@gmail.com> <87o7m3ax2c.fsf@gmail.com> Date: Tue, 30 May 2023 11:19:14 +0200 Message-ID: <87fs7eb2i5.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 63785 Cc: 63785@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >>>>> On Tue, 30 May 2023 11:43:51 +0300, Eshel Yaron s= aid: >> That only offer to installs ack, even though I=CA=BCve marked helm. = If I >> clear the filters then 'x' offers to install both. Although I could >> argue that I=CA=BCm in a filtered state, so offering to install only >> visible packages is normal :-) Eshel> Yes, that's what I thought. Only installing visible packages wh= en the Eshel> menu is filtered seems sensible to me. Although I guess Eshel> `package-menu-execute` could be extended with some option that s= ays what Eshel> to do in these cases, maybe by default it could suggest clearing= the Eshel> filter first? Maybe. I=CA=BCm 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 --=20