From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Philip Kaludercic Newsgroups: gmane.emacs.bugs Subject: bug#73932: [PATCH] Add noconfirm to 'package-autoremove' Date: Sat, 26 Oct 2024 07:31:16 +0000 Message-ID: <87iktfe2wr.fsf@posteo.net> References: <2AA4E1A2-0422-40F5-BFD6-CDAE69996F1F@toadstyle.org> <864j55h0rl.fsf@gnu.org> <487C14D0-1114-49BC-996E-E3C74D17950F@toadstyle.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26346"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , 73932@debbugs.gnu.org To: Sean Devlin Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Oct 26 09:32:45 2024 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 1t4bHw-0006fF-1o for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 26 Oct 2024 09:32:44 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t4bHo-0006wX-1v; Sat, 26 Oct 2024 03:32:36 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t4bHk-0006wD-66 for bug-gnu-emacs@gnu.org; Sat, 26 Oct 2024 03:32:32 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t4bHh-0004kF-HE for bug-gnu-emacs@gnu.org; Sat, 26 Oct 2024 03:32:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=VPKazXe5v8f+3NEOQsTeqw7zv3PYyF3GakA7sR2WYOQ=; b=ehAge6ZR8QSY+tA8XtPyk5sKH21rGN4I6PME2wwEzmmaquR04T1IwWjvV15+/Y3geJbQ9p8qZ/buFjv4EEO8BPxajNscgeZaZC6BkyPCr/48cl+SXtGYIFFEoI3Lh/vJwoMVXTTezb0wvP5RdHZLvXued+htwbNc0YRLPkdtXw3j/7ywgTKlhFb04HutfG3XCVPPjIWRfMUAhXHvlRoOCGefhT+mlB2iejcbiGWvwKmI8CQvI53hA9YqfpJwEFofB5LDbXFkDOHxBcOAnOJfMe4vEMPteZX/Luv/TyGzy8c/pLXzNBlUx8w2bRKeiDWRUNsJoP579j978xcoWb2VBg==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t4bIE-0005ej-5O for bug-gnu-emacs@gnu.org; Sat, 26 Oct 2024 03:33:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 26 Oct 2024 07:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73932 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 73932-submit@debbugs.gnu.org id=B73932.172992792621659 (code B ref 73932); Sat, 26 Oct 2024 07:33:02 +0000 Original-Received: (at 73932) by debbugs.gnu.org; 26 Oct 2024 07:32:06 +0000 Original-Received: from localhost ([127.0.0.1]:40454 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t4bHJ-0005dH-Qd for submit@debbugs.gnu.org; Sat, 26 Oct 2024 03:32:06 -0400 Original-Received: from mout01.posteo.de ([185.67.36.65]:42485) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t4bHH-0005ch-KM for 73932@debbugs.gnu.org; Sat, 26 Oct 2024 03:32:05 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 9F13E240027 for <73932@debbugs.gnu.org>; Sat, 26 Oct 2024 09:31:22 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1729927883; bh=50asQK72PN+ztvZrvK2QnpJg+6MhkI5PbpRjDHxC2eU=; h=From:To:Cc:Subject:Autocrypt:OpenPGP:Date:Message-ID:MIME-Version: Content-Type:Content-Transfer-Encoding:From; b=GkjPofcs2mffVP6g+3dz+5Be9j7AZBgpygN2tqQ4nkqEhHYNCAd8p67hwzNzYMmun zlGJ8V83IkGzB+0Po0a7Q1bshHOw6wu8ixGF/KL7xgDL0bBEV8L6rrjK/nuF8RHuQO 5i0iFtzkNinvkXCb2Xz552xynVClPeOKtmJNJPTTL7oCaALtbYqkxPKbwm/wuiNWPh 23f0qals+X8u6K5/YsGxl0BhVxEm9R6vOSex7E7FeiaE/O10qLcpqvJhEh1Roayvtb si+yJT08NRwpOmIvakhhlKRGWlr9Mu3TSL6BMTnbQ04EolJPxFp9JMOuAnNutKBgcR GugDxR5N/1Ltg== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4XbBCs4zKzz9rxG; Sat, 26 Oct 2024 09:31:21 +0200 (CEST) In-Reply-To: <487C14D0-1114-49BC-996E-E3C74D17950F@toadstyle.org> (Sean Devlin's message of "Mon, 21 Oct 2024 14:04:14 -0400") Autocrypt: addr=philipk@posteo.net; keydata= mDMEZBBQQhYJKwYBBAHaRw8BAQdAHJuofBrfqFh12uQu0Yi7mrl525F28eTmwUDflFNmdui0QlBo aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0 ZW8ubmV0PoiWBBMWCAA+FiEEDg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwMFCQHhM4AFCwkI BwIGFQoJCAsCBBYCAwECHgECF4AACgkQ8xYDWXahwulikAEA77hloUiSrXgFkUVJhlKBpLCHUjA0 mWZ9j9w5d08+jVwBAK6c4iGP7j+/PhbkxaEKa4V3MzIl7zJkcNNjHCXmvFcEuDgEZBBQQhIKKwYB BAGXVQEFAQEHQI5NLiLRjZy3OfSt1dhCmFyn+fN/QKELUYQetiaoe+MMAwEIB4h+BBgWCAAmFiEE Dg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwwFCQHhM4AACgkQ8xYDWXahwukm+wEA8cml4JpK NeAu65rg+auKrPOP6TP/4YWRCTIvuYDm0joBALw98AMz7/qMHvSCeU/hw9PL6u6R2EScxtpKnWof z4oM OpenPGP: id=philipk@posteo.net; url="https://keys.openpgp.org/vks/v1/by-email/philipk@posteo.net"; preference=signencrypt 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:294259 Archived-At: Sean Devlin writes: > Hello, > >> On Oct 21, 2024, at 12:35=E2=80=AFPM, Eli Zaretskii wrote: >>=20 >>> From: Sean Devlin >>> Date: Mon, 21 Oct 2024 11:58:34 -0400 >>>=20 >>> Attached is a patch adding an optional NOCONFIRM argument to package-au= toremove to skip user confirmation before removing packages. >>>=20 >>> 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. >>>=20 >>> 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=E2=80=99ll add it to package-selected-packages in my init fi= le >>> to keep it around. Otherwise, I want to make sure it gets blown >>> away the next time I start Emacs. >>>=20 >>> 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. >>>=20 >>> Please let me know if any changes are needed. >>=20 >> 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. > >>=20 >> 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 pack= age-install-selected-packages? It uses its NOCONFIRM argument in a similar = way. We can do that in a subsequent patch. --=20 Philip Kaludercic on siskin