Subject: bug#73932: closed (Re: bug#73932: [PATCH] Add noconfirm to 'package-autoremove')

From: [email-masked] (GNU bug Tracking System)
Date: Thu, 21 Nov 2024 21:18:02 +0000

Your bug report

#73932: [PATCH] Add noconfirm to 'package-autoremove'

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
73932: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=73932
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#73932: [PATCH] Add noconfirm to 'package-autoremove'
From: Philip Kaludercic <[email-masked]>
To: Sean Devlin <[email-masked]>
Cc: Eli Zaretskii <[email-masked]>, [email-masked], Stefan Kangas <[email-masked]>
Date: Thu, 21 Nov 2024 21:17:14 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

Philip Kaludercic <[email-masked]> writes:

> Sean Devlin <[email-masked]> writes:
>
>> Hi folks,
>>
>>> On Nov 5, 2024, at 12:45 PM, Sean Devlin <[email-masked]> wrote:
>>> 
>>> Hi folks,
>>> 
>>>> On Oct 28, 2024, at 10:48 AM, Sean Devlin <[email-masked]> wrote:
>>>> 
>>>> Hi folks,
>>>> 
>>>>> On Oct 27, 2024, at 5:53 AM, Stefan Kangas
>>>>> <[email-masked]> wrote:
>>>>> 
>>>>> Philip Kaludercic <[email-masked]> writes:
>>>>> 
>>>>>> Is the variation interesting, where NOCONFIRM is a predicate so that
>>>>>> we can selectively remove packages?
>>>>> 
>>>>> Do you have a use case in mind?
>>>>> 
>>>>>>> Sure, that might make sense. If we do that, should we do the
>>>>>> same in package-install-selected-packages? It uses its NOCONFIRM
>>>>>> argument in a similar way.
>>>>>> 
>>>>>> We can do that in a subsequent patch.
>>>>> 
>>>>> Feel free to post such a patch, indeed.  Thanks in advance.
>>>> 
>>>> Here’s two patches:
>>>> 
>>>> <0001-Add-noconfirm-to-package-autoremove.patch><0002-Use-prefix-argument-in-package-install-selected-pack.patch>
>>>> 
>>>> The first is the same as before, but it adds the prefix argument
>>>> usage Eli suggested.
>>>> 
>>>> The second patch adds a matching prefix argument to
>>>> package-install-selected-packages (if this is desired).
>>>> 
>>>> I didn’t implement a predicate option for NOCONFIRM yet, since I
>>>> couldn’t think of a use case, and the intended semantics are not
>>>> quite clear to me.
>>>> 
>>>> Please let me know what else is needed, and thanks!
>>> 
>>> Are there any outstanding issues? If so, how can I help resolve them?
>>> 
>>> Thanks!
>>
>> Just checking in again. Is there anything I can do to help resolve this?
>
> Sorry for the delay, I can apply it to master if nobody objects.

I've pushed the changes, and will close this report.  Thanks!

>> Thanks!

-- 
	Philip Kaludercic on siskin

Subject: [PATCH] Add noconfirm to 'package-autoremove'
From: Sean Devlin <[email-masked]>
To: [email-masked]
Date: Mon, 21 Oct 2024 11:58:34 -0400
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi folks,

Attached is a patch adding an optional NOCONFIRM argument to package-autoremove to skip user confirmation before removing packages.

I want to call package-autoremove in my init file to ensure there are no packages installed except those I configured explicitly via package-selected-packages.

For example, in one session I might install package XYZ interactively via the package menu to try it out. If I decide I like it, I’ll add it to package-selected-packages in my init file to keep it around. Otherwise, I want to make sure it gets blown away the next time I start Emacs.

This workflow is cumbersome in the current implementation of package-autoremove, which prompts the user before removing any packages. This patch adds an optional NOCONFIRM argument similar to what is implemented in package-install-selected-packages.

Please let me know if any changes are needed.

Thanks!