From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Marwan L." via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#55470: [PATCH] Add package-delete-regexp Date: Thu, 19 May 2022 19:15:20 +0100 Message-ID: References: <87y1yytoqh.fsf@posteo.net> <87y1yx1tva.fsf@posteo.net> Reply-To: "Marwan L." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34376"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 55470@debbugs.gnu.org To: Philip Kaludercic Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu May 19 20:52:12 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nrlFs-0008ho-6C for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 19 May 2022 20:52:12 +0200 Original-Received: from localhost ([::1]:43556 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nrlFq-0008MR-MW for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 19 May 2022 14:52:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44276) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nrlFh-0008MF-V4 for bug-gnu-emacs@gnu.org; Thu, 19 May 2022 14:52:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:42684) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nrlFh-0003Mm-MP for bug-gnu-emacs@gnu.org; Thu, 19 May 2022 14:52:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nrlFh-0001kf-J7 for bug-gnu-emacs@gnu.org; Thu, 19 May 2022 14:52:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: "Marwan L." Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 19 May 2022 18:52:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55470 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch moreinfo Original-Received: via spool by 55470-submit@debbugs.gnu.org id=B55470.16529862626644 (code B ref 55470); Thu, 19 May 2022 18:52:01 +0000 Original-Received: (at 55470) by debbugs.gnu.org; 19 May 2022 18:51:02 +0000 Original-Received: from localhost ([127.0.0.1]:36581 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nrlEj-0001j2-CE for submit@debbugs.gnu.org; Thu, 19 May 2022 14:51:01 -0400 Original-Received: from knopi.disroot.org ([178.21.23.139]:57064) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nrkgW-0000oV-3K for 55470@debbugs.gnu.org; Thu, 19 May 2022 14:15:41 -0400 Original-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 Original-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) 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== Content-Disposition: inline In-Reply-To: <87y1yx1tva.fsf@posteo.net> X-Mailman-Approved-At: Thu, 19 May 2022 14:51:00 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:232661 Archived-At: On Thu, May 19, 2022 at 02:26:17PM +0000, Philip Kaludercic wrote: > "Marwan L." writes: > > > On Wed, May 18, 2022 at 11:17:26PM +0000, Philip Kaludercic wrote: > >> "Marwan L." 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