From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#73932: [PATCH] Add noconfirm to 'package-autoremove' Date: Mon, 21 Oct 2024 19:35:42 +0300 Message-ID: <864j55h0rl.fsf@gnu.org> References: <2AA4E1A2-0422-40F5-BFD6-CDAE69996F1F@toadstyle.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="762"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 73932@debbugs.gnu.org To: Sean Devlin Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Oct 21 18:38:31 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 1t2vQN-000Ad3-AD for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 21 Oct 2024 18:38:31 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t2vP5-0007RX-JM; Mon, 21 Oct 2024 12:37:11 -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 1t2vOW-0006Qs-Vn for bug-gnu-emacs@gnu.org; Mon, 21 Oct 2024 12:36:40 -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 1t2vOW-0006Md-Mc for bug-gnu-emacs@gnu.org; Mon, 21 Oct 2024 12:36:36 -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:References:In-Reply-To:From:Date:To:Subject; bh=OjaNV7I91BBmEQ6xJndDqNgs8Skohd+fZgruPckwFLU=; b=oX2TMcZe0F2r2T8rk9wekBKbPiba51xElcqjA402VbW5RpjLmG3/VKEcwfE82HQ1ITys98Osp1ZlJNFechpwi6zCDPg7OoRCocQL5PUKs5i3lhFdSoPbNQxci9wXsDn5lhR+qA2Eho4iKMpRqJ3UF9MYOo/Fj/lxU10Kcj+4Nuap6h1rb3GWWBzGe34pasXThkBSS1giSbLR3yZ+YEwFdiWL62Pi1QxiGSeylUMaPIO8tpfmhL1mUS32dZC/zh3e73dPJGn76z/S7FIMhw7pfweKiBPWCzCJO9ooH8Nan1g6wZ5xswDGt1mTUlDjyCGNASKEHZf4Pdg9og1Hqz3M4A==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t2vOw-0002DG-AO for bug-gnu-emacs@gnu.org; Mon, 21 Oct 2024 12:37:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 21 Oct 2024 16:37: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.17295285798450 (code B ref 73932); Mon, 21 Oct 2024 16:37:02 +0000 Original-Received: (at 73932) by debbugs.gnu.org; 21 Oct 2024 16:36:19 +0000 Original-Received: from localhost ([127.0.0.1]:53105 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t2vOF-0002CE-4t for submit@debbugs.gnu.org; Mon, 21 Oct 2024 12:36:19 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:36552) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t2vOD-0002Bz-AZ for 73932@debbugs.gnu.org; Mon, 21 Oct 2024 12:36:18 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t2vNg-0006GE-12; Mon, 21 Oct 2024 12:35:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=OjaNV7I91BBmEQ6xJndDqNgs8Skohd+fZgruPckwFLU=; b=A5kDgRhejbEofGqkX7I9 0Hf7QSoZdzvvgLEOX5ld0TVuVwVcd7bX5hjblUGmH9lMaGkUXS7aGAfZEeyRcKE0CGZ1+/wkwVJxJ DRlwdY7B6W6/02Twc0RkMd4qJlPPLesTR5HVCl81Ypj0mto4yr3YJ0DGhoJSSbyhc9wLmLACVHRVN zv5SvBfZzr7g1s9xD49Pt+MpJipbWQ3DBK3rlQdlUXLzC014Im/IzKfI2hUhha02p+IpKTvrXSJNl ySNIwi/D0cjHgbMzCD76xvesnyMtdYugc4PE2HdKLdIzHtdHKZq/6TIo1UcWx/p3zZa4knQQYyzNl KBdR0KrZl4jqWw==; In-Reply-To: <2AA4E1A2-0422-40F5-BFD6-CDAE69996F1F@toadstyle.org> (message from Sean Devlin on Mon, 21 Oct 2024 11:58:34 -0400) 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:294075 Archived-At: > From: Sean Devlin > 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?