GNU bug report logs -
#73932
[PATCH] Add noconfirm to 'package-autoremove'
Previous Next
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.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 73932 in the body.
You can then email your comments to 73932 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#73932
; Package
emacs
.
(Mon, 21 Oct 2024 16:00:03 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Sean Devlin <spd <at> toadstyle.org>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Mon, 21 Oct 2024 16:00:03 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
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!
[0001-Add-noconfirm-to-package-autoremove.patch (application/octet-stream, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#73932
; Package
emacs
.
(Mon, 21 Oct 2024 16:37:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 73932 <at> debbugs.gnu.org (full text, mbox):
> 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.
Also, would it make sense to turn NOCONFIRM on if the command is
invoked with a prefix argument?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#73932
; Package
emacs
.
(Mon, 21 Oct 2024 18:06:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 73932 <at> debbugs.gnu.org (full text, mbox):
[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.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#73932
; Package
emacs
.
(Sat, 26 Oct 2024 07:33:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 73932 <at> debbugs.gnu.org (full text, mbox):
Sean Devlin <spd <at> toadstyle.org> writes:
> 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:
The change looks pretty uncontroversial to me. Is the variation
interesting, where NOCONFIRM is a predicate so that we can selectively
remove packages?
> 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.
We can do that in a subsequent patch.
--
Philip Kaludercic on siskin
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#73932
; Package
emacs
.
(Sun, 27 Oct 2024 09:56:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 73932 <at> debbugs.gnu.org (full text, mbox):
Philip Kaludercic <philipk <at> posteo.net> writes:
> The change looks pretty uncontroversial to me.
Agreed.
> 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.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#73932
; Package
emacs
.
(Mon, 28 Oct 2024 14:51:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 73932 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi folks,
> On Oct 27, 2024, at 5:53 AM, Stefan Kangas <stefankangas <at> gmail.com> wrote:
>
> Philip Kaludercic <philipk <at> posteo.net> 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 (application/octet-stream, attachment)]
[0002-Use-prefix-argument-in-package-install-selected-pack.patch (application/octet-stream, attachment)]
[Message part 4 (text/plain, inline)]
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!
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#73932
; Package
emacs
.
(Tue, 05 Nov 2024 17:48:02 GMT)
Full text and
rfc822 format available.
Message #23 received at 73932 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi folks,
> On Oct 28, 2024, at 10:48 AM, Sean Devlin <spd <at> toadstyle.org> wrote:
>
> Hi folks,
>
>> On Oct 27, 2024, at 5:53 AM, Stefan Kangas <stefankangas <at> gmail.com> wrote:
>>
>> Philip Kaludercic <philipk <at> posteo.net> 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!
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#73932
; Package
emacs
.
(Fri, 15 Nov 2024 17:10:01 GMT)
Full text and
rfc822 format available.
Message #26 received at 73932 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi folks,
> On Nov 5, 2024, at 12:45 PM, Sean Devlin <spd <at> toadstyle.org> wrote:
>
> Hi folks,
>
>> On Oct 28, 2024, at 10:48 AM, Sean Devlin <spd <at> toadstyle.org> wrote:
>>
>> Hi folks,
>>
>>> On Oct 27, 2024, at 5:53 AM, Stefan Kangas <stefankangas <at> gmail.com> wrote:
>>>
>>> Philip Kaludercic <philipk <at> posteo.net> 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?
Thanks!
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#73932
; Package
emacs
.
(Mon, 18 Nov 2024 03:37:02 GMT)
Full text and
rfc822 format available.
Message #29 received at 73932 <at> debbugs.gnu.org (full text, mbox):
Sean Devlin <spd <at> toadstyle.org> writes:
> Hi folks,
>
>> On Nov 5, 2024, at 12:45 PM, Sean Devlin <spd <at> toadstyle.org> wrote:
>>
>> Hi folks,
>>
>>> On Oct 28, 2024, at 10:48 AM, Sean Devlin <spd <at> toadstyle.org> wrote:
>>>
>>> Hi folks,
>>>
>>>> On Oct 27, 2024, at 5:53 AM, Stefan Kangas
>>>> <stefankangas <at> gmail.com> wrote:
>>>>
>>>> Philip Kaludercic <philipk <at> posteo.net> 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.
> Thanks!
>
--
Philip Kaludercic on siskin
Reply sent
to
Philip Kaludercic <philipk <at> posteo.net>
:
You have taken responsibility.
(Thu, 21 Nov 2024 21:18:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Sean Devlin <spd <at> toadstyle.org>
:
bug acknowledged by developer.
(Thu, 21 Nov 2024 21:18:02 GMT)
Full text and
rfc822 format available.
Message #34 received at 73932-done <at> debbugs.gnu.org (full text, mbox):
Philip Kaludercic <philipk <at> posteo.net> writes:
> Sean Devlin <spd <at> toadstyle.org> writes:
>
>> Hi folks,
>>
>>> On Nov 5, 2024, at 12:45 PM, Sean Devlin <spd <at> toadstyle.org> wrote:
>>>
>>> Hi folks,
>>>
>>>> On Oct 28, 2024, at 10:48 AM, Sean Devlin <spd <at> toadstyle.org> wrote:
>>>>
>>>> Hi folks,
>>>>
>>>>> On Oct 27, 2024, at 5:53 AM, Stefan Kangas
>>>>> <stefankangas <at> gmail.com> wrote:
>>>>>
>>>>> Philip Kaludercic <philipk <at> posteo.net> 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
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#73932
; Package
emacs
.
(Fri, 22 Nov 2024 16:32:02 GMT)
Full text and
rfc822 format available.
Message #37 received at 73932-done <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
> On Nov 21, 2024, at 4:17 PM, Philip Kaludercic <philipk <at> posteo.net> wrote:
>
> ...
>
> I've pushed the changes, and will close this report. Thanks!
>
Thanks!
[Message part 2 (text/html, inline)]
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sat, 21 Dec 2024 12:24:05 GMT)
Full text and
rfc822 format available.
This bug report was last modified 182 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.