Subject: Re: bug#55470: [PATCH] Add package-delete-regexp

From: "Marwan L." <[email-masked]>
Date: Thu, 19 May 2022 19:15:20 +0100

On Thu, May 19, 2022 at 02:26:17PM +0000, Philip Kaludercic wrote:
> "Marwan L." <[email-masked]> writes:
> 
> > On Wed, May 18, 2022 at 11:17:26PM +0000, Philip Kaludercic wrote:
> >> "Marwan L." <[email-masked]> 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