GNU bug report logs - #55470
[PATCH] Add package-delete-regexp

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Severity: wishlist; Reported by: "Marwan L." <techmetx11@HIDDEN>; Keywords: patch moreinfo; dated Tue, 17 May 2022 01:01:03 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
Severity set to 'wishlist' from 'normal' Request was from Stefan Kangas <stefan@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 55470 <at> debbugs.gnu.org:


Received: (at 55470) by debbugs.gnu.org; 19 May 2022 18:51:02 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu May 19 14:51:02 2022
Received: from localhost ([127.0.0.1]:36581 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nrlEj-0001j2-CE
	for submit <at> debbugs.gnu.org; Thu, 19 May 2022 14:51:01 -0400
Received: from knopi.disroot.org ([178.21.23.139]:57064)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <techmetx11@HIDDEN>) id 1nrkgW-0000oV-3K
 for 55470 <at> debbugs.gnu.org; Thu, 19 May 2022 14:15:41 -0400
Received: from localhost (localhost [127.0.0.1])
 by disroot.org (Postfix) with ESMTP id 78AF34375F;
 Thu, 19 May 2022 20:15:38 +0200 (CEST)
X-Virus-Scanned: SPAM Filter at disroot.org
Received: from knopi.disroot.org ([127.0.0.1])
 by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024)
 with UTF8SMTP id UM9RXsjDhSxJ; Thu, 19 May 2022 20:15:36 +0200 (CEST)
Date: Thu, 19 May 2022 19:15:20 +0100
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail;
 t=1652984129; bh=2pQkRK9wPef6UOvSZTuRz8oL3t7ypGXOtUFi3eLnkpE=;
 h=Date:From:To:Cc:Subject:References:In-Reply-To;
 b=Pvc24dFSVrWPXc1Qs9QiBhNCiEQIpavBHZ/L8XdGuncHute7HMDsPYitmz92mJpXj
 N+aFJ8lPOegSWdY1CAnnRNNNmt56WOdvriokMDj32Z88dH3jW9ilIYdqHHoO8HZp/q
 CT47hKoJ60aP5KpItPBHKloAcIu23gs+wl2sZw7vBxY4DyKODEqXosq+avVk3b/Nix
 GYHYbDRTksg3dCD179t6KJMjD08PkEKwr0bXNiZA+ce0YObnoj8iVnGSm6Z/Ls7v7w
 aIRO+NImAFWFMMbI4pVes5Zs/xBZBy20e5BmgVmY7hBEEgNHpF+XIPRuqhWzel8+AU
 JVrlH0fXnZ9EA==
From: "Marwan L." <techmetx11@HIDDEN>
To: Philip Kaludercic <philipk@HIDDEN>
Subject: Re: bug#55470: [PATCH] Add package-delete-regexp
Message-ID: <YoaJOJXhWAzYpwmz@HIDDEN>
References: <YoLdajcK6fsLZvV2@HIDDEN> <87y1yytoqh.fsf@HIDDEN>
 <YoYyUsqX8i6MkJdY@HIDDEN> <87y1yx1tva.fsf@HIDDEN>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <87y1yx1tva.fsf@HIDDEN>
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 55470
X-Mailman-Approved-At: Thu, 19 May 2022 14:51:00 -0400
Cc: 55470 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On Thu, May 19, 2022 at 02:26:17PM +0000, Philip Kaludercic wrote:
> "Marwan L." <techmetx11@HIDDEN> writes:
> 
> > On Wed, May 18, 2022 at 11:17:26PM +0000, Philip Kaludercic wrote:
> >> "Marwan L." <techmetx11@HIDDEN> writes:
> >> 
> >> > This function allows you to delete packages, with names that match the
> >> > regexp. This is makes operations like deleting multiple packages that
> >> > begin with the same namespace (^company.*, ^treemacs.*, etc.) much
> >> > easier to do
> >> 
> >> What is the advantage of a separate function for deleting packages
> >> compared to marking packages in the *Packages* buffer using "/ n" (that
> >> also accepts a regular expression)?
> >
> > It depends on how much packages you have to go through. If you have tons
> > of packages to mark deletion on, then it will most likely involve
> > holding d (wish you could do C-u 100 d) and then doing x
> 
> Apparently the prefix argument does not work, though you can do the same
> with a macro.  Maybe adding a "t" to toggle the selection, though this
> would be a very specific use-case.
> 
> What do you think about extending the package-menu-filter commands with
> a way to mark all packages instead of filtering?
Good idea. I haven't thought of that, Maybe I should have done that
instead of writing another function

> 
> > `M-x list-packages` will also automatically fetch the latest list of
> > packages from your package archives, which is unnecessary
> >
> > There's a prefix argument that disables fetching, but I didn't know that
> > before making this function nor this patch
> 
> There is also M-x package-list-packages-no-fetch.
Slightly longer name, but still okay

> 
> > You are free to close this patch if you want to
> 
> No, that is not my intention, I just wanted to clarify a point.
Oh, sorry.

> 
> >> 
> >> > The function will also tell you how much packages it will delete (in a
> >> > temporary buffer) and prompt for a Yes or No answer




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#55470; Package emacs. Full text available.

Message received at 55470 <at> debbugs.gnu.org:


Received: (at 55470) by debbugs.gnu.org; 19 May 2022 14:26:29 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu May 19 10:26:29 2022
Received: from localhost ([127.0.0.1]:36357 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nrh6i-0002sQ-Jw
	for submit <at> debbugs.gnu.org; Thu, 19 May 2022 10:26:28 -0400
Received: from mout01.posteo.de ([185.67.36.65]:45769)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <philipk@HIDDEN>) id 1nrh6f-0002s8-Dn
 for 55470 <at> debbugs.gnu.org; Thu, 19 May 2022 10:26:27 -0400
Received: from submission (posteo.de [185.67.36.169]) 
 by mout01.posteo.de (Postfix) with ESMTPS id 1D2D7240026
 for <55470 <at> debbugs.gnu.org>; Thu, 19 May 2022 16:26:18 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;
 t=1652970379; bh=rRGDOV6HAhfUwQu3b4E2SAlYKs+ZyOSwBzndGdyRs7I=;
 h=From:To:Cc:Subject:Autocrypt:Date:From;
 b=ZeLIjkWigCk7VdD4965VyuKoARSTEzIwhE35cYj7Drlz/eMraoWcZE9183s4rCPov
 XIPQlFu1ZZ9GN2BQvYhLKSpfIPLsrshVUUyz7Azc/n6HPTZoal9sA007x94Wr50J7k
 uQzv7V12jS5n5Rf6gSN1czhwLaAlBWEs5qfDpn0WKOY5ZWQEdXlZ07F7kmjPKnSsPM
 DfrzAfd96QYIGqYz3Vlx95LAHCT9JyPqnlyMN2G/v4ngLuf79eBq7Gnes13oKrVmLx
 oC3weYdQ+QyIhNeLcTTsbXC+YKkIWB6SbBpb70omU7nWoQeKTJrC9ad8LTTVQM94mQ
 /4iAUVYCburGQ==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 4L3sbt1gGLz9rxT;
 Thu, 19 May 2022 16:26:18 +0200 (CEST)
From: Philip Kaludercic <philipk@HIDDEN>
To: "Marwan L." <techmetx11@HIDDEN>
Subject: Re: bug#55470: [PATCH] Add package-delete-regexp
References: <YoLdajcK6fsLZvV2@HIDDEN> <87y1yytoqh.fsf@HIDDEN>
 <YoYyUsqX8i6MkJdY@HIDDEN>
X-Hashcash: 1:20:220519:55470 <at> debbugs.gnu.org::TGLKj9TOK115H2ms:00000000000000000000000000000000000000006dik
X-Hashcash: 1:20:220519:techmetx11@HIDDEN::/oOWhiqTJEVdgwSV:0000000000000000000000000000000000000007CEf
Autocrypt: addr=philipk@HIDDEN; prefer-encrypt=nopreference; keydata=
 mDMEYHHqUhYJKwYBBAHaRw8BAQdAp3GdmYJ6tm5McweY6dEvIYIiry+Oz9rU4MH6NHWK0Ee0QlBo
 aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0
 ZW8ubmV0PoiQBBMWCAA4FiEEDM2H44ZoPt9Ms0eHtVrAHPRh1FwFAmBx6lICGwMFCwkIBwIGFQoJ
 CAsCBBYCAwECHgECF4AACgkQtVrAHPRh1FyTkgEAjlbGPxFchvMbxzAES3r8QLuZgCxeAXunM9gh
 io0ePtUBALVhh9G6wIoZhl0gUCbQpoN/UJHI08Gm1qDob5zDxnIHuDgEYHHqUhIKKwYBBAGXVQEF
 AQEHQNcRB+MUimTMqoxxMMUERpOR+Q4b1KgncDZkhrO2ql1tAwEIB4h4BBgWCAAgFiEEDM2H44Zo
 Pt9Ms0eHtVrAHPRh1FwFAmBx6lICGwwACgkQtVrAHPRh1Fw1JwD/Qo7kvtib8jy7puyWrSv0MeTS
 g8qIxgoRWJE/KKdkCLEA/jb9b9/g8nnX+UcwHf/4VfKsjExlnND3FrBviXUW6NcB
Date: Thu, 19 May 2022 14:26:17 +0000
In-Reply-To: <YoYyUsqX8i6MkJdY@HIDDEN> (Marwan L.'s message of "Thu, 19
 May 2022 13:04:34 +0100")
Message-ID: <87y1yx1tva.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 55470
Cc: 55470 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

"Marwan L." <techmetx11@HIDDEN> writes:

> On Wed, May 18, 2022 at 11:17:26PM +0000, Philip Kaludercic wrote:
>> "Marwan L." <techmetx11@HIDDEN> writes:
>> 
>> > This function allows you to delete packages, with names that match the
>> > regexp. This is makes operations like deleting multiple packages that
>> > begin with the same namespace (^company.*, ^treemacs.*, etc.) much
>> > easier to do
>> 
>> What is the advantage of a separate function for deleting packages
>> compared to marking packages in the *Packages* buffer using "/ n" (that
>> also accepts a regular expression)?
>
> It depends on how much packages you have to go through. If you have tons
> of packages to mark deletion on, then it will most likely involve
> holding d (wish you could do C-u 100 d) and then doing x

Apparently the prefix argument does not work, though you can do the same
with a macro.  Maybe adding a "t" to toggle the selection, though this
would be a very specific use-case.

What do you think about extending the package-menu-filter commands with
a way to mark all packages instead of filtering?

> `M-x list-packages` will also automatically fetch the latest list of
> packages from your package archives, which is unnecessary
>
> There's a prefix argument that disables fetching, but I didn't know that
> before making this function nor this patch

There is also M-x package-list-packages-no-fetch.

> You are free to close this patch if you want to

No, that is not my intention, I just wanted to clarify a point.

>> 
>> > The function will also tell you how much packages it will delete (in a
>> > temporary buffer) and prompt for a Yes or No answer




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#55470; Package emacs. Full text available.

Message received at 55470 <at> debbugs.gnu.org:


Received: (at 55470) by debbugs.gnu.org; 19 May 2022 12:23:46 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu May 19 08:23:46 2022
Received: from localhost ([127.0.0.1]:34721 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nrfBy-0007ar-8x
	for submit <at> debbugs.gnu.org; Thu, 19 May 2022 08:23:46 -0400
Received: from knopi.disroot.org ([178.21.23.139]:34106)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <techmetx11@HIDDEN>) id 1nrewU-0007BM-16
 for 55470 <at> debbugs.gnu.org; Thu, 19 May 2022 08:07:46 -0400
Received: from localhost (localhost [127.0.0.1])
 by disroot.org (Postfix) with ESMTP id 842CD437BF;
 Thu, 19 May 2022 14:07:44 +0200 (CEST)
X-Virus-Scanned: SPAM Filter at disroot.org
Received: from knopi.disroot.org ([127.0.0.1])
 by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024)
 with UTF8SMTP id xY893Le1nrUd; Thu, 19 May 2022 14:07:43 +0200 (CEST)
Date: Thu, 19 May 2022 13:04:34 +0100
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail;
 t=1652961890; bh=U/MGd7d8QCRDgb4Y06/B4V5aI8x4EqPmY/stZYxzqVE=;
 h=Date:From:To:Cc:Subject:References:In-Reply-To;
 b=SWSWrmgq4rvkJd1mYJ+hiLbetsU2y9RfFpl+t8KrSCD6vrrYlGOPZorlS/UlDBeL+
 QXXCCJIodS6aZBZzSO3XlJ0oFPiSe30V5DkWrIJC98yEjwMfoHVw+/2MuC57Ohnb0E
 qn/bIdnCvnulxf4qOCJfdLj/yZTQ7FzX2UXtHnU3MYGM8y9pPz7hKIXHs1e49d+3cr
 pBoLZneKHJylJxShb9WtszMgKbi0UypSyzUVEwf/vItfR0Oe0iwFnHmWVN24rx5XXo
 TtnUuZ9ITyxHJhOumKDkFz7+8vTLDOriv9pnZbEQSEG3ZJOKXYOUoPkrtCWaXgTHGf
 asYXOPhD4h2aQ==
From: "Marwan L." <techmetx11@HIDDEN>
To: Philip Kaludercic <philipk@HIDDEN>
Subject: Re: bug#55470: [PATCH] Add package-delete-regexp
Message-ID: <YoYyUsqX8i6MkJdY@HIDDEN>
References: <YoLdajcK6fsLZvV2@HIDDEN>
 <87y1yytoqh.fsf@HIDDEN>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <87y1yytoqh.fsf@HIDDEN>
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 55470
X-Mailman-Approved-At: Thu, 19 May 2022 08:23:42 -0400
Cc: 55470 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On Wed, May 18, 2022 at 11:17:26PM +0000, Philip Kaludercic wrote:
> "Marwan L." <techmetx11@HIDDEN> writes:
> 
> > This function allows you to delete packages, with names that match the
> > regexp. This is makes operations like deleting multiple packages that
> > begin with the same namespace (^company.*, ^treemacs.*, etc.) much
> > easier to do
> 
> What is the advantage of a separate function for deleting packages
> compared to marking packages in the *Packages* buffer using "/ n" (that
> also accepts a regular expression)?

It depends on how much packages you have to go through. If you have tons
of packages to mark deletion on, then it will most likely involve
holding d (wish you could do C-u 100 d) and then doing x

`M-x list-packages` will also automatically fetch the latest list of
packages from your package archives, which is unnecessary

There's a prefix argument that disables fetching, but I didn't know that
before making this function nor this patch

You are free to close this patch if you want to

> 
> > The function will also tell you how much packages it will delete (in a
> > temporary buffer) and prompt for a Yes or No answer




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#55470; Package emacs. Full text available.

Message received at 55470 <at> debbugs.gnu.org:


Received: (at 55470) by debbugs.gnu.org; 18 May 2022 23:17:35 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed May 18 19:17:35 2022
Received: from localhost ([127.0.0.1]:33904 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nrSv9-0007yV-47
	for submit <at> debbugs.gnu.org; Wed, 18 May 2022 19:17:35 -0400
Received: from mout02.posteo.de ([185.67.36.66]:50371)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <philipk@HIDDEN>) id 1nrSv7-0007yI-4j
 for 55470 <at> debbugs.gnu.org; Wed, 18 May 2022 19:17:33 -0400
Received: from submission (posteo.de [185.67.36.169]) 
 by mout02.posteo.de (Postfix) with ESMTPS id 9305E240107
 for <55470 <at> debbugs.gnu.org>; Thu, 19 May 2022 01:17:27 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;
 t=1652915847; bh=x5fjIO2hirdinFcH4xSIKf3KZV+XEQIiuvyRKov2PI0=;
 h=From:To:Cc:Subject:Autocrypt:Date:From;
 b=U1yVw08wqq21lv4wB4/0oFBn3L+JXpMnn4nYheA8Dq+R3vST3VXTqBdgu8iwPzOGO
 melpyj+cfWgiq+u+v6vy9vvGHxVHUtUPshBS+XfKpZm0LP+hIu19280lHOyMWsQ6wA
 1wSiT2pT/pvZFqtvCcaV5KRCIksAlYLNlCr0LwsfkIHzEiDHGuqIuaC+2TZWjKxXAA
 ukPhFwtIRBfTxZVcpX9q8cNuKFILVp0YlFp2NYWtasJg0Tww3NqZ9AOanQW9XAN0Ue
 coRWKFVaooDYorEExhFs0ZGOxEeZ9lsbOY30QAZ23HjrzK8FRIxvWZ7cVGomSAFPE+
 P+eHGKJOJLvUA==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 4L3TRC1Skfz6tmR;
 Thu, 19 May 2022 01:17:27 +0200 (CEST)
From: Philip Kaludercic <philipk@HIDDEN>
To: "Marwan L." <techmetx11@HIDDEN>
Subject: Re: bug#55470: [PATCH] Add package-delete-regexp
References: <YoLdajcK6fsLZvV2@HIDDEN>
Autocrypt: addr=philipk@HIDDEN; prefer-encrypt=nopreference; keydata=
 mDMEYHHqUhYJKwYBBAHaRw8BAQdAp3GdmYJ6tm5McweY6dEvIYIiry+Oz9rU4MH6NHWK0Ee0QlBo
 aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0
 ZW8ubmV0PoiQBBMWCAA4FiEEDM2H44ZoPt9Ms0eHtVrAHPRh1FwFAmBx6lICGwMFCwkIBwIGFQoJ
 CAsCBBYCAwECHgECF4AACgkQtVrAHPRh1FyTkgEAjlbGPxFchvMbxzAES3r8QLuZgCxeAXunM9gh
 io0ePtUBALVhh9G6wIoZhl0gUCbQpoN/UJHI08Gm1qDob5zDxnIHuDgEYHHqUhIKKwYBBAGXVQEF
 AQEHQNcRB+MUimTMqoxxMMUERpOR+Q4b1KgncDZkhrO2ql1tAwEIB4h4BBgWCAAgFiEEDM2H44Zo
 Pt9Ms0eHtVrAHPRh1FwFAmBx6lICGwwACgkQtVrAHPRh1Fw1JwD/Qo7kvtib8jy7puyWrSv0MeTS
 g8qIxgoRWJE/KKdkCLEA/jb9b9/g8nnX+UcwHf/4VfKsjExlnND3FrBviXUW6NcB
Date: Wed, 18 May 2022 23:17:26 +0000
In-Reply-To: <YoLdajcK6fsLZvV2@HIDDEN> (Marwan L.'s message of "Tue, 17
 May 2022 00:25:30 +0100")
Message-ID: <87y1yytoqh.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 55470
Cc: 55470 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

"Marwan L." <techmetx11@HIDDEN> writes:

> This function allows you to delete packages, with names that match the
> regexp. This is makes operations like deleting multiple packages that
> begin with the same namespace (^company.*, ^treemacs.*, etc.) much
> easier to do

What is the advantage of a separate function for deleting packages
compared to marking packages in the *Packages* buffer using "/ n" (that
also accepts a regular expression)?

> The function will also tell you how much packages it will delete (in a
> temporary buffer) and prompt for a Yes or No answer




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#55470; Package emacs. Full text available.
Added tag(s) moreinfo. Request was from Lars Ingebrigtsen <larsi@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 55470 <at> debbugs.gnu.org:


Received: (at 55470) by debbugs.gnu.org; 17 May 2022 17:49:04 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue May 17 13:49:04 2022
Received: from localhost ([127.0.0.1]:57854 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nr1Jf-0005vj-Ot
	for submit <at> debbugs.gnu.org; Tue, 17 May 2022 13:49:03 -0400
Received: from quimby.gnus.org ([95.216.78.240]:56126)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1nr1Je-0005vE-7H
 for 55470 <at> debbugs.gnu.org; Tue, 17 May 2022 13:49:02 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:
 References: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=vFfxTsGGcUEm+M92dRE3xmadKwk8pyhyOOYSSMyz/98=; b=A6LQJQR+LrHYLALHb2COD3Xvoa
 W/OjFZ4mWxWCkvq5oxfz6cm9+QlWVJ7NHjQCvs3uUl/Vl8lpOhcBRqvd/jJ4YrqGaFrui7oB7NABG
 JCaUFFX0N5ijK6S6p3QJl7BwiEfXZzCaWJ9lObgt8G+Rf2GF8v/y+tStxnAGF0Agz4/o=;
Received: from [84.212.220.105] (helo=xo)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1nr1JW-0004aW-4r; Tue, 17 May 2022 19:48:56 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: "Marwan L." <techmetx11@HIDDEN>
Subject: Re: bug#55470: [PATCH] Add package-delete-regexp
References: <YoLdajcK6fsLZvV2@HIDDEN>
X-Now-Playing: Feathered Sun's _Saubohnen EP_: "Help, Hold, Hurt, Hope"
Date: Tue, 17 May 2022 19:48:53 +0200
In-Reply-To: <YoLdajcK6fsLZvV2@HIDDEN> (Marwan L.'s message of "Tue, 17
 May 2022 00:25:30 +0100")
Message-ID: <87mtfgjbi2.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.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
 @@CONTACT_ADDRESS@@ for details.
 Content preview: "Marwan L." <techmetx11@HIDDEN> writes: > This function
 allows you to delete packages, with names that match the > regexp. This is
 makes operations like deleting multiple packages that > begin with the same
 namespace (^company.*, ^treemacs. [...] 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 55470
Cc: 55470 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

"Marwan L." <techmetx11@HIDDEN> writes:

> This function allows you to delete packages, with names that match the
> regexp. This is makes operations like deleting multiple packages that
> begin with the same namespace (^company.*, ^treemacs.*, etc.) much
> easier to do
>
> The function will also tell you how much packages it will delete (in a
> temporary buffer) and prompt for a Yes or No answer

Thanks; makes sense to me.  The patch is longer than the limit for
"trivial" changes, so we'd need for the copyright to be assigned to the
FSF before accepting it.  Would you be willing to sign such paperwork?

If so, below is the form to get started:


Please email the following information to assign@HIDDEN, and we
will send you the assignment form for your past and future changes.

Please use your full legal name (in ASCII characters) as the subject
line of the message.
----------------------------------------------------------------------
REQUEST: SEND FORM FOR PAST AND FUTURE CHANGES

[What is the name of the program or package you're contributing to?]
Emacs

[Did you copy any files or text written by someone else in these changes?
Even if that material is free software, we need to know about it.]

[Do you have an employer who might have a basis to claim to own
your changes?  Do you attend a school which might make such a claim?]

[For the copyright registration, what country are you a citizen of?]

[What year were you born?]

[Please write your email address here.]

[Please write your postal address here.]

[Which files have you changed so far, and which new files have you written
so far?]




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#55470; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 17 May 2022 01:00:38 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon May 16 21:00:38 2022
Received: from localhost ([127.0.0.1]:55418 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nqlZl-0007QH-Oh
	for submit <at> debbugs.gnu.org; Mon, 16 May 2022 21:00:38 -0400
Received: from lists.gnu.org ([209.51.188.17]:43062)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <techmetx11@HIDDEN>) id 1nqk60-0000Yh-2S
 for submit <at> debbugs.gnu.org; Mon, 16 May 2022 19:25:48 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:59010)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <techmetx11@HIDDEN>)
 id 1nqk5z-0002tG-Ts
 for bug-gnu-emacs@HIDDEN; Mon, 16 May 2022 19:25:47 -0400
Received: from knopi.disroot.org ([178.21.23.139]:34084)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <techmetx11@HIDDEN>)
 id 1nqk5x-0007F1-NR
 for bug-gnu-emacs@HIDDEN; Mon, 16 May 2022 19:25:47 -0400
Received: from localhost (localhost [127.0.0.1])
 by disroot.org (Postfix) with ESMTP id 64CDC42E2B
 for <bug-gnu-emacs@HIDDEN>; Tue, 17 May 2022 01:25:43 +0200 (CEST)
X-Virus-Scanned: SPAM Filter at disroot.org
Received: from knopi.disroot.org ([127.0.0.1])
 by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id FGvuEFPdzx4b for <bug-gnu-emacs@HIDDEN>;
 Tue, 17 May 2022 01:25:42 +0200 (CEST)
Date: Tue, 17 May 2022 00:25:30 +0100
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail;
 t=1652743541; bh=ujL+2Z1SRjbpS9Tk25mH2r4u/NFZ/ynpbDwA4BN1kIM=;
 h=Date:From:To:Subject;
 b=Vx/HhxBmYQd46ySD9BBzfdMbJXaq/6mdgRTOTpDU5LgJJSoVsU9BMmxwHEMNxQRQE
 nJgDo1VYsAVwyjPckpcLONEvz2AlgdWV9NqA+LpIIAkPIyPBdJyby8oWOADVn9YmhR
 CNGGTvdVsXeTc1EPd/zd9ROlfimLAh1KUw/2OXg7QOUPnb/pyie+3QL+FIYXXKYO7h
 cVescvht5tkpuBgz7ekAc7GWA2/AsIMvOwy5/jY540Xrpl4LpkmgVsdHSYWgRFUvEH
 qf+e2mIeL48WV8Uxh8sBOsUnz9fbKK5dfucTG4DHZ1J2UkzXFxZUPGJ2Ty6C/n6KvT
 4ZCQ/I7AkUEzQ==
From: "Marwan L." <techmetx11@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: [PATCH] Add package-delete-regexp
Message-ID: <YoLdajcK6fsLZvV2@HIDDEN>
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="AbAjkDmf+m/b6ZVC"
Content-Disposition: inline
Received-SPF: pass client-ip=178.21.23.139;
 envelope-from=techmetx11@HIDDEN; helo=knopi.disroot.org
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, 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.4 (-)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Mon, 16 May 2022 21:00:36 -0400
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.4 (--)


--AbAjkDmf+m/b6ZVC
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

This function allows you to delete packages, with names that match the
regexp. This is makes operations like deleting multiple packages that
begin with the same namespace (^company.*, ^treemacs.*, etc.) much
easier to do

The function will also tell you how much packages it will delete (in a
temporary buffer) and prompt for a Yes or No answer


--AbAjkDmf+m/b6ZVC
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="package.diff"

diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index f356a2bf60..a166b0ef47 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -2400,6 +2400,33 @@ If NOSAVE is non-nil, the package is not removed from
            (message "Package `%s' deleted."
                     (package-desc-full-name pkg-desc))))))
 
+(defun package-delete-regexp (pkg-regexp &optional force nosave)
+  "Delete packages matching the regexp PKG-REGEXP
+This will use `package-delete' to delete packages"
+  (interactive
+   (let ((pkg-regexp (read-string "Delete packages (regexp): ")))
+     (list pkg-regexp)))
+
+  ;;; Search through every package name and match it with the user's regexp
+  ;;; and filter out the nil's
+  (let ((pkg-list (remq nil
+                        (mapcar
+			 (lambda (elem)
+                           (if (string-match pkg-regexp (package-desc-full-name (nth 1 elem)))
+			       (nth 1 elem)))
+			 (package--alist)))))
+    (if (length> pkg-list 0) 
+	(with-output-to-temp-buffer "Package Deletion"
+	  (pop-to-buffer "Package Deletion")
+	  (princ "This operation will delete these following packages: \n")
+	  (dolist (elem pkg-list)
+	    (princ (format "%s\n" (package-desc-full-name elem))))
+	  (if (y-or-n-p "Delete? ")
+	      (dolist (elem pkg-list)
+		(package-delete elem force nosave)))
+	  (kill-current-buffer))
+      (message "No packages found"))))
+
 ;;;###autoload
 (defun package-reinstall (pkg)
   "Reinstall package PKG.

--AbAjkDmf+m/b6ZVC--




Acknowledgement sent to "Marwan L." <techmetx11@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#55470; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Tue, 7 Jun 2022 07:00:02 UTC

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