From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 04 09:53:56 2020 Received: (at submit) by debbugs.gnu.org; 4 Mar 2020 14:53:56 +0000 Received: from localhost ([127.0.0.1]:40537 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j9VPI-00012p-Dj for submit@debbugs.gnu.org; Wed, 04 Mar 2020 09:53:56 -0500 Received: from lists.gnu.org ([209.51.188.17]:44334) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j9VPH-00012g-0y for submit@debbugs.gnu.org; Wed, 04 Mar 2020 09:53:55 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34729) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j9VPF-0007En-OV for bug-gnu-emacs@gnu.org; Wed, 04 Mar 2020 09:53:54 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: * X-Spam-Status: No, score=1.6 required=5.0 tests=BAYES_50,RDNS_NONE, URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j9VPE-00052X-H3 for bug-gnu-emacs@gnu.org; Wed, 04 Mar 2020 09:53:53 -0500 Received: from [145.132.212.31] (port=49532 helo=cochabamba.vanoostrum.org) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1j9VPE-0004ys-24 for bug-gnu-emacs@gnu.org; Wed, 04 Mar 2020 09:53:52 -0500 Received: from cochabamba.vanoostrum.org (localhost [IPv6:::1]) by cochabamba.vanoostrum.org (Postfix) with ESMTP id BAABBAA18255 for ; Wed, 4 Mar 2020 15:53:47 +0100 (CET) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="IpoZtEjYK3" Content-Transfer-Encoding: 7bit Message-ID: <24159.49402.837723.45546@cochabamba.vanoostrum.org> Date: Wed, 4 Mar 2020 15:53:46 +0100 From: Pieter van Oostrum To: bug-gnu-emacs@gnu.org Subject: 28.0.50; Feature request: another filter for Package Menu X-Mailer: VM undefined under 27.0.90 (i686-apple-darwin10.0.0) X-detected-operating-system: by eggs.gnu.org: Mac OS X [generic] [fuzzy] X-Received-From: 145.132.212.31 X-Spam-Score: -0.7 (/) 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: -1.7 (-) --IpoZtEjYK3 Content-Type: text/plain; charset=us-ascii Content-Description: message body text Content-Transfer-Encoding: 7bit This is a request for a new filter in Package Menu. Motivation: The command `package-menu-mark-upgrades' in the "*Packages*" buffer marks all packages that have new versions. Both the new versions are marked for installation (I) and the old versions for deletion (D). However, it is not so easy to inspect which packages will be affected. Currently the only simple ways are to do an `isearch' in the "*Packages*" buffer for "^[^ ]", or to do an `occur' for the same regexp. The latter gives an overview of all packages involved, but requires an indirection step to get into the "*Packages*" buffer, for example to unmark a package. The attached file adds a new command to filter the "*Packages*" buffer to show only the packages with a non-empty mark, i.e. the same as the above `occur' command would show, but then without the extra indirection. My proposal is to bind it to "/m", and to add a menu entry. This function is dependent on commit aea12d4903 (Bug#38424), which introduces other filters. Contrary to the other filters, this filter keeps the marks intact. Otherwise it would not be useful. (Other filters clear the marks, because the marks are not part of the data structure that builds the package list, but only of the representation in the buffer.) If this filter is accepted, I will make it into a full-blown patch with documentation, etc.) The current format is fit to be included in the `init' file. --IpoZtEjYK3 Content-Type: application/octet-stream; name="package-filter.el" Content-Disposition: attachment; filename="package-filter.el" Content-Transfer-Encoding: base64 KGRlZnVuIHBhY2thZ2UtbWVudS0tZmlsdGVyLW1hcmtlZCAoKQogICJGaWx0ZXIgXCIqUGFja2Fn ZXMqXCIgYnVmZmVyIGJ5IG5vbi1lbXB0eSB1cGdyYWRlIG1hcmsuClVubGlrZSBvdGhlciBmaWx0 ZXJzLCB0aGlzIGxlYXZlcyB0aGUgbWFya3MgaW50YWN0LiIKICAoaW50ZXJhY3RpdmUpCiAgKHBh Y2thZ2UtLWVuc3VyZS1wYWNrYWdlLW1lbnUtbW9kZSkKICAod2lkZW4pCiAgKGxldCAoZm91bmQt ZW50cmllcyBtYXJrIHBrZy1pZCBlbnRyeSBtYXJrcykKICAgIChzYXZlLWV4Y3Vyc2lvbgogICAg ICAoZ290by1jaGFyIChwb2ludC1taW4pKQogICAgICAod2hpbGUgKG5vdCAoZW9icCkpCiAgICAg ICAgKHNldHEgbWFyayAoY2hhci1hZnRlcikpCiAgICAgICAgKHVubGVzcyAoZXEgbWFyayA/XHMp CgkgIChzZXRxIHBrZy1pZCAodGFidWxhdGVkLWxpc3QtZ2V0LWlkKSkKICAgICAgICAgIChzZXRx IGVudHJ5IChwYWNrYWdlLW1lbnUtLXByaW50LWluZm8tc2ltcGxlIHBrZy1pZCkpCgkgIChwdXNo IGVudHJ5IGZvdW5kLWVudHJpZXMpCgkgIDs7IHJlbWVtYmVyIHRoZSBtYXJrCgkgIChwdXNoIChj b25zIHBrZy1pZCBtYXJrKSBtYXJrcykpCiAgICAgICAgKGZvcndhcmQtbGluZSkpCiAgICAgIChp ZiBmb3VuZC1lbnRyaWVzCiAgICAgICAgICAocHJvZ24KICAgICAgICAgICAgKHNldHEgdGFidWxh dGVkLWxpc3QtZW50cmllcyBmb3VuZC1lbnRyaWVzKQogICAgICAgICAgICAocGFja2FnZS1tZW51 LS1kaXNwbGF5IHQgbmlsKQoJICAgIDs7IHJlZG8gdGhlIG1hcmtzLCBidXQgd2UgbXVzdCByZW1l bWJlciB0aGUgbWFya3MhIQoJICAgIChnb3RvLWNoYXIgKHBvaW50LW1pbikpCgkgICAgKHdoaWxl IChub3QgKGVvYnApKQoJICAgICAgKHNldHEgbWFyayAoY2RyIChhc3NxICh0YWJ1bGF0ZWQtbGlz dC1nZXQtaWQpIG1hcmtzKSkpCgkgICAgICAodGFidWxhdGVkLWxpc3QtcHV0LXRhZyAoY2hhci10 by1zdHJpbmcgbWFyaykgdCkpKQoJKHVzZXItZXJyb3IgIk5vIHBhY2thZ2VzIGZvdW5kIikpKSkp CgooZXZhbC1hZnRlci1sb2FkICdwYWNrYWdlCiAgKHByb2duCiAgICAoZGVmaW5lLWtleSBwYWNr YWdlLW1lbnUtbW9kZS1tYXAgIi9tIiAncGFja2FnZS1tZW51LS1maWx0ZXItbWFya2VkKQogICAg KGVhc3ktbWVudS1hZGQtaXRlbQogICAgIHBhY2thZ2UtbWVudS1tb2RlLW1lbnUKICAgICAnKCJG aWx0ZXIgUGFja2FnZXMiKQogICAgIFsiRmlsdGVyIE1hcmtlZCIgcGFja2FnZS1tZW51LS1maWx0 ZXItbWFya2VkIDpoZWxwICJGaWx0ZXIgcGFja2FnZXMgbWFya2VkIGZvciB1cGdyYWRlIl0pKSkK Cg== --IpoZtEjYK3 Content-Type: text/plain; charset=us-ascii Content-Description: .signature Content-Transfer-Encoding: 7bit -- Pieter van Oostrum www: http://pieter.vanoostrum.org/ PGP key: [8DAE142BE17999C4] -- Pieter van Oostrum www: http://pieter.vanoostrum.org/ PGP key: [8DAE142BE17999C4] --IpoZtEjYK3-- From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 05 09:24:13 2020 Received: (at 39903) by debbugs.gnu.org; 5 Mar 2020 14:24:13 +0000 Received: from localhost ([127.0.0.1]:42410 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j9rQ5-0004cJ-6J for submit@debbugs.gnu.org; Thu, 05 Mar 2020 09:24:13 -0500 Received: from [145.132.212.31] (port=59816 helo=cochabamba.vanoostrum.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j9rQ3-0004by-Fv for 39903@debbugs.gnu.org; Thu, 05 Mar 2020 09:24:11 -0500 Received: from cochabamba.vanoostrum.org (localhost [IPv6:::1]) by cochabamba.vanoostrum.org (Postfix) with ESMTP id 17537AA2B635; Thu, 5 Mar 2020 15:24:03 +0100 (CET) From: Pieter van Oostrum To: Pieter van Oostrum Subject: Re: bug#39903: 28.0.50; Feature request: another filter for Package Menu References: <24159.49402.837723.45546@cochabamba.vanoostrum.org> Date: Thu, 05 Mar 2020 15:24:02 +0100 In-Reply-To: <24159.49402.837723.45546@cochabamba.vanoostrum.org> (Pieter van Oostrum's message of "Wed, 4 Mar 2020 15:53:46 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.90 (darwin) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: I saw that I had inadvertently used a -- in the function name. package-menu--filter-marked should be replaced with package-menu-filter-marked. -- Pieter van Oostrum www: http://pieter.vanoostrum.org/ [...] Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: vanoostrum.org] 0.0 SPF_NONE SPF: sender does not publish an SPF Record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 1.3 RDNS_NONE Delivered to internal network by a host with no rDNS X-Debbugs-Envelope-To: 39903 Cc: 39903@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: 0.3 (/) I saw that I had inadvertently used a -- in the function name. package-menu--filter-marked should be replaced with package-menu-filter-marked. -- Pieter van Oostrum www: http://pieter.vanoostrum.org/ PGP key: [8DAE142BE17999C4] From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 05 09:52:04 2020 Received: (at 39903) by debbugs.gnu.org; 5 Mar 2020 14:52:05 +0000 Received: from localhost ([127.0.0.1]:42436 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j9rr2-0005IZ-LB for submit@debbugs.gnu.org; Thu, 05 Mar 2020 09:52:04 -0500 Received: from ted.gofardesign.uk ([67.225.143.91]:35304) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j9rr0-0005Hy-MX for 39903@debbugs.gnu.org; Thu, 05 Mar 2020 09:52:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=marxist.se; s=default; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=xLNCF4Jr3CMg9sJfQmRSwev6ZBbV1guqZ1SEybcR6eg=; b=eoz0hmLfeeaccAJD04epRKCy5g trURJL/A86n/dR+HXxTfjPbYQohTMkK3Bdiy2hdPwOabsr3xbfQ5zhbV9lT5fQvbwOszSYdLrocHj B7JI/IOVNsoEXHY5m732UNATMU4jyGmIpURIPQO6kbY4+8c+AnJPHlnDSopiC6+LfFPiDNNU8BKMv +KHuSQ/VRFAa4wbuXo/QYri57W0WQHsFlaqebMAGOgCQg2Lst7NQil4yG75F0r8DXK4R5hxDjQSuI 8tTFOarnU2EqLawkF383x24W1FKs6rl880pEN2iayVUBEa+M7YfMiG0SR19PiueRsBeI3EWolXVvZ E/9pTYhw==; Received: from h-4-70-69.a785.priv.bahnhof.se ([155.4.70.69]:60050 helo=localhost) by ted.gofardesign.uk with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1j9rqs-001UZ4-Ab; Thu, 05 Mar 2020 09:51:54 -0500 From: Stefan Kangas To: Pieter van Oostrum Subject: Re: bug#39903: 28.0.50; Feature request: another filter for Package Menu In-Reply-To: <24159.49402.837723.45546@cochabamba.vanoostrum.org> (Pieter van Oostrum's message of "Wed, 4 Mar 2020 15:53:46 +0100") References: <24159.49402.837723.45546@cochabamba.vanoostrum.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) Date: Thu, 05 Mar 2020 15:51:50 +0100 Message-ID: <87blpa4zy1.fsf@stefankangas.se> MIME-Version: 1.0 Content-Type: text/plain X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - ted.gofardesign.uk X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - marxist.se X-Get-Message-Sender-Via: ted.gofardesign.uk: authenticated_id: stefan@marxist.se X-Authenticated-Sender: ted.gofardesign.uk: stefan@marxist.se X-Source: X-Source-Args: X-Source-Dir: X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 39903 Cc: 39903@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 (-) Pieter van Oostrum writes: > This is a request for a new filter in Package Menu. > > Motivation: The command `package-menu-mark-upgrades' in the "*Packages*" > buffer marks all packages that have new versions. Both the new versions > are marked for installation (I) and the old versions for deletion (D). > > However, it is not so easy to inspect which packages will be > affected. Currently the only simple ways are to do an `isearch' in the > "*Packages*" buffer for "^[^ ]", or to do an `occur' for the same > regexp. The latter gives an overview of all packages involved, but > requires an indirection step to get into the "*Packages*" buffer, for > example to unmark a package. > > The attached file adds a new command to filter the "*Packages*" > buffer to show only the packages with a non-empty mark, i.e. the same as > the above `occur' command would show, but then without the extra > indirection. > > My proposal is to bind it to "/m", and to add a menu entry. This looks useful. Could you write this up as a patch instead? Preferably also with a Changelog entry as described in the CONTRIBUTE file. We should also add this new command to the relevant NEWS entry, and the user manual. Thanks in advance. Best regards, Stefan Kangas From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 05 10:19:45 2020 Received: (at 39903) by debbugs.gnu.org; 5 Mar 2020 15:19:45 +0000 Received: from localhost ([127.0.0.1]:43515 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j9sHp-0006ER-Lg for submit@debbugs.gnu.org; Thu, 05 Mar 2020 10:19:45 -0500 Received: from [145.132.212.31] (port=60609 helo=cochabamba.vanoostrum.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j9sHm-0006EB-Oi for 39903@debbugs.gnu.org; Thu, 05 Mar 2020 10:19:45 -0500 Received: from cochabamba.vanoostrum.org (localhost [IPv6:::1]) by cochabamba.vanoostrum.org (Postfix) with ESMTP id 47627AA2CF8A; Thu, 5 Mar 2020 16:19:34 +0100 (CET) From: Pieter van Oostrum To: Stefan Kangas Subject: Re: bug#39903: 28.0.50; Feature request: another filter for Package Menu References: <24159.49402.837723.45546@cochabamba.vanoostrum.org> <87blpa4zy1.fsf@stefankangas.se> Date: Thu, 05 Mar 2020 16:19:33 +0100 In-Reply-To: <87blpa4zy1.fsf@stefankangas.se> (Stefan Kangas's message of "Thu, 05 Mar 2020 15:51:50 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.90 (darwin) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Stefan Kangas writes: > > This looks useful. Could you write this up as a patch instead? > Preferably also with a Changelog entry as described in the CONTRIBUTE > file. We should a [...] Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: marxist.se] 0.0 SPF_NONE SPF: sender does not publish an SPF Record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 1.3 RDNS_NONE Delivered to internal network by a host with no rDNS X-Debbugs-Envelope-To: 39903 Cc: Pieter van Oostrum , 39903@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: 0.3 (/) Stefan Kangas writes: > > This looks useful. Could you write this up as a patch instead? > Preferably also with a Changelog entry as described in the CONTRIBUTE > file. We should also add this new command to the relevant NEWS entry, > and the user manual. Yes, I'll do. -- Pieter van Oostrum www: http://pieter.vanoostrum.org/ PGP key: [8DAE142BE17999C4] From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 05 17:24:58 2020 Received: (at 39903) by debbugs.gnu.org; 5 Mar 2020 22:24:58 +0000 Received: from localhost ([127.0.0.1]:43831 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j9yvK-0002aS-2s for submit@debbugs.gnu.org; Thu, 05 Mar 2020 17:24:58 -0500 Received: from [145.132.212.31] (port=49622 helo=cochabamba.vanoostrum.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j9yvG-0002aA-0l for 39903@debbugs.gnu.org; Thu, 05 Mar 2020 17:24:56 -0500 Received: from cochabamba.vanoostrum.org (localhost [IPv6:::1]) by cochabamba.vanoostrum.org (Postfix) with ESMTP id D9602AA4898C; Thu, 5 Mar 2020 23:24:45 +0100 (CET) From: Pieter van Oostrum To: Stefan Kangas Subject: Re: bug#39903: 28.0.50; Feature request: another filter for Package Menu References: <24159.49402.837723.45546@cochabamba.vanoostrum.org> <87blpa4zy1.fsf@stefankangas.se> Date: Thu, 05 Mar 2020 23:24:45 +0100 In-Reply-To: (Pieter van Oostrum's message of "Thu, 05 Mar 2020 16:19:33 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.90 (darwin) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Here is the patch: From 005c0d43c8fd97caaf58d0ed3362c11022aff292 Mon Sep 17 00:00:00 2001 From: Pieter van Oostrum Date: Thu, 5 Mar 2020 20:20:04 +0100 Subject: [PATCH] Add new filter command to [...] Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: vanoostrum.org] 0.0 SPF_NONE SPF: sender does not publish an SPF Record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 1.3 RDNS_NONE Delivered to internal network by a host with no rDNS X-Debbugs-Envelope-To: 39903 Cc: Pieter van Oostrum , 39903@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: 0.3 (/) --=-=-= Content-Type: text/plain Here is the patch: --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Add-new-filter-command-to-Package-Menu-Bug-39903.patch >From 005c0d43c8fd97caaf58d0ed3362c11022aff292 Mon Sep 17 00:00:00 2001 From: Pieter van Oostrum Date: Thu, 5 Mar 2020 20:20:04 +0100 Subject: [PATCH] Add new filter command to Package Menu (Bug#39903) * lisp/emacs-lisp/package.el (package-menu-filter-marked): New filter command. * test/lisp/emacs-lisp/package-tests.el (package-test-list-filter-marked): New test. (package-menu-mode-menu): (package-menu-mode-map): Update menu to include new filter command. * doc/emacs/package.texi (Package Menu): Document the new command. * etc/NEWS: Announce the new command. --- doc/emacs/package.texi | 6 ++++++ etc/NEWS | 1 + lisp/emacs-lisp/package.el | 31 +++++++++++++++++++++++++++ test/lisp/emacs-lisp/package-tests.el | 15 +++++++++++++ 4 files changed, 53 insertions(+) diff --git a/doc/emacs/package.texi b/doc/emacs/package.texi index db3cf317ff..91e44b8eba 100644 --- a/doc/emacs/package.texi +++ b/doc/emacs/package.texi @@ -202,6 +202,12 @@ Package Menu @samp{=}, and then a package version, and shows packages that has a lower, equal or higher version than the one specified. +@item / m +@kindex / m @r{(Package Menu)} +@findex package-menu-filter-marked +Filter package list by non-empty mark (@code{package-menu-filter-marked}). +This shows only the packages that have been marked to be installed or deleted. + @item / / @kindex / / @r{(Package Menu)} @findex package-menu-filter-clear diff --git a/etc/NEWS b/etc/NEWS index fcdf6dbe24..01f46cc79d 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -172,6 +172,7 @@ key binding / n package-menu-filter-by-name / s package-menu-filter-by-status / v package-menu-filter-by-version +/ m package-menu-filter-marked / / package-menu-filter-clear diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 43eb038a86..efac7d888c 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -2692,6 +2692,7 @@ package-menu-mode-map (define-key map (kbd "/ n") 'package-menu-filter-by-name) (define-key map (kbd "/ s") 'package-menu-filter-by-status) (define-key map (kbd "/ v") 'package-menu-filter-by-version) + (define-key map (kbd "/ m") 'package-menu-filter-marked) map) "Local keymap for `package-menu-mode' buffers.") @@ -2722,6 +2723,7 @@ package-menu-mode-menu ["Filter by Name" package-menu-filter-by-name :help "Filter packages by name"] ["Filter by Status" package-menu-filter-by-status :help "Filter packages by status"] ["Filter by Version" package-menu-filter-by-version :help "Filter packages by version"] + ["Filter Marked" package-menu-filter-marked :help "Filter packages marked for upgrade"] ["Clear Filter" package-menu-clear-filter :help "Clear package list filter"]) ["Hide by Regexp" package-menu-hide-package :help "Hide all packages matching a regexp"] @@ -3845,6 +3847,35 @@ package-menu-filter-by-version (funcall fun (package-desc-version pkg-desc) ver))) (format "versions:%s%s" predicate version))))) +(defun package-menu-filter-marked () + "Filter \"*Packages*\" buffer by non-empty upgrade mark. +Unlike other filters, this leaves the marks intact." + (interactive) + (package--ensure-package-menu-mode) + (widen) + (let (found-entries mark pkg-id entry marks) + (save-excursion + (goto-char (point-min)) + (while (not (eobp)) + (setq mark (char-after)) + (unless (eq mark ?\s) + (setq pkg-id (tabulated-list-get-id)) + (setq entry (package-menu--print-info-simple pkg-id)) + (push entry found-entries) + ;; remember the mark + (push (cons pkg-id mark) marks)) + (forward-line)) + (if found-entries + (progn + (setq tabulated-list-entries found-entries) + (package-menu--display t nil) + ;; redo the marks, but we must remember the marks!! + (goto-char (point-min)) + (while (not (eobp)) + (setq mark (cdr (assq (tabulated-list-get-id) marks))) + (tabulated-list-put-tag (char-to-string mark) t))) + (user-error "No packages found"))))) + (defun package-menu-clear-filter () "Clear any filter currently applied to the \"*Packages*\" buffer." (interactive) diff --git a/test/lisp/emacs-lisp/package-tests.el b/test/lisp/emacs-lisp/package-tests.el index 05770d6b58..524c7f8f94 100644 --- a/test/lisp/emacs-lisp/package-tests.el +++ b/test/lisp/emacs-lisp/package-tests.el @@ -413,6 +413,21 @@ package-test-list-filter-by-status ;; No installed packages in default environment. (should-error (package-menu-filter-by-status "installed")))) +(ert-deftest package-test-list-filter-marked () + "Ensure package list is filtered correctly by non-empty mark." + (with-package-test () + (let ((buf (package-list-packages))) + (revert-buffer) + (search-forward-regexp "^ +simple-single") + (package-menu-mark-install) + (package-menu-filter-marked) + (goto-char (point-min)) + (should (re-search-forward "^I +simple-single" nil t)) + (should (= (count-lines (point-min) (point-max)) 1)) + (package-menu-mark-unmark) + ;; No marked packages in default environment. + (should-error (package-menu-filter-marked))))) + (ert-deftest package-test-list-filter-by-version () (with-package-menu-test (should-error (package-menu-filter-by-version "1.1" 'unknown-symbol))) ) -- 2.25.1 --=-=-= Content-Type: text/plain -- Pieter van Oostrum www: http://pieter.vanoostrum.org/ PGP key: [8DAE142BE17999C4] --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat May 09 11:38:32 2020 Received: (at 39903) by debbugs.gnu.org; 9 May 2020 15:38:32 +0000 Received: from localhost ([127.0.0.1]:48251 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jXRYe-0003Sz-9m for submit@debbugs.gnu.org; Sat, 09 May 2020 11:38:32 -0400 Received: from mail-yb1-f173.google.com ([209.85.219.173]:44977) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jXRYc-0003Sj-Ra for 39903@debbugs.gnu.org; Sat, 09 May 2020 11:38:31 -0400 Received: by mail-yb1-f173.google.com with SMTP id o8so2621312ybc.11 for <39903@debbugs.gnu.org>; Sat, 09 May 2020 08:38:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:in-reply-to:references:user-agent :mime-version:date:message-id:subject:to:cc; bh=dwK4e2fmPknnC8hwx1Us1s2w8u23eObb6BmnYbaAjFM=; b=LBUliS3xhg92fYzaXoGXUi+nBDp1EJ8N7K8l1BlVpH4XCP/LJxPk12RwUAePMreTme 0RrwiU9h1JtLdUSCNsNYiDNmxxrrahDM0p/Mo0acofaLCxR8nIMuPjmqa43CoDejKJOo 0XggoRBNMT/xmgJzGICYm61Fgb71MvBkATaGGRGOEpcp9czONqfkpAHKO/R5PW5BA+sr DiYvcBO4zEBAZLaPFLbnlegSEg9Gu3Lb4Grguen90g+QAXjRvmimk02186i+sQ5ULW+a a84/vgwOa6Y/xmz10ZDiPhNnsVdVNK/tcrTFaFc86MytKgchuQishjkX1HhMluax0DOo 6jow== X-Gm-Message-State: AGi0PubNowIytDqXvOFxtvgCBe94s2lRUXslwC9nihVnNW1uDlQ9wi9j J0deIPeic8F9MCvq2Qdd9M3t6xUlBoLB9/xpkTY= X-Google-Smtp-Source: APiQypLvU8KBb/fa+7GbX08o0gf5lGkt5F/ODckunrYVd+xxJ1hl0oj86cKxNKXN0+20OijBwhZOVxVEH15qF9j35Ik= X-Received: by 2002:a25:fc08:: with SMTP id v8mr12709217ybd.389.1589038705208; Sat, 09 May 2020 08:38:25 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Sat, 9 May 2020 11:38:24 -0400 From: Stefan Kangas In-Reply-To: (Pieter van Oostrum's message of "Thu, 05 Mar 2020 23:24:45 +0100") References: <24159.49402.837723.45546@cochabamba.vanoostrum.org> <87blpa4zy1.fsf@stefankangas.se> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Date: Sat, 9 May 2020 11:38:24 -0400 Message-ID: Subject: Re: bug#39903: 28.0.50; Feature request: another filter for Package Menu To: Pieter van Oostrum Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 39903 Cc: Pieter van Oostrum , 39903@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: -0.5 (/) Pieter van Oostrum writes: > Here is the patch: Sorry for the late reply here. The patch looks good to me. Have you signed the copyright assignment papers? Best regards, Stefan Kangas From debbugs-submit-bounces@debbugs.gnu.org Sat May 09 11:51:56 2020 Received: (at 39903) by debbugs.gnu.org; 9 May 2020 15:51:56 +0000 Received: from localhost ([127.0.0.1]:48255 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jXRlY-0003q6-VX for submit@debbugs.gnu.org; Sat, 09 May 2020 11:51:56 -0400 Received: from eggs.gnu.org ([209.51.188.92]:43900) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jXRlU-0003pr-R2 for 39903@debbugs.gnu.org; Sat, 09 May 2020 11:51:51 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:54192) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jXRlP-0004De-0U; Sat, 09 May 2020 11:51:43 -0400 Received: from [176.228.60.248] (port=3360 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jXRlN-0003mw-2h; Sat, 09 May 2020 11:51:41 -0400 Date: Sat, 09 May 2020 18:51:32 +0300 Message-Id: <83v9l5ds3f.fsf@gnu.org> From: Eli Zaretskii To: Stefan Kangas In-Reply-To: (message from Stefan Kangas on Sat, 9 May 2020 11:38:24 -0400) Subject: Re: bug#39903: 28.0.50; Feature request: another filter for Package Menu References: <24159.49402.837723.45546@cochabamba.vanoostrum.org> <87blpa4zy1.fsf@stefankangas.se> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 39903 Cc: pieter-l@vanoostrum.org, 39903@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: -3.3 (---) > From: Stefan Kangas > Date: Sat, 9 May 2020 11:38:24 -0400 > Cc: Pieter van Oostrum , 39903@debbugs.gnu.org > > Have you signed the copyright assignment papers? Yes, he has. From debbugs-submit-bounces@debbugs.gnu.org Sat May 09 12:22:41 2020 Received: (at 39903) by debbugs.gnu.org; 9 May 2020 16:22:41 +0000 Received: from localhost ([127.0.0.1]:48278 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jXSFN-0004hK-Hb for submit@debbugs.gnu.org; Sat, 09 May 2020 12:22:41 -0400 Received: from mail-yb1-f169.google.com ([209.85.219.169]:37874) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jXSFL-0004gw-Bo for 39903@debbugs.gnu.org; Sat, 09 May 2020 12:22:39 -0400 Received: by mail-yb1-f169.google.com with SMTP id f5so2680983ybo.4 for <39903@debbugs.gnu.org>; Sat, 09 May 2020 09:22:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:in-reply-to:references:mime-version:date :message-id:subject:to:cc; bh=mJzLtEHqHpcDuaPqgfhFyJ3XkpzvzO9Te1aD/vorS/w=; b=rK6MyqNYMDyjrw3xV1Dx0xYPyk4V89ceGMic2gR2OZOz2XCwwv7UML35zmU7FMCClV PN7yBReayIQrz+uF26mjswHgXjkqSJYArCYoyy2Peu55L1KCB0jRC9GChr+ahtRV9NwG Gze0mtXy9VmsEfnWOyjEBAL1oPeRNdvpy5JuCE0UmjJV1brB0PfAIC3Dx0uSnNAylpvi h5w56TV53Nap+vqWdXs+v5X2iuaxI5tIJ4gA7/7pMaqav6C91AV+IFsPnHuSPItQjaej asePl1yN5dD2Hmv1aoRHKDrNgyyt/rmFoogs4EXMTRF9WWuGWbvysarGCqM5f5Ds93fM m8jg== X-Gm-Message-State: AGi0PuYMyT+gC0Qy5HZTknWATOEL4Gv3IAjOydM6hBJxGEHGFeKQMmlj 6Pg9RTCrMQPYDkVSo9Gjm4HGg4VKzxO3Dy1Z/Ow= X-Google-Smtp-Source: APiQypL45/JG930qb/e5rSKeqnWg2TAP+wDwUUKRK2Cn3pdF8rZvhqm+0BaIuenkYjfRrmr9sie5UNi6FfFbMjoyUCk= X-Received: by 2002:a25:fc08:: with SMTP id v8mr12916386ybd.389.1589041352440; Sat, 09 May 2020 09:22:32 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Sat, 9 May 2020 12:22:32 -0400 From: Stefan Kangas In-Reply-To: <83v9l5ds3f.fsf@gnu.org> References: <24159.49402.837723.45546@cochabamba.vanoostrum.org> <87blpa4zy1.fsf@stefankangas.se> <83v9l5ds3f.fsf@gnu.org> MIME-Version: 1.0 Date: Sat, 9 May 2020 12:22:32 -0400 Message-ID: Subject: Re: bug#39903: 28.0.50; Feature request: another filter for Package Menu To: Eli Zaretskii Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 39903 Cc: pieter-l@vanoostrum.org, 39903@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: -0.5 (/) close 39903 28.1 thanks Eli Zaretskii writes: >> Have you signed the copyright assignment papers? > > Yes, he has. Thanks. This patch is now pushed to master as commit 196bc13b7b. I'm closing the bug with this message. Thank you, Pieter, for your contribution. Best regards, Stefan Kangas From unknown Wed Jun 18 23:12:06 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 07 Jun 2020 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator