GNU bug report logs - #73932
[PATCH] Add noconfirm to 'package-autoremove'

Previous Next

Package: emacs;

Reported by: Sean Devlin <spd <at> toadstyle.org>

Date: Mon, 21 Oct 2024 16:00:03 UTC

Severity: normal

Tags: patch

Done: Philip Kaludercic <philipk <at> posteo.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Sean Devlin <spd <at> toadstyle.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 73932 <at> debbugs.gnu.org
Subject: bug#73932: [PATCH] Add noconfirm to 'package-autoremove'
Date: Mon, 21 Oct 2024 14:04:14 -0400
[Message part 1 (text/plain, inline)]
Hello,

> On Oct 21, 2024, at 12:35 PM, Eli Zaretskii <eliz <at> gnu.org> wrote:
> 
>> From: Sean Devlin <spd <at> toadstyle.org>
>> Date: Mon, 21 Oct 2024 11:58:34 -0400
>> 
>> 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.  I'll let our package.el experts review and comment, but if
> this is accepted, please add a NEWS entry for the new optional
> behavior.

Sounds good. Here is a patch with an attempt at a NEWS entry:

[0001-Add-noconfirm-to-package-autoremove.patch (application/octet-stream, attachment)]
[Message part 3 (text/plain, inline)]

Please let me know if any changes are needed.

> 
> Also, would it make sense to turn NOCONFIRM on if the command is
> invoked with a prefix argument?

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.

This bug report was last modified 235 days ago.

Previous Next


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