From unknown Sun Jun 22 00:49:02 2025 X-Loop: help-debbugs@gnu.org Subject: bug#27940: Recursively delete dir34? (yes, no, all, quit) Resent-From: =?UTF-8?Q?=E7=A9=8D=E4=B8=B9=E5=B0=BC?= Dan Jacobson Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 04 Aug 2017 00:38:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 27940 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 27940@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.150180702323419 (code B ref -1); Fri, 04 Aug 2017 00:38:01 +0000 Received: (at submit) by debbugs.gnu.org; 4 Aug 2017 00:37:03 +0000 Received: from localhost ([127.0.0.1]:40555 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ddQbu-00065e-Rk for submit@debbugs.gnu.org; Thu, 03 Aug 2017 20:37:03 -0400 Received: from eggs.gnu.org ([208.118.235.92]:50761) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ddQbt-000654-Lq for submit@debbugs.gnu.org; Thu, 03 Aug 2017 20:37:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ddQbn-00038p-CL for submit@debbugs.gnu.org; Thu, 03 Aug 2017 20:36:56 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_DKIM_INVALID, URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:35779) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ddQbn-00038i-91 for submit@debbugs.gnu.org; Thu, 03 Aug 2017 20:36:55 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41699) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ddQbm-0002tW-67 for bug-gnu-emacs@gnu.org; Thu, 03 Aug 2017 20:36:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ddQbi-00033o-4w for bug-gnu-emacs@gnu.org; Thu, 03 Aug 2017 20:36:54 -0400 Received: from homie.mail.dreamhost.com ([208.97.132.208]:34039 helo=homiemail-a9.g.dreamhost.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ddQbh-00031i-VF for bug-gnu-emacs@gnu.org; Thu, 03 Aug 2017 20:36:50 -0400 Received: from homiemail-a9.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a9.g.dreamhost.com (Postfix) with ESMTP id 93E9A5BE066 for ; Thu, 3 Aug 2017 17:36:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=jidanni.org; h=from:to :subject:date:message-id:mime-version:content-type; s= jidanni.org; bh=CQe+Az6m0Rz6Cq+xY9wnecMlhys=; b=EfD9NLqJqazSKAzl YHBcOr1Z4IHRm7JCYXP7A4ZWbWNu3m3sd4bZsNzrBNNM+Fy0BwSyCGcKw2Mhxk4d FypBVeZHwFzqsm7fBmQxjJO9Z40VWxa+M8JX9D0WJGD2iZKjfYRJRKBbLTHps211 8Y3eYdkS1mTpVK6go+KUCtIpXbg= Received: from jidanni.org (114-26-42-220.dynamic-ip.hinet.net [114.26.42.220]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: jidanni@jidanni.org) by homiemail-a9.g.dreamhost.com (Postfix) with ESMTPSA id 65D405BE064 for ; Thu, 3 Aug 2017 17:36:41 -0700 (PDT) From: =?UTF-8?Q?=E7=A9=8D=E4=B8=B9=E5=B0=BC?= Dan Jacobson Date: Fri, 04 Aug 2017 07:26:24 +0800 Message-ID: <87o9rwxmfz.fsf@jidanni.org> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) dired-do-flagged-delete and me interaction: Recursively delete dcepc? (yes or no) yes Recursively delete emmpc? (yes or no) yes Recursively delete zpspc? (yes or no) yes Recursively delete dgcpc? (yes or no) yes Wouldn't it be nice if there was instead: Recursively delete dgcpc? (yes, no, all, quit) Yes, if before we started we set the variables we needn't be asked all those questions. But now *midway* through the list, we decide we would like no more question, there should be a way, without needing to quit and start over, even if doing that isn't so bad. From unknown Sun Jun 22 00:49:02 2025 X-Loop: help-debbugs@gnu.org Subject: bug#27940: Recursively delete dir34? (yes, no, all, quit) Resent-From: Tino Calancha Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 04 Aug 2017 08:27:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27940 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: =?UTF-8?Q?=E7=A9=8D=E4=B8=B9=E5=B0=BC?= Dan Jacobson Cc: 27940@debbugs.gnu.org, Eli Zaretskii Received: via spool by 27940-submit@debbugs.gnu.org id=B27940.1501835164388 (code B ref 27940); Fri, 04 Aug 2017 08:27:02 +0000 Received: (at 27940) by debbugs.gnu.org; 4 Aug 2017 08:26:04 +0000 Received: from localhost ([127.0.0.1]:40790 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ddXvn-00006A-MU for submit@debbugs.gnu.org; Fri, 04 Aug 2017 04:26:03 -0400 Received: from mail-pg0-f65.google.com ([74.125.83.65]:36458) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ddXvl-00005Y-OF for 27940@debbugs.gnu.org; Fri, 04 Aug 2017 04:26:02 -0400 Received: by mail-pg0-f65.google.com with SMTP id y129so1157988pgy.3 for <27940@debbugs.gnu.org>; Fri, 04 Aug 2017 01:26:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=suCIfRMJJn/nZjwWN4ks+HCmO3JvO0ieMP2v3Tco4+c=; b=ePGyxbvtDGBUWqSwKCs5CCswS2SeYLVMRfeg/BHe8wMzpTWx9svpXIRxh0CsaIH16/ Naq4aL0fogv15+j6DOS5sP3Bjc+wPn/CtkUPGtPpjXJ+5lOA3CNzXLGtskbnuc0Hok61 INdqmqWQ/gU1uDyXUf7whB6gSI/VefHAXnPNHKFHTCB0vt5SYaxrB4Ao7dlAwXD06LIl Lwx83vceJEp5R+b/KpQbnzeE5fX81iWhTXoAhQeYK+f3asQST4j1OPMHdH2b+9Nrvk8I yGBDHemtbCvzMxWv6xjwhe0ol6TXGIbYNSumQNZ4mO4AooOVOGX3KXuJ1X0G38tiBwdB sLcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=suCIfRMJJn/nZjwWN4ks+HCmO3JvO0ieMP2v3Tco4+c=; b=J6qCICGjgsp+lfoKpMLnvFUwppxgS71AohAIQt3AyPw74DkZWclp4BSV403tL0ceDf CCIK3aQb+I8+h5y3U/MuxheERbldSUPlPjBWFlspO29wMUu422xx+MRxtRKylwv5XZAf rY7V29XUiDEtRYIUNrgGqNEoRWBNpcI+RxcxNIgtkXcrYkxruudk/feg8hXWea+wS7R4 M6J+iNLCbQj0EwDCK0mRkelow5ZPwAMfiMbCkM7URZH9eFsOBfA4byA1fbhGucPd2mUl 0SCBt60tpsxc9G3lTbVE9a+fC+OphH4XClSpekUeL5ydSG8noNu+GX5YeAW7FZdcw8Vi SLwA== X-Gm-Message-State: AIVw1126wgR5tPNEZnuv5d2jknNx+I0iux/DDlVyTECvIG+fiI1r79T5 ns/Jy/raaKehtw== X-Received: by 10.99.66.130 with SMTP id p124mr1510520pga.53.1501835155908; Fri, 04 Aug 2017 01:25:55 -0700 (PDT) Received: from calancha-pc (170.224.128.101.dy.bbexcite.jp. [101.128.224.170]) by smtp.gmail.com with ESMTPSA id h81sm1862223pfj.72.2017.08.04.01.25.53 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 04 Aug 2017 01:25:54 -0700 (PDT) From: Tino Calancha References: <87o9rwxmfz.fsf@jidanni.org> Date: Fri, 04 Aug 2017 17:25:49 +0900 In-Reply-To: <87o9rwxmfz.fsf@jidanni.org> ("=?UTF-8?Q?=E7=A9=8D=E4=B8=B9=E5=B0=BC?= Dan Jacobson"'s message of "Fri, 04 Aug 2017 07:26:24 +0800") Message-ID: <87r2wrkacy.fsf@calancha-pc> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.5 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) =E7=A9=8D=E4=B8=B9=E5=B0=BC Dan Jacobson writes: > dired-do-flagged-delete and me interaction: > Recursively delete dcepc? (yes or no) yes > Recursively delete emmpc? (yes or no) yes > Recursively delete zpspc? (yes or no) yes > Recursively delete dgcpc? (yes or no) yes > > Wouldn't it be nice if there was instead: > Recursively delete dgcpc? (yes, no, all, quit) > > Yes, if before we started we set the variables we needn't be asked all > those questions. > > But now *midway* through the list, we decide we would like no more > question, there should be a way, without needing to quit and start over, > even if doing that isn't so bad. Thanks for the suggestion. You can already quit with '\C-g'. Concerning accept 'all' in the prompt, i am not sure: it's a bit dangerous operation. In the other hand: 1) Customize `dired-recursive-deletes' to value 'always. 2) Do the deletion. 3) Set back `dired-recursive-deletes' to its original value. It looks a little cumbersome. How about if `dired-do-delete' called interactively with 2 prefices performs recursive deletions? Eli? --8<-----------------------------cut here---------------start------------->= 8--- commit 9360866c364f75cac40dc6f91dce93f6a1071f43 Author: Tino Calancha Date: Fri Aug 4 17:21:29 2017 +0900 dired-do-delete: Delete dirs recursively if called w/ 2 prefices =20=20=20=20 * lisp/dired.el (dired-do-delete): Bind dired-recursive-deletes to 'always when called interactively with 2 prefices. (dired-internal-do-deletions): Show in the prompt if we are deleteing directories recursively. diff --git a/lisp/dired.el b/lisp/dired.el index 24759c6c9b..198968361f 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -3031,15 +3031,23 @@ dired-do-flagged-delete (defun dired-do-delete (&optional arg) "Delete all marked (or next ARG) files. `dired-recursive-deletes' controls whether deletion of -non-empty directories is allowed." +non-empty directories is allowed. + +Interactively with 2 prefices, delete recursively non-empty +directories without prompt user." ;; This is more consistent with the file marking feature than ;; dired-do-flagged-delete. (interactive "P") - (dired-internal-do-deletions - ;; this may move point if ARG is an integer - (dired-map-over-marks (cons (dired-get-filename) (point)) - arg) - arg t)) + (let ((dired-recursive-deletes + (pcase arg + ('(16) (setq arg nil) 'always) + (_ dired-recursive-deletes)))) + (message "dired-recursive-deletes %S" dired-recursive-deletes) + (dired-internal-do-deletions + ;; this may move point if ARG is an integer + (dired-map-over-marks (cons (dired-get-filename) (point)) + arg) + arg t))) =20 (defvar dired-deletion-confirmer 'yes-or-no-p) ; or y-or-n-p? =20 @@ -3055,13 +3063,15 @@ dired-internal-do-deletions (let* ((files (mapcar #'car l)) (count (length l)) (succ 0) + (recursive-del-p (eq dired-recursive-deletes 'always)) (trashing (and trash delete-by-moving-to-trash))) ;; canonicalize file list for pop up (setq files (nreverse (mapcar #'dired-make-relative files))) (if (dired-mark-pop-up " *Deletions*" 'delete files dired-deletion-confirmer - (format "%s %s " + (format "%s%s %s" (if trashing "Trash" "Delete") + (if recursive-del-p " recursively" "") (dired-mark-prompt arg files))) (save-excursion (let ((progress-reporter --8<-----------------------------cut here---------------end--------------->= 8--- In GNU Emacs 26.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.11) of 2017-08-04 Repository revision: db5d38ddb0de83d8f920b7a128fe3fd5156fdf85 From unknown Sun Jun 22 00:49:02 2025 X-Loop: help-debbugs@gnu.org Subject: bug#27940: Recursively delete dir34? (yes, no, all, quit) Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 04 Aug 2017 08:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27940 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Tino Calancha Cc: 27940@debbugs.gnu.org, jidanni@jidanni.org Reply-To: Eli Zaretskii Received: via spool by 27940-submit@debbugs.gnu.org id=B27940.1501835534991 (code B ref 27940); Fri, 04 Aug 2017 08:33:02 +0000 Received: (at 27940) by debbugs.gnu.org; 4 Aug 2017 08:32:14 +0000 Received: from localhost ([127.0.0.1]:40794 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ddY1m-0000Fu-FL for submit@debbugs.gnu.org; Fri, 04 Aug 2017 04:32:14 -0400 Received: from eggs.gnu.org ([208.118.235.92]:57349) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ddY1k-0000Fh-MZ for 27940@debbugs.gnu.org; Fri, 04 Aug 2017 04:32:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ddY1a-0000kr-UW for 27940@debbugs.gnu.org; Fri, 04 Aug 2017 04:32:07 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD, URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:54417) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ddY1a-0000kc-RP; Fri, 04 Aug 2017 04:32:02 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4257 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1ddY1a-0004MF-2a; Fri, 04 Aug 2017 04:32:02 -0400 Date: Fri, 04 Aug 2017 11:31:51 +0300 Message-Id: <83a83fybrc.fsf@gnu.org> From: Eli Zaretskii In-reply-to: <87r2wrkacy.fsf@calancha-pc> (message from Tino Calancha on Fri, 04 Aug 2017 17:25:49 +0900) References: <87o9rwxmfz.fsf@jidanni.org> <87r2wrkacy.fsf@calancha-pc> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: Tino Calancha > Cc: 27940@debbugs.gnu.org, Eli Zaretskii > Date: Fri, 04 Aug 2017 17:25:49 +0900 > > > dired-do-flagged-delete and me interaction: > > Recursively delete dcepc? (yes or no) yes > > Recursively delete emmpc? (yes or no) yes > > Recursively delete zpspc? (yes or no) yes > > Recursively delete dgcpc? (yes or no) yes > > > > Wouldn't it be nice if there was instead: > > Recursively delete dgcpc? (yes, no, all, quit) > > > > Yes, if before we started we set the variables we needn't be asked all > > those questions. > > > > But now *midway* through the list, we decide we would like no more > > question, there should be a way, without needing to quit and start over, > > even if doing that isn't so bad. > Thanks for the suggestion. > You can already quit with '\C-g'. > Concerning accept 'all' in the prompt, i am not sure: > it's a bit dangerous operation. > > In the other hand: > 1) Customize `dired-recursive-deletes' to value 'always. > 2) Do the deletion. > 3) Set back `dired-recursive-deletes' to its original value. Actually, I think the value he wants is 'top'. I don't object to accepting something like "!" to mean "all", I believe we already have a few features that do this, and the implementation should be simple, I think. (Creeping featurism, I know, but what else did you expect from users who have no real bugs to report? ;-) > How about if `dired-do-delete' called interactively with 2 prefices > performs recursive deletions? > Eli? Sounds too cumbersome to me. From unknown Sun Jun 22 00:49:02 2025 X-Loop: help-debbugs@gnu.org Subject: bug#27940: Recursively delete dir34? (yes, no, all, quit) Resent-From: Tino Calancha Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 04 Aug 2017 09:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27940 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 27940@debbugs.gnu.org, jidanni@jidanni.org Received: via spool by 27940-submit@debbugs.gnu.org id=B27940.15018389936183 (code B ref 27940); Fri, 04 Aug 2017 09:30:02 +0000 Received: (at 27940) by debbugs.gnu.org; 4 Aug 2017 09:29:53 +0000 Received: from localhost ([127.0.0.1]:40887 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ddYvZ-0001bf-Ct for submit@debbugs.gnu.org; Fri, 04 Aug 2017 05:29:53 -0400 Received: from mail-pg0-f54.google.com ([74.125.83.54]:38493) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ddYvX-0001bS-8D for 27940@debbugs.gnu.org; Fri, 04 Aug 2017 05:29:51 -0400 Received: by mail-pg0-f54.google.com with SMTP id l64so5770503pge.5 for <27940@debbugs.gnu.org>; Fri, 04 Aug 2017 02:29:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=MMPiAffJGkOHJ5wxCsyNmlF9yGcYQ2a0338WyaKIzvw=; b=fTb/fmy09sWwQkwqMWTtAf2zIzUVUscqsGH8ICG6DLK2F6Cvg5Gg33e7dFzNWtRYSG iv7mqA1i+qFZzQpeQh0GFIpSyTyCGiqtYdxmpV/i95J6aqw63IUcp8rN5mm4agoE7Uwz yGPYIGc4qigE0RIBONJNd8ZlMrJZlKE4K2l/Tl1a05mrxGbWcVQ9XtQ785Zv97o+CVkQ /TZUrGVLHFLf8NpkCEpy0LM7ypGfNTJISaM5A2ceB+xjyGB4DTxs15EB8HZuVM7z8FMR 5RTGBLe7fxu/JdFyJxXFvtyejZnmcutNGxq8RuDpScQjWZBVU5ZoE0KKAWRzEioN+jGN SeqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=MMPiAffJGkOHJ5wxCsyNmlF9yGcYQ2a0338WyaKIzvw=; b=WlNpe5x45cmbhsEBIV7fTvjIdI5VdCsFJwCjfxaJvBLJP/shggfTwjzwzj8B/9bnLv W4+g+zYnSQ09MKt4wZvJjGjgYbZwNqYKU3f+IQo7r+WiKpC/VdyIcGdQfHRq/lO4YINF 9l2ul6ezLE25XT41wsdCy0GLDX1kx4M2ZZM3Mle+FPpNTMoxamEZhBg+nSB8HYlfnliV PETjXq+iOE6rNR4NTkpnIu0ECaC3dIR3o3qzn5gNjPlwH51KF9ac90ugFquDjDy6U6kd NC4flnR5rrLFPKvavSFtp7qBWuzYifsIBDmtW2iSbWr5BiC7mgWWoACr9rVOZ+CmMsED ZF2g== X-Gm-Message-State: AIVw1139X0qPXZQEEOgn9Wqnwb/EQrq69t30S7L5216vVvAFo5Fr6jm7 SAhBSrQ/fH1t8Q== X-Received: by 10.84.215.205 with SMTP id g13mr2045183plj.8.1501838985127; Fri, 04 Aug 2017 02:29:45 -0700 (PDT) Received: from calancha-pc (170.224.128.101.dy.bbexcite.jp. [101.128.224.170]) by smtp.gmail.com with ESMTPSA id t8sm1682586pgq.68.2017.08.04.02.29.43 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 04 Aug 2017 02:29:44 -0700 (PDT) From: Tino Calancha References: <87o9rwxmfz.fsf@jidanni.org> <87r2wrkacy.fsf@calancha-pc> <83a83fybrc.fsf@gnu.org> Date: Fri, 04 Aug 2017 18:29:41 +0900 In-Reply-To: <83a83fybrc.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 04 Aug 2017 11:31:51 +0300") Message-ID: <87vam365q2.fsf@calancha-pc> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Eli Zaretskii writes: >> From: Tino Calancha >> Cc: 27940@debbugs.gnu.org, Eli Zaretskii >> Date: Fri, 04 Aug 2017 17:25:49 +0900 >> >> > dired-do-flagged-delete and me interaction: >> > Recursively delete dcepc? (yes or no) yes >> > Recursively delete emmpc? (yes or no) yes >> > Recursively delete zpspc? (yes or no) yes >> > Recursively delete dgcpc? (yes or no) yes >> > >> > Wouldn't it be nice if there was instead: >> > Recursively delete dgcpc? (yes, no, all, quit) >> > >> > Yes, if before we started we set the variables we needn't be asked all >> > those questions. >> > >> > But now *midway* through the list, we decide we would like no more >> > question, there should be a way, without needing to quit and start over, >> > even if doing that isn't so bad. >> Thanks for the suggestion. >> You can already quit with '\C-g'. >> Concerning accept 'all' in the prompt, i am not sure: >> it's a bit dangerous operation. >> >> In the other hand: >> 1) Customize `dired-recursive-deletes' to value 'always. >> 2) Do the deletion. >> 3) Set back `dired-recursive-deletes' to its original value. > > Actually, I think the value he wants is 'top'. The he would be prompted the 34 times all over. I think the OP wants 'always (like Bon Jovi). > I don't object to accepting something like "!" to mean "all", I > believe we already have a few features that do this, and the > implementation should be simple, I think. (Creeping featurism, I > know, but what else did you expect from users who have no real bugs to > report? ;-) > >> How about if `dired-do-delete' called interactively with 2 prefices >> performs recursive deletions? >> Eli? > > Sounds too cumbersome to me. Updated patch. Now it accepts answers: y, n, !, q (as the OP suggested) --8<-----------------------------cut here---------------start------------->8--- commit 90e4eb9fa1b708bab87844160371ec9ce439ab91 Author: Tino Calancha Date: Fri Aug 4 18:17:51 2017 +0900 dired-do-delete: Allow to delete dirs recursively * lisp/dired.el (dired-delete-file): Accept 2 additional answers: '!', to delete all directories recursively and no prompt anymore. 'q', to cancel the directry deletions (Bug#27940). (dired-do-flagged-delete): Bind locally dired-recursive-deletes so that we can overwrite its global value. Wrapp the loop within a catch '--delete-cancel to catch when the user abort the directtry deletion. diff --git a/lisp/dired.el b/lisp/dired.el index 24759c6c9b..278acc2cf5 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -2990,23 +2990,33 @@ dired-delete-file TRASH non-nil means to trash the file instead of deleting, provided `delete-by-moving-to-trash' (which see) is non-nil." - ;; This test is equivalent to - ;; (and (file-directory-p fn) (not (file-symlink-p fn))) - ;; but more efficient - (if (not (eq t (car (file-attributes file)))) - (delete-file file trash) - (if (and recursive - (directory-files file t dired-re-no-dot) ; Not empty. - (or (eq recursive 'always) - (yes-or-no-p (format "Recursively %s %s? " - (if (and trash - delete-by-moving-to-trash) - "trash" - "delete") - (dired-make-relative file))))) - (if (eq recursive 'top) (setq recursive 'always)) ; Don't ask again. - (setq recursive nil)) - (delete-directory file recursive trash))) + ;; This test is equivalent to + ;; (and (file-directory-p fn) (not (file-symlink-p fn))) + ;; but more efficient + (if (not (eq t (car (file-attributes file)))) + (delete-file file trash) + (let* ((valid-answers (list "y" "n" "!" "q")) + (answer "") + (input-fn (lambda () + (setq answer + (completing-read (format "Recursively %s %s? [y, n, !, q] " + (if (and trash + delete-by-moving-to-trash) + "trash" + "delete") + (dired-make-relative file)) + valid-answers nil t))))) + (if (and recursive + (directory-files file t dired-re-no-dot) ; Not empty. + (eq recursive 'always)) + (if (eq recursive 'top) (setq recursive 'always)) ; Don't ask again. + ;; Otherwise prompt user: + (while (string= "" answer) (funcall input-fn)) + (pcase answer + ('"!" (setq recursive 'always dired-recursive-deletes recursive)) + ('"y" (if (eq recursive 'top) (setq recursive 'always))) + ('"q" (keyboard-quit)))) + (delete-directory file recursive trash)))) (defun dired-do-flagged-delete (&optional nomessage) "In Dired, delete the files flagged for deletion. @@ -3055,6 +3065,9 @@ dired-internal-do-deletions (let* ((files (mapcar #'car l)) (count (length l)) (succ 0) + ;; Bind `dired-recursive-deletes' so that we can change it + ;; locally according with the user answer within `dired-delete-file'. + (dired-recursive-deletes dired-recursive-deletes) (trashing (and trash delete-by-moving-to-trash))) ;; canonicalize file list for pop up (setq files (nreverse (mapcar #'dired-make-relative files))) @@ -3064,6 +3077,7 @@ dired-internal-do-deletions (if trashing "Trash" "Delete") (dired-mark-prompt arg files))) (save-excursion + (catch '--delete-cancel (let ((progress-reporter (make-progress-reporter (if trashing "Trashing..." "Deleting...") @@ -3081,6 +3095,7 @@ dired-internal-do-deletions (dired-fun-in-all-buffers (file-name-directory fn) (file-name-nondirectory fn) #'dired-delete-entry fn)) + (quit (throw '--delete-cancel (message "OK, canceled"))) (error ;; catch errors from failed deletions (dired-log "%s\n" err) (setq failures (cons (car (car l)) failures))))) @@ -3091,7 +3106,7 @@ dired-internal-do-deletions (format "%d of %d deletion%s failed" (length failures) count (dired-plural-s count)) - failures)))) + failures))))) (message "(No deletions performed)"))) (dired-move-to-filename)) --8<-----------------------------cut here---------------end--------------->8--- In GNU Emacs 26.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.11) of 2017-08-04 Repository revision: db5d38ddb0de83d8f920b7a128fe3fd5156fdf85 From unknown Sun Jun 22 00:49:02 2025 X-Loop: help-debbugs@gnu.org Subject: bug#27940: Recursively delete dir34? (yes, no, all, quit) Resent-From: Tino Calancha Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 04 Aug 2017 09:38:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27940 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 27940@debbugs.gnu.org, jidanni@jidanni.org Received: via spool by 27940-submit@debbugs.gnu.org id=B27940.15018394486881 (code B ref 27940); Fri, 04 Aug 2017 09:38:02 +0000 Received: (at 27940) by debbugs.gnu.org; 4 Aug 2017 09:37:28 +0000 Received: from localhost ([127.0.0.1]:40891 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ddZ2u-0001mv-BO for submit@debbugs.gnu.org; Fri, 04 Aug 2017 05:37:28 -0400 Received: from mail-pg0-f65.google.com ([74.125.83.65]:33736) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ddZ2t-0001mi-33 for 27940@debbugs.gnu.org; Fri, 04 Aug 2017 05:37:27 -0400 Received: by mail-pg0-f65.google.com with SMTP id u185so1338637pgb.0 for <27940@debbugs.gnu.org>; Fri, 04 Aug 2017 02:37:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=rrlyHKLKvZ0UsfAxQA6lpwhmD3GEhkgd/2xCUCvhLeo=; b=WSs782ae0BdxmSgxINdT3ik0u0MClCjAnoL4yU/h+HMGY+Zdbd07usSCrlsAjD4qgm XenHhDeoWqcZBGEsY6cRLzz21NpRFFL5TpovmGGsmaUaSk+JoTDaztMZl81SDrVEbF8h CXiK2moEhIJMczQpHITE+qjqayMsvEjOXLnpPSYwXQOEbuAM/TEDXndm+h++mTXBkypX k1muZU8UK/j2tx3iQMQdRPV1rHHgpYUaWLc2K8fLUdngKlBR7Ht+IbQO3FihHHyi6+4B 5eBX7x2YFeLZ7gYYSeSQNUQ63zW9oM1mcX0+JlCKlkHyMA7x9jlQdXGgpy7oRZHeb5OD gohA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=rrlyHKLKvZ0UsfAxQA6lpwhmD3GEhkgd/2xCUCvhLeo=; b=F43jIDL4Ij51n4EUkiH8+zkmsw7SA5QnOIoO7KwfB69MAUZja7QgVU9mX35jMLJOWs UVujYuQjBlpL9171oF+REkm2vOVncLjDZ46D/cDsJywnj3ZDX9TpLl7/f5b9kez3+MkF JG7Yxm2yFqcrz4dl1DdSnWhrhC0bxHkdblu0QcdlayZswG9bUxcypCgctG9IpACY6X6+ UPFiKNZi5p3bDHjqpQ/M7Bopn3YfP36d2CirMAiBAOd5biH0xKUYIjhj3xcGePQwuzeO yXbMSC2aFdvZSVT9O9JXKk+a7Avcx28SC1aWN4fgwuFHGjnwXkuzTeNKXM6u0K84qzFt WaxQ== X-Gm-Message-State: AIVw110B2cCy1Gm4zsaiBa8RdVpoHGxy2dAu4gCzm3YV6RMoH6u8iQb/ 5rl4h0lhWRQ4lg== X-Received: by 10.99.113.92 with SMTP id b28mr1624713pgn.433.1501839441332; Fri, 04 Aug 2017 02:37:21 -0700 (PDT) Received: from calancha-pc (170.224.128.101.dy.bbexcite.jp. [101.128.224.170]) by smtp.gmail.com with ESMTPSA id b6sm3790298pgn.67.2017.08.04.02.37.19 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 04 Aug 2017 02:37:20 -0700 (PDT) From: Tino Calancha References: <87o9rwxmfz.fsf@jidanni.org> <87r2wrkacy.fsf@calancha-pc> <83a83fybrc.fsf@gnu.org> <87vam365q2.fsf@calancha-pc> Date: Fri, 04 Aug 2017 18:37:18 +0900 In-Reply-To: <87vam365q2.fsf@calancha-pc> (Tino Calancha's message of "Fri, 04 Aug 2017 18:29:41 +0900") Message-ID: <87r2wr65dd.fsf@calancha-pc> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.5 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) Tino Calancha writes: > + ;; Otherwise prompt user: > + (while (string= "" answer) (funcall input-fn)) > + (pcase answer > + ('"!" (setq recursive 'always dired-recursive-deletes recursive)) > + ('"y" (if (eq recursive 'top) (setq recursive 'always))) > + ('"q" (keyboard-quit)))) > + (delete-directory file recursive trash)))) Upps, i forgot the 'n' case: @@ -3015,6 +3015,7 @@ dired-delete-file (pcase answer ('"!" (setq recursive 'always dired-recursive-deletes recursive)) ('"y" (if (eq recursive 'top) (setq recursive 'always))) + ('"n" (setq recursive nil)) ('"q" (keyboard-quit)))) (delete-directory file recursive trash)))) From unknown Sun Jun 22 00:49:02 2025 X-Loop: help-debbugs@gnu.org Subject: bug#27940: Recursively delete dir34? (yes, no, all, quit) Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 04 Aug 2017 12:53:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27940 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Tino Calancha Cc: 27940@debbugs.gnu.org, jidanni@jidanni.org Reply-To: Eli Zaretskii Received: via spool by 27940-submit@debbugs.gnu.org id=B27940.150185115931151 (code B ref 27940); Fri, 04 Aug 2017 12:53:01 +0000 Received: (at 27940) by debbugs.gnu.org; 4 Aug 2017 12:52:39 +0000 Received: from localhost ([127.0.0.1]:41002 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ddc5m-00086M-RE for submit@debbugs.gnu.org; Fri, 04 Aug 2017 08:52:39 -0400 Received: from eggs.gnu.org ([208.118.235.92]:41139) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ddc5l-00086B-Oc for 27940@debbugs.gnu.org; Fri, 04 Aug 2017 08:52:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ddc4c-0002G7-NR for 27940@debbugs.gnu.org; Fri, 04 Aug 2017 08:52:32 -0400 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:46380) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ddc01-0002nY-LB; Fri, 04 Aug 2017 08:46:41 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4490 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1ddc00-0005H2-Pw; Fri, 04 Aug 2017 08:46:41 -0400 Date: Fri, 04 Aug 2017 15:46:28 +0300 Message-Id: <834ltnxzyz.fsf@gnu.org> From: Eli Zaretskii In-reply-to: <87vam365q2.fsf@calancha-pc> (message from Tino Calancha on Fri, 04 Aug 2017 18:29:41 +0900) References: <87o9rwxmfz.fsf@jidanni.org> <87r2wrkacy.fsf@calancha-pc> <83a83fybrc.fsf@gnu.org> <87vam365q2.fsf@calancha-pc> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: Tino Calancha > Cc: 27940@debbugs.gnu.org, jidanni@jidanni.org > Date: Fri, 04 Aug 2017 18:29:41 +0900 > > index 24759c6c9b..278acc2cf5 100644 > --- a/lisp/dired.el > +++ b/lisp/dired.el > @@ -2990,23 +2990,33 @@ dired-delete-file > > TRASH non-nil means to trash the file instead of deleting, provided > `delete-by-moving-to-trash' (which see) is non-nil." > - ;; This test is equivalent to > - ;; (and (file-directory-p fn) (not (file-symlink-p fn))) > - ;; but more efficient > - (if (not (eq t (car (file-attributes file)))) > - (delete-file file trash) > - (if (and recursive > - (directory-files file t dired-re-no-dot) ; Not empty. > - (or (eq recursive 'always) > - (yes-or-no-p (format "Recursively %s %s? " > - (if (and trash > - delete-by-moving-to-trash) > - "trash" > - "delete") > - (dired-make-relative file))))) > - (if (eq recursive 'top) (setq recursive 'always)) ; Don't ask again. > - (setq recursive nil)) > - (delete-directory file recursive trash))) > + ;; This test is equivalent to > + ;; (and (file-directory-p fn) (not (file-symlink-p fn))) > + ;; but more efficient > + (if (not (eq t (car (file-attributes file)))) > + (delete-file file trash) > + (let* ((valid-answers (list "y" "n" "!" "q")) Shouldn't the valid-answers be "yes" and "no", not "y" and "n", for backward compatibility? > + (completing-read (format "Recursively %s %s? [y, n, !, q] " Maybe the "!" and "q" parts should be explained? Or maybe just use "yes", "no", "all", and "quite", which are self-explanatory? This warrants a NEWS entry, I think. I also wonder whether we should describe this in the user manual, under "Dired Deletion". Than ks. From unknown Sun Jun 22 00:49:02 2025 X-Loop: help-debbugs@gnu.org Subject: bug#27940: Recursively delete dir34? (yes, no, all, quit) Resent-From: Tino Calancha Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 04 Aug 2017 14:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27940 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 27940@debbugs.gnu.org, jidanni@jidanni.org Received: via spool by 27940-submit@debbugs.gnu.org id=B27940.15018572458795 (code B ref 27940); Fri, 04 Aug 2017 14:35:02 +0000 Received: (at 27940) by debbugs.gnu.org; 4 Aug 2017 14:34:05 +0000 Received: from localhost ([127.0.0.1]:41920 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dddfw-0002Hl-Hf for submit@debbugs.gnu.org; Fri, 04 Aug 2017 10:34:04 -0400 Received: from mail-pg0-f45.google.com ([74.125.83.45]:36008) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dddfv-0002HH-0N for 27940@debbugs.gnu.org; Fri, 04 Aug 2017 10:34:03 -0400 Received: by mail-pg0-f45.google.com with SMTP id v77so8754531pgb.3 for <27940@debbugs.gnu.org>; Fri, 04 Aug 2017 07:34:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=zEf3I+Ndh1HkBzO5qQlH1WZBj2NlHeSaG02N/ZBp8eM=; b=l9aF+w/pU/8MQtnwNeEDEfbbW/0BGJS58IDVnoSNEAvyYaFjc0BcHb6VsGdeT+FmfU SeTNFe/Uj3S1JWJPi9UKG491gV41TSzN7wk9JQ8WrGtLYwXcj7MyGDt1o0oa4+R0yYWs PGuQeFBTtlH2a+fkvcA673brMnYd7lLMzL4MH/94d67D8b6BVt2Wk9aQpRdpjXngUJBn j9UbRLZlrCJYXUfhT6Z+j/HDeGNdcO3W3oIACq+pXIlMZO3cb08EC/sWc4iZWkH6l/lr 5ksXtODEAukZe8/FGfD8FkfMJ23Savqsxnf+Te2JTYYc6mmNBwkjIwCCIr7AObPddZLd DjAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=zEf3I+Ndh1HkBzO5qQlH1WZBj2NlHeSaG02N/ZBp8eM=; b=Gzfo1NcObo9PNxqEtvPou30KpzXbfnEcOAUQXmqgP0gOymJMd9Hn0RgPT1kCcwfp0P QgS2o6JDv6e2HWNfks4O44A+r6KPvedwLmVMDl9mhpZmCF1hLRDNMGfm/cWrkI3rorAe x+N6b2AbNSYpvE1ysD/PjTlQr1fimXm2WDQw9MZRiAVwqShODj23GqzMgU8Ym25MvBWB 2dnpMDLGjIhtjW8LeO9DRuv9sbe0FGaGkEoujznNGeL+6RuNaaKKbo8SDzmymIttxuIu X0Ku/ED1FvsbvaLnH5C4UoD4r/FtlVHpXAyTHhD/v8AcQWVsUkEDaolEwMGxEwPaRmGO dHKQ== X-Gm-Message-State: AIVw110WZNXsIt2pyngkecbagr/YtzgJw5zteUA2HV0LCP/9WCsG6925 NLoJWxFgjd9Vag== X-Received: by 10.99.114.20 with SMTP id n20mr2506659pgc.451.1501857236810; Fri, 04 Aug 2017 07:33:56 -0700 (PDT) Received: from calancha-pc (170.224.128.101.dy.bbexcite.jp. [101.128.224.170]) by smtp.gmail.com with ESMTPSA id 133sm4272382pgc.19.2017.08.04.07.33.54 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 04 Aug 2017 07:33:56 -0700 (PDT) From: Tino Calancha References: <87o9rwxmfz.fsf@jidanni.org> <87r2wrkacy.fsf@calancha-pc> <83a83fybrc.fsf@gnu.org> <87vam365q2.fsf@calancha-pc> <834ltnxzyz.fsf@gnu.org> Date: Fri, 04 Aug 2017 23:33:51 +0900 In-Reply-To: <834ltnxzyz.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 04 Aug 2017 15:46:28 +0300") Message-ID: <871sorz9kg.fsf@calancha-pc> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.5 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) Eli Zaretskii writes: > Shouldn't the valid-answers be "yes" and "no", not "y" and "n", for > backward compatibility? Yes, they should. > >> + (completing-read (format "Recursively %s %s? [y, n, !, q] " > > Maybe the "!" and "q" parts should be explained? Or maybe just use > "yes", "no", "all", and "quite", which are self-explanatory? Look the updated patch; it's a mix: 1. uses 'yes', 'no' 2. '!', 'q', 'help' This is similar like `query-replace' does (there is used '!', 'q', and '?'). With 'help', a Help buffer is shown with a help message. > > This warrants a NEWS entry, I think. I also wonder whether we should > describe this in the user manual, under "Dired Deletion". I did. --8<-----------------------------cut here---------------start------------->8--- commit a883db5e05364bd7a76138642d39b296266ff0a1 Author: Tino Calancha Date: Fri Aug 4 23:26:30 2017 +0900 dired-do-delete: Allow to delete dirs recursively without prompts * lisp/dired.el (dired-delete-file): Accept 2 additional answers: '!', to delete all directories recursively and no prompt anymore. 'q', to cancel the directory deletions (Bug#27940). Show help message when user inputs 'help'. (dired-do-flagged-delete): Bind locally dired-recursive-deletes so that we can overwrite its global value. Wrapp the loop within a catch '--delete-cancel to catch when the user abort the directtry deletion. * doc/emacs/dired.texi (Dired Deletion): Update manual. * etc/NEWS (Changes in Specialized Modes and Packages in Emacs 26.1): Announce this change. diff --git a/doc/emacs/dired.texi b/doc/emacs/dired.texi index 150ac8427a..5eb066d927 100644 --- a/doc/emacs/dired.texi +++ b/doc/emacs/dired.texi @@ -236,6 +236,14 @@ Dired Deletion @code{dired-recursive-deletes} is non-@code{nil}, then Dired can delete nonempty directories including all their contents. That can be somewhat risky. +Even if you have set @code{dired-recursive-deletes} to @code{nil}, +you might want sometimes to delete recursively directories +without being asked for confirmation for all of them. This is handy +when you have marked many directories for deletion and you are very +sure that all of them can safely being deleted. For every nonempty +directory you are asked for confirmation; if you answer @code{!}, +then all the remaining directories will be deleted without more +questions. @vindex delete-by-moving-to-trash If you change the variable @code{delete-by-moving-to-trash} to diff --git a/etc/NEWS b/etc/NEWS index b72793dec0..dcac7d5e41 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -611,6 +611,10 @@ paragraphs, for the purposes of bidirectional display. ** Dired +++ +*** You can answer '!' in 'dired-do-delete' to delete recursively all +remaining directories without more prompts. + ++++ *** Dired supports wildcards in the directory part of the file names. +++ diff --git a/lisp/dired.el b/lisp/dired.el index 24759c6c9b..133fd2e719 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -2975,6 +2975,14 @@ dired-recursive-deletes ;; Match anything but `.' and `..'. (defvar dired-re-no-dot "^\\([^.]\\|\\.\\([^.]\\|\\..\\)\\).*") +(defconst dired-delete-help + "Type: +`yes' to delete recursively the current directory, +`no' to skip to next, +`!' to delete all remaining directories with no more questions, +`q' to exit, +`help' to show this help message.") + ;; Delete file, possibly delete a directory and all its files. ;; This function is useful outside of dired. One could change its name ;; to e.g. recursive-delete-file and put it somewhere else. @@ -2990,23 +2998,40 @@ dired-delete-file TRASH non-nil means to trash the file instead of deleting, provided `delete-by-moving-to-trash' (which see) is non-nil." - ;; This test is equivalent to - ;; (and (file-directory-p fn) (not (file-symlink-p fn))) - ;; but more efficient - (if (not (eq t (car (file-attributes file)))) - (delete-file file trash) - (if (and recursive - (directory-files file t dired-re-no-dot) ; Not empty. - (or (eq recursive 'always) - (yes-or-no-p (format "Recursively %s %s? " - (if (and trash - delete-by-moving-to-trash) - "trash" - "delete") - (dired-make-relative file))))) - (if (eq recursive 'top) (setq recursive 'always)) ; Don't ask again. - (setq recursive nil)) - (delete-directory file recursive trash))) + ;; This test is equivalent to + ;; (and (file-directory-p fn) (not (file-symlink-p fn))) + ;; but more efficient + (if (not (eq t (car (file-attributes file)))) + (delete-file file trash) + (let* ((valid-answers (list "yes" "no" "!" "q" "help")) + (answer "") + (input-fn (lambda () + (setq answer + (completing-read + (format "Recursively %s %s? [yes, no, !, q, help] " + (if (and trash + delete-by-moving-to-trash) + "trash" + "delete") + (dired-make-relative file)) + valid-answers nil t)) + (when (string= answer "help") + (setq answer "") + (with-help-window "*Help*" + (with-current-buffer "*Help*" (insert dired-delete-help)))) + answer))) + (if (and recursive + (directory-files file t dired-re-no-dot) ; Not empty. + (eq recursive 'always)) + (if (eq recursive 'top) (setq recursive 'always)) ; Don't ask again. + ;; Otherwise prompt user: + (while (string= "" answer) (funcall input-fn)) + (pcase answer + ('"!" (setq recursive 'always dired-recursive-deletes recursive)) + ('"yes" (if (eq recursive 'top) (setq recursive 'always))) + ('"no" (setq recursive nil)) + ('"q" (keyboard-quit)))) + (delete-directory file recursive trash)))) (defun dired-do-flagged-delete (&optional nomessage) "In Dired, delete the files flagged for deletion. @@ -3055,6 +3080,9 @@ dired-internal-do-deletions (let* ((files (mapcar #'car l)) (count (length l)) (succ 0) + ;; Bind `dired-recursive-deletes' so that we can change it + ;; locally according with the user answer within `dired-delete-file'. + (dired-recursive-deletes dired-recursive-deletes) (trashing (and trash delete-by-moving-to-trash))) ;; canonicalize file list for pop up (setq files (nreverse (mapcar #'dired-make-relative files))) @@ -3064,6 +3092,7 @@ dired-internal-do-deletions (if trashing "Trash" "Delete") (dired-mark-prompt arg files))) (save-excursion + (catch '--delete-cancel (let ((progress-reporter (make-progress-reporter (if trashing "Trashing..." "Deleting...") @@ -3081,6 +3110,7 @@ dired-internal-do-deletions (dired-fun-in-all-buffers (file-name-directory fn) (file-name-nondirectory fn) #'dired-delete-entry fn)) + (quit (throw '--delete-cancel (message "OK, canceled"))) (error ;; catch errors from failed deletions (dired-log "%s\n" err) (setq failures (cons (car (car l)) failures))))) @@ -3091,8 +3121,7 @@ dired-internal-do-deletions (format "%d of %d deletion%s failed" (length failures) count (dired-plural-s count)) - failures)))) + failures))))) (message "(No deletions performed)"))) (dired-move-to-filename)) --8<-----------------------------cut here---------------end--------------->8--- In GNU Emacs 26.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.11) of 2017-08-04 Repository revision: d32d8d0ceaa05939bbf56a246707aed05a53385c From unknown Sun Jun 22 00:49:02 2025 X-Loop: help-debbugs@gnu.org Subject: bug#27940: Recursively delete dir34? (yes, no, all, quit) Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 04 Aug 2017 14:55:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27940 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Tino Calancha Cc: 27940@debbugs.gnu.org, jidanni@jidanni.org Reply-To: Eli Zaretskii Received: via spool by 27940-submit@debbugs.gnu.org id=B27940.150185847710502 (code B ref 27940); Fri, 04 Aug 2017 14:55:01 +0000 Received: (at 27940) by debbugs.gnu.org; 4 Aug 2017 14:54:37 +0000 Received: from localhost ([127.0.0.1]:41939 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dddzp-0002jK-Ez for submit@debbugs.gnu.org; Fri, 04 Aug 2017 10:54:37 -0400 Received: from eggs.gnu.org ([208.118.235.92]:45970) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dddzn-0002j4-Ce for 27940@debbugs.gnu.org; Fri, 04 Aug 2017 10:54:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dddzh-0005OT-F6 for 27940@debbugs.gnu.org; Fri, 04 Aug 2017 10:54:30 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD, URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:53647) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dddzb-0004cA-06; Fri, 04 Aug 2017 10:54:23 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4610 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dddza-0004pu-3e; Fri, 04 Aug 2017 10:54:22 -0400 Date: Fri, 04 Aug 2017 17:54:10 +0300 Message-Id: <83tw1nwfhp.fsf@gnu.org> From: Eli Zaretskii In-reply-to: <871sorz9kg.fsf@calancha-pc> (message from Tino Calancha on Fri, 04 Aug 2017 23:33:51 +0900) References: <87o9rwxmfz.fsf@jidanni.org> <87r2wrkacy.fsf@calancha-pc> <83a83fybrc.fsf@gnu.org> <87vam365q2.fsf@calancha-pc> <834ltnxzyz.fsf@gnu.org> <871sorz9kg.fsf@calancha-pc> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: Tino Calancha > Cc: 27940@debbugs.gnu.org, jidanni@jidanni.org > Date: Fri, 04 Aug 2017 23:33:51 +0900 > > Eli Zaretskii writes: > > > > Shouldn't the valid-answers be "yes" and "no", not "y" and "n", for > > backward compatibility? > Yes, they should. > > > >> + (completing-read (format "Recursively %s %s? [y, n, !, q] " > > > > Maybe the "!" and "q" parts should be explained? Or maybe just use > > "yes", "no", "all", and "quite", which are self-explanatory? > Look the updated patch; it's a mix: > 1. uses 'yes', 'no' > 2. '!', 'q', 'help' > This is similar like `query-replace' does (there is used '!', 'q', and > '?'). With 'help', a Help buffer is shown with a help message. > > > > > This warrants a NEWS entry, I think. I also wonder whether we should > > describe this in the user manual, under "Dired Deletion". > I did. Thanks, LGTM. From unknown Sun Jun 22 00:49:02 2025 X-Loop: help-debbugs@gnu.org Subject: bug#27940: Recursively delete dir34? (yes, no, all, quit) Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 04 Aug 2017 15:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27940 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii , Tino Calancha Cc: 27940@debbugs.gnu.org, jidanni@jidanni.org Received: via spool by 27940-submit@debbugs.gnu.org id=B27940.150186191415582 (code B ref 27940); Fri, 04 Aug 2017 15:52:02 +0000 Received: (at 27940) by debbugs.gnu.org; 4 Aug 2017 15:51:54 +0000 Received: from localhost ([127.0.0.1]:41975 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ddetF-00043G-UA for submit@debbugs.gnu.org; Fri, 04 Aug 2017 11:51:54 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:20310) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ddetD-000432-EK for 27940@debbugs.gnu.org; Fri, 04 Aug 2017 11:51:51 -0400 Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id v74FpidN000730 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 4 Aug 2017 15:51:44 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id v74FpiTh008871 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 4 Aug 2017 15:51:44 GMT Received: from abhmp0012.oracle.com (abhmp0012.oracle.com [141.146.116.18]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id v74Fphn8020558; Fri, 4 Aug 2017 15:51:43 GMT MIME-Version: 1.0 Message-ID: <4ad9397b-7771-4914-85a3-9dd0e998fa0c@default> Date: Fri, 4 Aug 2017 08:51:42 -0700 (PDT) From: Drew Adams References: <<87o9rwxmfz.fsf@jidanni.org>> <<87r2wrkacy.fsf@calancha-pc> <83a83fybrc.fsf@gnu.org>> <<87vam365q2.fsf@calancha-pc> <834ltnxzyz.fsf@gnu.org>> <<871sorz9kg.fsf@calancha-pc>> <<83tw1nwfhp.fsf@gnu.org>> In-Reply-To: <<83tw1nwfhp.fsf@gnu.org>> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 12.0.6770.5000 (x86)] Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Source-IP: aserv0021.oracle.com [141.146.126.233] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) > > > Shouldn't the valid-answers be "yes" and "no", not "y" and "n", for > > > backward compatibility? > > Yes, they should. > > > Maybe the "!" and "q" parts should be explained? Or maybe just use > > > "yes", "no", "all", and "quite", which are self-explanatory? > > Look the updated patch; it's a mix: > > 1. uses 'yes', 'no' > > 2. '!', 'q', 'help' > > This is similar like `query-replace' does (there is used '!', 'q', an= d > > '?'). With 'help', a Help buffer is shown with a help message. I haven't been following this thread, so apologies if I misunderstand. Is it a good idea to mix `yes-or-no-p'-style (minibuffer) input, such as `yes' and `no', with `read-char'-style input, such as `!' and `q'? I don't think so, a priori. Especially for `!', which has worse repercussions in case of a mistake than does `y'. No? From unknown Sun Jun 22 00:49:02 2025 X-Loop: help-debbugs@gnu.org Subject: bug#27940: Recursively delete dir34? (yes, no, all, quit) Resent-From: Tino Calancha Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 04 Aug 2017 16:19:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27940 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Drew Adams Cc: 27940@debbugs.gnu.org, Eli Zaretskii , jidanni@jidanni.org, Tino Calancha Received: via spool by 27940-submit@debbugs.gnu.org id=B27940.150186349217883 (code B ref 27940); Fri, 04 Aug 2017 16:19:02 +0000 Received: (at 27940) by debbugs.gnu.org; 4 Aug 2017 16:18:12 +0000 Received: from localhost ([127.0.0.1]:41987 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ddfIi-0004eN-Fg for submit@debbugs.gnu.org; Fri, 04 Aug 2017 12:18:12 -0400 Received: from mail-pg0-f49.google.com ([74.125.83.49]:36088) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ddfIh-0004dy-Dv for 27940@debbugs.gnu.org; Fri, 04 Aug 2017 12:18:11 -0400 Received: by mail-pg0-f49.google.com with SMTP id v77so9796367pgb.3 for <27940@debbugs.gnu.org>; Fri, 04 Aug 2017 09:18:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:date:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=3DV2Dce08OpJ9iR1Uz16hQjTPwprGrRDfgx+2M9IvXo=; b=QZXe/A8FWAjEj8w/UkqFcHSfkvVVYHlLgOxgC32KvGbr9Ya8njn5T0gvWVT7MHnZG9 lisWYW1JpjohjUhZcBFLtem8VRujn8qP3dVz29Q9OBiEz4dyVFkxXhax+CJeW7zsDThZ i2creqTsSn2PQLkUuvUKGTwpWT9pJ7/Vnnkvs4h0qWCEKSx1BRq75AFyeCVg2fCN+/ua c3EZ3Mw5E2I4C2Av3r1DzG8ioX0uS++GyESiXKhdJ7IPjcLizCHg0w/5ttz+TpufjJa4 oyv+jsJSnScQ+D/6zeYkA1QpG8SDVYFJKoKHEKYOSY0pStg5zCIG7tagVu9KBqiQ/VEL 8eBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=3DV2Dce08OpJ9iR1Uz16hQjTPwprGrRDfgx+2M9IvXo=; b=FQefHGfbqQVXl6YRmmaw+1fed1jVkCUwvgFbSoE0XK5YyHN9xlQpx8qisG710rmjpd 1Pb0ku6ICmpST9Dysc+1e3nqHDuHWadj2BSl8ghIDlO9HNCbie854zMp5X9rouiLoe22 Otf96C/DJFqloKoZtNWXaE5kWewkzJ7agNbsfhugasLbQtw3EKOfphAJ1TTx1F9JyTWG HrT9/q0wk0OdZT7j+KMEAhLcniFsrVQRtnhNQQhNf/EupYx+1M/EAL8xHeKxIedTKWdt uloRbhNdnHzn38Z+xTkQ2I46g3gAC2rnF6pWdkVdF8zFAgsf+c1eRqE+KGdtoK35Fq91 4P8w== X-Gm-Message-State: AIVw110oG0wWYBDUz8NFbSxbrolE4oh7xULl+KzTqFLoGrKKsUvWoDUR DGDIGC+P+0B9EQ== X-Received: by 10.98.59.90 with SMTP id i87mr3053412pfa.300.1501863485645; Fri, 04 Aug 2017 09:18:05 -0700 (PDT) Received: from calancha-pc (170.224.128.101.dy.bbexcite.jp. [101.128.224.170]) by smtp.gmail.com with ESMTPSA id v62sm3818528pfb.170.2017.08.04.09.18.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 04 Aug 2017 09:18:04 -0700 (PDT) From: Tino Calancha X-Google-Original-From: Tino Calancha Date: Sat, 5 Aug 2017 01:18:01 +0900 (JST) X-X-Sender: calancha@calancha-pc In-Reply-To: <4ad9397b-7771-4914-85a3-9dd0e998fa0c@default> Message-ID: References: <<87o9rwxmfz.fsf@jidanni.org>> <<87r2wrkacy.fsf@calancha-pc> <83a83fybrc.fsf@gnu.org>> <<87vam365q2.fsf@calancha-pc> <834ltnxzyz.fsf@gnu.org>> <<871sorz9kg.fsf@calancha-pc>> <<83tw1nwfhp.fsf@gnu.org>> <4ad9397b-7771-4914-85a3-9dd0e998fa0c@default> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) On Fri, 4 Aug 2017, Drew Adams wrote: >>>> Shouldn't the valid-answers be "yes" and "no", not "y" and "n", for >>>> backward compatibility? >>> Yes, they should. > >>>> Maybe the "!" and "q" parts should be explained? Or maybe just use >>>> "yes", "no", "all", and "quite", which are self-explanatory? >>> Look the updated patch; it's a mix: >>> 1. uses 'yes', 'no' >>> 2. '!', 'q', 'help' >>> This is similar like `query-replace' does (there is used '!', 'q', and >>> '?'). With 'help', a Help buffer is shown with a help message. > > I haven't been following this thread, so apologies if I misunderstand. > > Is it a good idea to mix `yes-or-no-p'-style (minibuffer) input, > such as `yes' and `no', with `read-char'-style input, such as `!' > and `q'? I don't think so, a priori. Especially for `!', which > has worse repercussions in case of a mistake than does `y'. No? Agreed. If you see my first answer i was reluctant to allow the dangerous operation. I will use "all" and "quit" instead of "!", "q". * Question: Do we need to show the help after this change? From unknown Sun Jun 22 00:49:02 2025 X-Loop: help-debbugs@gnu.org Subject: bug#27940: Recursively delete dir34? (yes, no, all, quit) Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 04 Aug 2017 16:23:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27940 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Tino Calancha Cc: 27940@debbugs.gnu.org, Eli Zaretskii , jidanni@jidanni.org Received: via spool by 27940-submit@debbugs.gnu.org id=B27940.150186375818275 (code B ref 27940); Fri, 04 Aug 2017 16:23:01 +0000 Received: (at 27940) by debbugs.gnu.org; 4 Aug 2017 16:22:38 +0000 Received: from localhost ([127.0.0.1]:41992 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ddfN0-0004kg-2j for submit@debbugs.gnu.org; Fri, 04 Aug 2017 12:22:38 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:25285) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ddfMy-0004kR-DV for 27940@debbugs.gnu.org; Fri, 04 Aug 2017 12:22:37 -0400 Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id v74GMSjl009878 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 4 Aug 2017 16:22:28 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id v74GMSaO011404 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 4 Aug 2017 16:22:28 GMT Received: from abhmp0012.oracle.com (abhmp0012.oracle.com [141.146.116.18]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id v74GMR6C027147; Fri, 4 Aug 2017 16:22:27 GMT MIME-Version: 1.0 Message-ID: <3b5babc7-324e-437b-88a1-c234b883c257@default> Date: Fri, 4 Aug 2017 09:22:26 -0700 (PDT) From: Drew Adams References: <<87o9rwxmfz.fsf@jidanni.org>> <<87r2wrkacy.fsf@calancha-pc> <83a83fybrc.fsf@gnu.org>> <<87vam365q2.fsf@calancha-pc> <834ltnxzyz.fsf@gnu.org>> <<871sorz9kg.fsf@calancha-pc>> <<83tw1nwfhp.fsf@gnu.org>> <4ad9397b-7771-4914-85a3-9dd0e998fa0c@default> In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 12.0.6770.5000 (x86)] Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Source-IP: userv0021.oracle.com [156.151.31.71] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) > > Is it a good idea to mix `yes-or-no-p'-style (minibuffer) input, > > such as `yes' and `no', with `read-char'-style input, such as `!' > > and `q'? I don't think so, a priori. Especially for `!', which > > has worse repercussions in case of a mistake than does `y'. No? > Agreed. If you see my first answer i was reluctant to allow the dangerou= s > operation. > I will use "all" and "quit" instead of "!", "q". >=20 > * Question: > Do we need to show the help after this change? I would say yes, for the help. Think of `yes-or-no-p'. If you type `foo' to `yes-or-no-p' it helps you. Here we should offer more help, explaining the possibilities. From unknown Sun Jun 22 00:49:02 2025 X-Loop: help-debbugs@gnu.org Subject: bug#27940: Recursively delete dir34? (yes, no, all, quit) Resent-From: Tino Calancha Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 04 Aug 2017 16:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27940 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Drew Adams Cc: 27940@debbugs.gnu.org, Eli Zaretskii , jidanni@jidanni.org, Tino Calancha Received: via spool by 27940-submit@debbugs.gnu.org id=B27940.150186446919491 (code B ref 27940); Fri, 04 Aug 2017 16:35:02 +0000 Received: (at 27940) by debbugs.gnu.org; 4 Aug 2017 16:34:29 +0000 Received: from localhost ([127.0.0.1]:42000 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ddfYT-00054I-EG for submit@debbugs.gnu.org; Fri, 04 Aug 2017 12:34:29 -0400 Received: from mail-pg0-f50.google.com ([74.125.83.50]:35790) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ddfYR-000546-DA for 27940@debbugs.gnu.org; Fri, 04 Aug 2017 12:34:27 -0400 Received: by mail-pg0-f50.google.com with SMTP id v189so9963770pgd.2 for <27940@debbugs.gnu.org>; Fri, 04 Aug 2017 09:34:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:date:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=Mgy6nKj8urv1sq1J8xZjtNo8g2RbAS5EAqkhJXqVFOI=; b=NCdNnzS55w2Rw191W5lNCaR/qa9+OT1LLYlStrT1bOUkLp6pvB0t9p4KZ1xPAsJjab GjUYV2NHNBR0gPjRq+eMNdL5VfnzYR5AXvey9r0w4GIBFgbF4OMfQrj/eOb5IcousZKo kU5qEqOlyKHkQ8I98vBzkqI+3tIzKp6ltBFeZ8kBq7cT7qFS+x4xVmL1aTJD4UOtVTBu QHtPiOeA9FWrkjc6I9DVOYvEmXHX/qYUt33MfVnnl5qeHz2ZbqJIywGLu1bEKrnpJWc7 L8ehhe5lX/U6Qnt7U4wfIORSLcOSwDyiRJNdxySpCjokILQ2hhgtH1yRAueos6KFZ69h 4O9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=Mgy6nKj8urv1sq1J8xZjtNo8g2RbAS5EAqkhJXqVFOI=; b=nCBLigf1stvbCco6Imb22sjVg6zwOAiESvGHXvWIMri6CebzigWxw+hDo4yXr82yCC swWXktWTYpHLj3SutR5sh933UOfgI9lKipRjZCxvdFs9zl4xMeTnTt4EaAYx1vrwwHao YVdqKCkgwovcdWngaptors8AG6VaE7YIrrlf5hO6qXpVvlOxFT3WRKvti0ulGn2o2RqU puGtwU4NkfBDHHTYJA6IKsc9sjGWpWM+0MUDs+x6pwMnelvVf8S5JJnrD9Tbl59C1Iwd FV4NLPkjjd2a2Qb7+CmcIUA0g7SW5dqFhTAMT8vOqRjAwnv3kTichH3eYrVfCCjYi45j mm9g== X-Gm-Message-State: AIVw110GNawZvsn8oaFw4VW9sVo1Rtw1hV29S4J0r2IZSzIwP5Gi5x4f 3J+fQ4vjT27I/A== X-Received: by 10.84.216.25 with SMTP id m25mr3525979pli.420.1501864461530; Fri, 04 Aug 2017 09:34:21 -0700 (PDT) Received: from calancha-pc (170.224.128.101.dy.bbexcite.jp. [101.128.224.170]) by smtp.gmail.com with ESMTPSA id u1sm4210584pfk.31.2017.08.04.09.34.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 04 Aug 2017 09:34:20 -0700 (PDT) From: Tino Calancha X-Google-Original-From: Tino Calancha Date: Sat, 5 Aug 2017 01:34:17 +0900 (JST) X-X-Sender: calancha@calancha-pc In-Reply-To: <3b5babc7-324e-437b-88a1-c234b883c257@default> Message-ID: References: <<87o9rwxmfz.fsf@jidanni.org>> <<87r2wrkacy.fsf@calancha-pc> <83a83fybrc.fsf@gnu.org>> <<87vam365q2.fsf@calancha-pc> <834ltnxzyz.fsf@gnu.org>> <<871sorz9kg.fsf@calancha-pc>> <<83tw1nwfhp.fsf@gnu.org>> <4ad9397b-7771-4914-85a3-9dd0e998fa0c@default> <3b5babc7-324e-437b-88a1-c234b883c257@default> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) On Fri, 4 Aug 2017, Drew Adams wrote: >>> Is it a good idea to mix `yes-or-no-p'-style (minibuffer) input, >>> such as `yes' and `no', with `read-char'-style input, such as `!' >>> and `q'? I don't think so, a priori. Especially for `!', which >>> has worse repercussions in case of a mistake than does `y'. No? >> Agreed. If you see my first answer i was reluctant to allow the dangerous >> operation. >> I will use "all" and "quit" instead of "!", "q". >> >> * Question: >> Do we need to show the help after this change? > > I would say yes, for the help. Think of `yes-or-no-p'. > If you type `foo' to `yes-or-no-p' it helps you. Here > we should offer more help, explaining the possibilities. I see. Thank you for the explanation! From unknown Sun Jun 22 00:49:02 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: =?UTF-8?Q?=E7=A9=8D=E4=B8=B9=E5=B0=BC?= Dan Jacobson Subject: bug#27940: closed (Re: bug#27940: Recursively delete dir34? (yes, no, all, quit)) Message-ID: References: <87r2wppabm.fsf@calancha-pc> <87o9rwxmfz.fsf@jidanni.org> X-Gnu-PR-Message: they-closed 27940 X-Gnu-PR-Package: emacs Reply-To: 27940@debbugs.gnu.org Date: Sun, 06 Aug 2017 04:53:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1501995182-1784-1" This is a multi-part message in MIME format... ------------=_1501995182-1784-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #27940: Recursively delete dir34? (yes, no, all, quit) 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 27940@debbugs.gnu.org. --=20 27940: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D27940 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1501995182-1784-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 27940-done) by debbugs.gnu.org; 6 Aug 2017 04:52:29 +0000 Received: from localhost ([127.0.0.1]:44007 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1deDYD-0000Ry-D7 for submit@debbugs.gnu.org; Sun, 06 Aug 2017 00:52:29 -0400 Received: from mail-pg0-f48.google.com ([74.125.83.48]:35621) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1deDYB-0000Rl-Ay for 27940-done@debbugs.gnu.org; Sun, 06 Aug 2017 00:52:27 -0400 Received: by mail-pg0-f48.google.com with SMTP id v189so22074496pgd.2 for <27940-done@debbugs.gnu.org>; Sat, 05 Aug 2017 21:52:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:references:date:in-reply-to:message-id:user-agent :mime-version; bh=S/oNa57J7MzM0JTFzsEyVexT4C+teILkGGVqwfFSXts=; b=u7d4Bn/5N7HPaW2jxN8JqvMCrG/ec2/aXgu5LPwfz9QzaAEplQteDd8iM+ZEIiu7oK MKTgyECamwtOsm4a7wE4rxxiHpif35O/ZCNuXvjmA87ILzAQL3utltMt3YKWWuTFFUoF 9LsotouZd6QJ2ILIjSW9N8AraOhUwYB1pdpIEvW7//xiIQMiJWKrt0AQLsX7+wfUayMV wfc+nZ65SWj+P0wzSG3YQn6iq+7AYfw2abSvSdTUhO33Oy29wSoY9QgyMhXXxWoavfjg hVLpidUU9Ei+Aom4qtghnaWt0QcaeamdTl9vbmpRnbpdSmZQ0YvIawWKMJFMm/fGNpcv 1ZFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=S/oNa57J7MzM0JTFzsEyVexT4C+teILkGGVqwfFSXts=; b=llcrgl0GYGLjpHYsE0rpyf3HbfrU2PEENCW83TDfLgH3ZnU8pnChUlDVx3BkJhLyZB WYTGZqtvpgrbAgTrwPFS3dERL4lYIPfxQedASR6COKg1hYLAo1CYdk5427mtVFDKqV09 Roeh9SVn8l3KW7VGrBUCEUN+pb8maOEq3xiWUw2WUuYm3L5eq6V5G29I5v1CJMtcyVmz xRn1pw6j3YCOciUSy7vk2VynlleoYiI3MOwL60A2hld1wlgLv/DfEoJAW+x9xPsaamZY j8joaS0JVG5n1GKLUoFouYkyaJk5kupysaLWJIWrXskvM8eL06Gy842g5heYfH0I671G czfw== X-Gm-Message-State: AIVw111bHP39u/Ti4EvX7rTlCitKbRRAgcnn4FAgWph0mMijr2PDVZO+ R1YM3yM39u3eQV77 X-Received: by 10.84.233.141 with SMTP id l13mr8965235plk.333.1501995141191; Sat, 05 Aug 2017 21:52:21 -0700 (PDT) Received: from calancha-pc (170.224.128.101.dy.bbexcite.jp. [101.128.224.170]) by smtp.gmail.com with ESMTPSA id d135sm10590955pga.6.2017.08.05.21.52.19 for <27940-done@debbugs.gnu.org> (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 05 Aug 2017 21:52:20 -0700 (PDT) From: Tino Calancha To: 27940-done@debbugs.gnu.org Subject: Re: bug#27940: Recursively delete dir34? (yes, no, all, quit) References: <87o9rwxmfz.fsf@jidanni.org> <87r2wrkacy.fsf@calancha-pc> <83a83fybrc.fsf@gnu.org> <87vam365q2.fsf@calancha-pc> <834ltnxzyz.fsf@gnu.org> <871sorz9kg.fsf@calancha-pc> <83tw1nwfhp.fsf@gnu.org> Date: Sun, 06 Aug 2017 13:52:13 +0900 In-Reply-To: <83tw1nwfhp.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 04 Aug 2017 17:54:10 +0300") Message-ID: <87r2wppabm.fsf@calancha-pc> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 27940-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Eli Zaretskii writes: >> > This warrants a NEWS entry, I think. I also wonder whether we should >> > describe this in the user manual, under "Dired Deletion". >> Done. > > Thanks, LGTM. Added feature into master branch as commit cbea38e5c4af5386192fb9a48ef4fca5080d6561 (dired-do-delete: Allow to delete dirs recursively without prompts) ------------=_1501995182-1784-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 4 Aug 2017 00:37:03 +0000 Received: from localhost ([127.0.0.1]:40555 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ddQbu-00065e-Rk for submit@debbugs.gnu.org; Thu, 03 Aug 2017 20:37:03 -0400 Received: from eggs.gnu.org ([208.118.235.92]:50761) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ddQbt-000654-Lq for submit@debbugs.gnu.org; Thu, 03 Aug 2017 20:37:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ddQbn-00038p-CL for submit@debbugs.gnu.org; Thu, 03 Aug 2017 20:36:56 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_DKIM_INVALID, URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:35779) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ddQbn-00038i-91 for submit@debbugs.gnu.org; Thu, 03 Aug 2017 20:36:55 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41699) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ddQbm-0002tW-67 for bug-gnu-emacs@gnu.org; Thu, 03 Aug 2017 20:36:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ddQbi-00033o-4w for bug-gnu-emacs@gnu.org; Thu, 03 Aug 2017 20:36:54 -0400 Received: from homie.mail.dreamhost.com ([208.97.132.208]:34039 helo=homiemail-a9.g.dreamhost.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ddQbh-00031i-VF for bug-gnu-emacs@gnu.org; Thu, 03 Aug 2017 20:36:50 -0400 Received: from homiemail-a9.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a9.g.dreamhost.com (Postfix) with ESMTP id 93E9A5BE066 for ; Thu, 3 Aug 2017 17:36:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=jidanni.org; h=from:to :subject:date:message-id:mime-version:content-type; s= jidanni.org; bh=CQe+Az6m0Rz6Cq+xY9wnecMlhys=; b=EfD9NLqJqazSKAzl YHBcOr1Z4IHRm7JCYXP7A4ZWbWNu3m3sd4bZsNzrBNNM+Fy0BwSyCGcKw2Mhxk4d FypBVeZHwFzqsm7fBmQxjJO9Z40VWxa+M8JX9D0WJGD2iZKjfYRJRKBbLTHps211 8Y3eYdkS1mTpVK6go+KUCtIpXbg= Received: from jidanni.org (114-26-42-220.dynamic-ip.hinet.net [114.26.42.220]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: jidanni@jidanni.org) by homiemail-a9.g.dreamhost.com (Postfix) with ESMTPSA id 65D405BE064 for ; Thu, 3 Aug 2017 17:36:41 -0700 (PDT) From: =?utf-8?B?56mN5Li55bC8?= Dan Jacobson To: bug-gnu-emacs@gnu.org Subject: Recursively delete dir34? (yes, no, all, quit) Date: Fri, 04 Aug 2017 07:26:24 +0800 Message-ID: <87o9rwxmfz.fsf@jidanni.org> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) dired-do-flagged-delete and me interaction: Recursively delete dcepc? (yes or no) yes Recursively delete emmpc? (yes or no) yes Recursively delete zpspc? (yes or no) yes Recursively delete dgcpc? (yes or no) yes Wouldn't it be nice if there was instead: Recursively delete dgcpc? (yes, no, all, quit) Yes, if before we started we set the variables we needn't be asked all those questions. But now *midway* through the list, we decide we would like no more question, there should be a way, without needing to quit and start over, even if doing that isn't so bad. ------------=_1501995182-1784-1-- From unknown Sun Jun 22 00:49:02 2025 X-Loop: help-debbugs@gnu.org Subject: bug#27940: Recursively delete dir34? (yes, no, all, quit) Resent-From: Tino Calancha Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 09 Aug 2017 05:55:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27940 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Robert Marshall Cc: 27940@debbugs.gnu.org, Tino Calancha Received: via spool by 27940-submit@debbugs.gnu.org id=B27940.150225808410736 (code B ref 27940); Wed, 09 Aug 2017 05:55:01 +0000 Received: (at 27940) by debbugs.gnu.org; 9 Aug 2017 05:54:44 +0000 Received: from localhost ([127.0.0.1]:52514 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dfJx6-0002n6-3l for submit@debbugs.gnu.org; Wed, 09 Aug 2017 01:54:44 -0400 Received: from mail-it0-f65.google.com ([209.85.214.65]:37932) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dfJx4-0002mr-JP for 27940@debbugs.gnu.org; Wed, 09 Aug 2017 01:54:43 -0400 Received: by mail-it0-f65.google.com with SMTP id f16so4034976itb.5 for <27940@debbugs.gnu.org>; Tue, 08 Aug 2017 22:54:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:date:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=JEyFYUwgVbFe3jHs29aiQsrkFPujVYMJ+6x4KUbuZH4=; b=cC9ZCjg671M3NCeNrQ1GGMDRfw3x2J8/VDHcW6CENYrsrYCr6UUQ4tos+MQAUuURCo vLQr++pxL1kI8XjgI5iJArPwmXkSiFjVmDb/oero03BRYyMRCv66rVoltePatocDn+JO dEsFM1p1o6GQLZ+HFDzGHjBfjkasy1ZkH4vdinihRhV5RA+9wChnj1dUyOXPg4sY2eTO GK/M6Q3B3L1C3IULbARcXBisn8WYxqCmr7rh+22pOSzZP90O7e7KYQMGevxddF1+9+Zd vZ/enN/vqr4zOlKDTMemiDFnNBshOLEJlrdChLD1ipLMbz2XNLLAmvkGx2iiGoccPeqv F1EA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=JEyFYUwgVbFe3jHs29aiQsrkFPujVYMJ+6x4KUbuZH4=; b=LNTXBlLooBbl4zEhXurqTbl861QzOHBTfk3Zj3S1R/4Io9YE6eDNIWr+D8lB9Uwp5i aTtpfVCIKZ1rq9cqVT8Xrq3/YZiGVNIcC0AzasaSHJkhwMgoVZJT26QJR5AhWNQaKwds bqn0/cGyC5Il2WyELOrS+5/9GlGWjb7oe6dTxsk7CJtP4lXtk6onHQGukCLvFMeNkVMK sCPNUGGGvGr0eJP1mUfFP4DrM/J0AeWkfSSiwjGxS3CgiAIo4TO7rGi2v+6GqohyS7UF v/aEVyj14SpOEh95xn/Rpv1NePP/BUCtm90P6iNfZlbZwaZ6X7lFRjTybbJ2ZqlLcTWK 9Idw== X-Gm-Message-State: AHYfb5jT0CH/nb1tUCY7lifjGDJEBzl1dK+k+2lUGnRLKXgvkM1Jp1Ti 8qv2bXOJvWoTCw== X-Received: by 10.36.154.3 with SMTP id l3mr6598120ite.20.1502258076724; Tue, 08 Aug 2017 22:54:36 -0700 (PDT) Received: from calancha-pc (170.224.128.101.dy.bbexcite.jp. [101.128.224.170]) by smtp.gmail.com with ESMTPSA id r18sm1506550ioe.78.2017.08.08.22.54.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 08 Aug 2017 22:54:36 -0700 (PDT) From: Tino Calancha X-Google-Original-From: Tino Calancha Date: Wed, 9 Aug 2017 14:54:32 +0900 (JST) X-X-Sender: calancha@calancha-pc In-Reply-To: <87k22e9obk.fsf@ctlt579.codethink.co.uk> Message-ID: References: <87o9rwxmfz.fsf@jidanni.org> <87r2wrkacy.fsf@calancha-pc> <83a83fybrc.fsf@gnu.org> <87vam365q2.fsf@calancha-pc> <834ltnxzyz.fsf@gnu.org> <871sorz9kg.fsf@calancha-pc> <83tw1nwfhp.fsf@gnu.org> <87r2wppabm.fsf@calancha-pc> <87k22e9obk.fsf@ctlt579.codethink.co.uk> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII X-Spam-Score: 0.5 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) On Tue, 8 Aug 2017, Robert Marshall wrote: > Tino Calancha writes: > >> Eli Zaretskii writes: >> >>>>> This warrants a NEWS entry, I think. I also wonder whether we should >>>>> describe this in the user manual, under "Dired Deletion". >>>> Done. >>> >>> Thanks, LGTM. >> Added feature into master branch as commit >> cbea38e5c4af5386192fb9a48ef4fca5080d6561 >> (dired-do-delete: Allow to delete dirs recursively without prompts) > > Hi > > With this change deleting an empty directory now asks for confirmation > whereas it didn't before and answering no to the recursively delete > question still deletes the directory, which seems a bit counter > intuitive? > > Robert Thank you very much. I believe commit da4438e14f1c55808937872b6d651a807404daa2 (dired-delete-file: Dont't ask for empty dirs) has fixed it. From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 15 10:12:45 2017 Received: (at control) by debbugs.gnu.org; 15 Oct 2017 14:12:45 +0000 Received: from localhost ([127.0.0.1]:41741 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e3jem-0005su-Q3 for submit@debbugs.gnu.org; Sun, 15 Oct 2017 10:12:44 -0400 Received: from mail-io0-f180.google.com ([209.85.223.180]:50868) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e3jel-0005sh-4G for control@debbugs.gnu.org; Sun, 15 Oct 2017 10:12:43 -0400 Received: by mail-io0-f180.google.com with SMTP id 97so13445347iok.7 for ; Sun, 15 Oct 2017 07:12:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:date:message-id:mime-version; bh=UJ2XDZvVkHtufqUYXz57KciWM9dwS82td09eMLgEuiM=; b=S3E1QGpiXTF/XBpf46I6axPU8cKW5YePnA4etddGn7pyoGWHtROW8ZXzASKik7I7HO SVbx6vWlLO4kiVeFAVGMIOWGhSn0iFZg8TbC+lCVRWxCuanS4YLMqUg9EvhfcKtp4/dA mTm0fRzIREdcSsNDT2NGGx/wvNk7E3zpY63cjrfBi2GXgb6mWqai/W8ERbS+e2HsJhys me5Q3Ngw1yukIoEJp0PR96tr+ujFIrdoiByw3N50cqK0mDIlD0TxBl29rXWmPy9CMocy oNBgGvAck1J94xUNPOKCEyi+jKfW7G/0p85zOPTOInACLWUt1UfZZGC3Yt862IfW2y4g RRLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:date:message-id :mime-version; bh=UJ2XDZvVkHtufqUYXz57KciWM9dwS82td09eMLgEuiM=; b=RPVMOEm6PZ1nSZZPrm+EwyPx+RndoA55r3nYcdWNM1u5vWpOq5W84VSYkVpq0QuWvj oMz20lzYaU6kiaCP+kBtKHmm3kz6zWKZajoRF2Q5AkWZTvse4iJsZ4BZwSzsD+H+TD31 0e9iioKi65wUVn5j8gQv8t4vPBxdSVdkT8tRaprc/RoMHRdUssP4n3+5PbHxnyfpijpD iBRni277iZdyHrQ+NNNrtmbCjUaQuG3E51TZZRRAOsHkzh7e5f1wKhwA/n9FOwPo3rdT RO5uyDPu0EgT137QKYDf4l/uV14hHS0xp4OGmYfBK4nBoS0d7Vr6glIvyR+l8d1GYJKL S0Iw== X-Gm-Message-State: AMCzsaUHdJk1dRYjUJecF8PNi4jwid3cLi0ix1XbYpuQ7mhCzSbMG81/ Bm4nQ9/S5N9GR84GPWa1kpqunw== X-Google-Smtp-Source: ABhQp+TbUsu7wh21sSg1vK5e+8oGG+mAjbHYs4xuSIjPITCFaRjWm4GvjyULcyaSUGCiS6y35SdkOw== X-Received: by 10.107.222.9 with SMTP id v9mr8869123iog.20.1508076757170; Sun, 15 Oct 2017 07:12:37 -0700 (PDT) Received: from zebian ([45.2.119.34]) by smtp.googlemail.com with ESMTPSA id 194sm2736050itm.21.2017.10.15.07.12.35 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 15 Oct 2017 07:12:35 -0700 (PDT) From: Noam Postavsky To: control@debbugs.gnu.org Subject: control message for bug #27940 Date: Sun, 15 Oct 2017 10:12:34 -0400 Message-ID: <87vajg8ppp.fsf@users.sourceforge.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.1 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.1 (--) unarchive 27940 quit From unknown Sun Jun 22 00:49:02 2025 X-Loop: help-debbugs@gnu.org Subject: bug#27940: Recursively delete dir34? (yes, no, all, quit) Resent-From: Noam Postavsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 15 Oct 2017 14:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27940 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Tino Calancha Cc: 27940@debbugs.gnu.org Received: via spool by 27940-submit@debbugs.gnu.org id=B27940.150807703730325 (code B ref 27940); Sun, 15 Oct 2017 14:18:02 +0000 Received: (at 27940) by debbugs.gnu.org; 15 Oct 2017 14:17:17 +0000 Received: from localhost ([127.0.0.1]:41748 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e3jjB-0007t2-CC for submit@debbugs.gnu.org; Sun, 15 Oct 2017 10:17:17 -0400 Received: from mail-it0-f48.google.com ([209.85.214.48]:55122) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e3jj9-0007sn-EH for 27940@debbugs.gnu.org; Sun, 15 Oct 2017 10:17:16 -0400 Received: by mail-it0-f48.google.com with SMTP id 72so15331217itk.3 for <27940@debbugs.gnu.org>; Sun, 15 Oct 2017 07:17:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=17ZBsB+f0PpB5hC08Rd80Yw/UQovnPSyq+EoHAFWsbM=; b=LabxRsyBMsOyesdx4aEtfyqOy6m490fvIdFEtQOGs+ayuPeEKcidESVG0t1Zxi9gtE p1meg+24IbbYeWhN7RCDLY4KC/RTSDU+OZ8Djk/189YlEFVFdaIz+PplwAAdVIF1oJPL Lm/fbHf8UjUOR+8HmARWf5b4N3f7Cunc7P8ftyML6fbpU4aZkk/zF10bSO58xFAhWiHZ fUUPtW4icwF9dGzC4nKv2r+A+JfIwYxGYtKrSHJl9x1Nj2EdwsJcadIyUiCMJZ6iRQ+F HqrfZvL2zqBRvXFU3b4TBUtW2r3OQZJ/JuRBDe1Y50wWPHvgV7mshEXfNzx8DT8qWOjD YkGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=17ZBsB+f0PpB5hC08Rd80Yw/UQovnPSyq+EoHAFWsbM=; b=Li/55x5f7e1g5F/6wyNKQ+70ZU3Eos/7Esnoc30llTybU7Vn2Tzc5t2lipDFqazxTp IqIHQTExe6ydIpvCnD37u9N6HoN6k0aZYGMbKJw461UzxNm8Ef6Xy/wCLVDk9JYKnwps uCLqY3LtkXWYLXGQ03jm4iiql+W69/boo09+tN6SWCDptO3dCtBFw6DhYrUDDMUUrHA4 X39EKaK3/yr76GehSFvYzBl6g73/TkT4hSwRnyaLICDnWfOcPK4WluEB356pKDS/+wMX 6JW+nO+ui915v9CdpB73X457CrIWYeFECoJmYzanbisRxkjyp0h4hZYjk9mWdhvIG23c KlGA== X-Gm-Message-State: AMCzsaVlQklNTdZWNJ4I+vEdDQrtswZZ56hgzZyXJobEH2jZg9Wp6w7J 38cepOUOuBd6fEijgFcBDr5BAA== X-Google-Smtp-Source: ABhQp+Q1mo5mSwGXRr530+KXg6BWucC71RYk3iubwUDI/87MBhPJDb0gXmJKJQTgGIt3BiCW5YfZtA== X-Received: by 10.36.29.19 with SMTP id 19mr9134930itj.86.1508077029546; Sun, 15 Oct 2017 07:17:09 -0700 (PDT) Received: from zebian ([45.2.119.34]) by smtp.googlemail.com with ESMTPSA id p190sm2792230itp.36.2017.10.15.07.17.08 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 15 Oct 2017 07:17:08 -0700 (PDT) From: Noam Postavsky References: <87o9rwxmfz.fsf@jidanni.org> <87r2wrkacy.fsf@calancha-pc> <83a83fybrc.fsf@gnu.org> <87vam365q2.fsf@calancha-pc> <834ltnxzyz.fsf@gnu.org> <871sorz9kg.fsf@calancha-pc> <83tw1nwfhp.fsf@gnu.org> <87r2wppabm.fsf@calancha-pc> <87k22e9obk.fsf@ctlt579.codethink.co.uk> Date: Sun, 15 Oct 2017 10:17:07 -0400 In-Reply-To: (Tino Calancha's message of "Wed, 9 Aug 2017 14:54:32 +0900 (JST)") Message-ID: <87shek8pi4.fsf@users.sourceforge.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.60 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.7 (/) Tino Calancha writes: > I believe commit da4438e14f1c55808937872b6d651a807404daa2 > (dired-delete-file: Dont't ask for empty dirs) > has fixed it. The "no" case of dired-test-bug27940 is failing now. I guess if RECURSIVE is set to nil, we should not try to delete non-empty directories, or maybe just catch the error if it happens? Test dired-test-bug27940 backtrace: delete-directory-internal("/tmp/bug27940QSb9cm/non-empty-0") apply(delete-directory-internal "/tmp/bug27940QSb9cm/non-empty-0") files--force(nil delete-directory-internal "/tmp/bug27940QSb9cm/non- delete-directory("/tmp/bug27940QSb9cm/non-empty-0" nil t) dired-delete-file("/tmp/bug27940QSb9cm/non-empty-0" top t) dired-internal-do-deletions((("/tmp/bug27940QSb9cm/empty-dir-0" . 18 dired-do-delete(nil) (progn (advice-add 'dired--yes-no-all-quit-help :override (function (unwind-protect (progn (advice-add 'dired--yes-no-all-quit-help :ove (let* ((dir (make-temp-file "bug27940" t)) (dired-deletion-confirmer (closure (t) nil (let* ((dir (make-temp-file "bug27940" t)) (dired-d ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-test ert-run-test(#s(ert-test :name dired-test-bug27940 :documentation "T ert-run-or-rerun-test(#s(ert--stats :selector t :tests [#s(ert-test ert-run-tests(t #f(compiled-function (event-type &rest event-args) # ert-run-tests-batch(nil) ert-run-tests-batch-and-exit(nil) eval((ert-run-tests-batch-and-exit nil)) command-line-1(("-L" ":../../test" "-l" "ert" "-l" "lisp/dired-tests command-line() normal-top-level() Test dired-test-bug27940 condition: (file-error "Removing directory" "Directory not empty" "/tmp/bug27940QSb9cm/non-empty-0") FAILED 9/11 dired-test-bug27940 From unknown Sun Jun 22 00:49:02 2025 X-Loop: help-debbugs@gnu.org Subject: bug#27940: Recursively delete dir34? (yes, no, all, quit) Resent-From: Tino Calancha Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 16 Oct 2017 05:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27940 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Noam Postavsky Cc: 27940@debbugs.gnu.org Received: via spool by 27940-submit@debbugs.gnu.org id=B27940.150813121516973 (code B ref 27940); Mon, 16 Oct 2017 05:21:02 +0000 Received: (at 27940) by debbugs.gnu.org; 16 Oct 2017 05:20:15 +0000 Received: from localhost ([127.0.0.1]:42322 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e3xp1-0004Pg-LV for submit@debbugs.gnu.org; Mon, 16 Oct 2017 01:20:15 -0400 Received: from mail-pf0-f176.google.com ([209.85.192.176]:54001) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e3xoz-0004PT-90 for 27940@debbugs.gnu.org; Mon, 16 Oct 2017 01:20:13 -0400 Received: by mail-pf0-f176.google.com with SMTP id t188so12474830pfd.10 for <27940@debbugs.gnu.org>; Sun, 15 Oct 2017 22:20:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=w01wJTq3/zuUdRhkEWb43F7pUVf/lWt49by7rLt6HI4=; b=dFjtLV5bvuZYyr3+nIO4Dq0uxV8s4NiQPTi7YWEFzVmmZc2gqiHqP+kI5CMfxpXqEG 3nqTJ3uu5btA8KscCSnSr9L1XwTRaUwhhdK65R6lRVcsNPp4L5sD7qvxKA+8AVUnaKnA m6scytV5zKNp9izeq28mDl+5Fom1e4ocdzhjY5PCS1OWTupU6BQQKRAJDsh6DCdZMaJo N0fu7qBSCiK7AyjBV/bbiJf6yFL1CtWm8wmvn6DEc+/F+oy3UwLwcqUeHlNl1QE9P2Yb 8ybJ5xdvs0O7UW18mUyiL9YK2+5hZ2hIL5qlWzOVN0mGeNJo69YExXxOFpv92m5Wql01 F/Ag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=w01wJTq3/zuUdRhkEWb43F7pUVf/lWt49by7rLt6HI4=; b=JDJ7fDTSXIJsKiVm8sKO4mV2UKTW+laaE8+clR6c19bxR/L4EMGhoka30/c4ZfCgCL 6uqOS+7JMt+Kx66YERJilq7WhnNgoN0jqyO1X+0P4SFOdbDmZWN40lSEVBEr1U+aPWS8 wGC7CRVahl2UsVWmoAemMRgV9G+50unqiVtLD40/B5cbR+2coQFYZ7myBm9t90YSgE4y LuGqlpYJijYokDBskxgGrhP2MVqdG9E/zfQY/JHmcG0lAEiE5gDMAZjkHx+/OEz3DLxs jlshaP+N8KP9+0XbON/+zJ+j/7sn+JTymr7iKPV3dmgu3PkzIivEy9nDsHj2xMrUupAU SKIQ== X-Gm-Message-State: AMCzsaUIt1TSFAF/LK40U7QTQXN1xP9JPscpGosVtEs0m14HDPV/juKl PoogYe8ZVzCaVbZSfgJ012FG5Q== X-Google-Smtp-Source: AOwi7QBuwAa08TSQ5ZWvuzWNE9OrZGE/LOEtADhCpCtfZ3+c6COhIUsr8E396H8CAi8J1rWfQJie8A== X-Received: by 10.98.62.81 with SMTP id l78mr7802615pfa.171.1508131207253; Sun, 15 Oct 2017 22:20:07 -0700 (PDT) Received: from calancha-pc (203.191.218.133.dy.bbexcite.jp. [133.218.191.203]) by smtp.gmail.com with ESMTPSA id a70sm12317991pfa.94.2017.10.15.22.20.05 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 15 Oct 2017 22:20:06 -0700 (PDT) From: Tino Calancha References: <87o9rwxmfz.fsf@jidanni.org> <87r2wrkacy.fsf@calancha-pc> <83a83fybrc.fsf@gnu.org> <87vam365q2.fsf@calancha-pc> <834ltnxzyz.fsf@gnu.org> <871sorz9kg.fsf@calancha-pc> <83tw1nwfhp.fsf@gnu.org> <87r2wppabm.fsf@calancha-pc> <87k22e9obk.fsf@ctlt579.codethink.co.uk> <87shek8pi4.fsf@users.sourceforge.net> Date: Mon, 16 Oct 2017 14:20:03 +0900 In-Reply-To: <87shek8pi4.fsf@users.sourceforge.net> (Noam Postavsky's message of "Sun, 15 Oct 2017 10:17:07 -0400") Message-ID: <87k1zv3bzw.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.8 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.8 (--) Noam Postavsky writes: > Tino Calancha writes: > >> I believe commit da4438e14f1c55808937872b6d651a807404daa2 >> (dired-delete-file: Dont't ask for empty dirs) >> has fixed it. > > The "no" case of dired-test-bug27940 is failing now. I guess if > RECURSIVE is set to nil, we should not try to delete non-empty > directories, or maybe just catch the error if it happens? Those tests implicitely assume you keep the 'dired-recursive-deletes' default, i.e. 'top; IMO it's not sorprising that they fail if you run them interactively with other 'dired-recursive-deletes' value. We could explicitely set 'dired-recursive-deletes' 'top if you prefer that. The following snippet behaves the same in Emacs-25 and the master branch: emacs -Q /tmp -eval "(customize-set-variable 'dired-recursive-deletes nil)" + foo RET RET + a/b RET + c/d RET + e RET t D yes RET no RET no RET ; Only 'e' is deleted ;; Delete just 'c' U D yes RET ; Signal an error ;; Probably this error should be catched as well? ;; We could open a bug report against 25.3 for this. From unknown Sun Jun 22 00:49:02 2025 X-Loop: help-debbugs@gnu.org Subject: bug#27940: Recursively delete dir34? (yes, no, all, quit) Resent-From: Noam Postavsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 16 Oct 2017 10:37:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27940 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Tino Calancha Cc: 27940@debbugs.gnu.org Received: via spool by 27940-submit@debbugs.gnu.org id=B27940.150815018414723 (code B ref 27940); Mon, 16 Oct 2017 10:37:01 +0000 Received: (at 27940) by debbugs.gnu.org; 16 Oct 2017 10:36:24 +0000 Received: from localhost ([127.0.0.1]:42539 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e42kx-0003pP-KY for submit@debbugs.gnu.org; Mon, 16 Oct 2017 06:36:23 -0400 Received: from mail-it0-f47.google.com ([209.85.214.47]:50403) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e42kw-0003pA-3g for 27940@debbugs.gnu.org; Mon, 16 Oct 2017 06:36:22 -0400 Received: by mail-it0-f47.google.com with SMTP id 72so622514itl.5 for <27940@debbugs.gnu.org>; Mon, 16 Oct 2017 03:36:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=hzzFDLRf4zr1ADItISy8RJaxqSlWfSTMe7LbnELxQ0A=; b=WVe+tYQqMsFfNcy6mLnUJQwLLkv+GKa+RG+N32Fa6Aq4bD2GJ0mvo+7AkomoO1WxMV gh+8/58JT2/gsaHbQENTFn4XW2YK7poAB/abVgjxhc1hVQr55oIzeuYTLib+FInA2px9 4b9mgopG7L8BlZTZZ8R9szvjdMGpUD76GeyG+/RN/074z+EYuXNsuy+ardWpabbw88Ao g8bKY90GHQzheWmuCYAQD7u4xh9BTW6WlekvCtKHK21rNx9CbJqZaeHVR2bm7t/MQJmG EY/0AwHZAfGpfz7dB5VnsJD7ymkelYKX1UnDBicBxLmxldFWf74acdrZ7EhixFuCDw8A 4FCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=hzzFDLRf4zr1ADItISy8RJaxqSlWfSTMe7LbnELxQ0A=; b=qIk7bY0NBwC5yqO+IbaoLQvIFWIOYi9zbjXDIm2k8ohi4YTdXCyszpTkOP3r/CISdC 6F15Uf37mOsafKK+DFFxCbID8/A3RZNFd7H6DdlgigSevTDj8DxemmnmJKFqvFvCh6o5 FGhGOVJnKcJZujklFU33YfLu5xQKucbmbGM3QGm67N4Zj1HufSSCkq2qd+K3pbx2JMOD ded3MSt/pqzAbicu+Cmv3+A3LaFo6EHGq446JoxBXRPTrPsCojOQH/B8GnN5HBYoyaU0 WMR6SxArW42PtSe3nkOegHRap3bf32UdFF4sEnSU+5zKfdzGJC1RVMl4iEuX6um5hIdq RQ+A== X-Gm-Message-State: AMCzsaWEe7EwA9Vr5QlWZ910ZFBb2ehc/06IEm/rJpncenBdmPfU2IyB dmVEB+MYQ9f7JHcRFul6wSrFkg== X-Google-Smtp-Source: ABhQp+QBQkhr1INLJ7WxmnQejytM4j+8YW4nzvCutRuCYDw5xgyCHGdFLu7BauCijZmiD2dkqcLFSQ== X-Received: by 10.36.246.74 with SMTP id u71mr528404ith.104.1508150176124; Mon, 16 Oct 2017 03:36:16 -0700 (PDT) Received: from zebian ([45.2.119.34]) by smtp.googlemail.com with ESMTPSA id f12sm1505403itc.1.2017.10.16.03.36.14 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 16 Oct 2017 03:36:14 -0700 (PDT) From: Noam Postavsky References: <87o9rwxmfz.fsf@jidanni.org> <87r2wrkacy.fsf@calancha-pc> <83a83fybrc.fsf@gnu.org> <87vam365q2.fsf@calancha-pc> <834ltnxzyz.fsf@gnu.org> <871sorz9kg.fsf@calancha-pc> <83tw1nwfhp.fsf@gnu.org> <87r2wppabm.fsf@calancha-pc> <87k22e9obk.fsf@ctlt579.codethink.co.uk> <87shek8pi4.fsf@users.sourceforge.net> <87k1zv3bzw.fsf@gmail.com> Date: Mon, 16 Oct 2017 06:36:13 -0400 In-Reply-To: <87k1zv3bzw.fsf@gmail.com> (Tino Calancha's message of "Mon, 16 Oct 2017 14:20:03 +0900") Message-ID: <87tvyzgz1e.fsf@users.sourceforge.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.7 (/) Tino Calancha writes: > Those tests implicitely assume you keep the > 'dired-recursive-deletes' default, i.e. 'top; IMO it's not > sorprising that they fail if you run them interactively > with other 'dired-recursive-deletes' value. It is failing for me when I run non-interactively: make -C test dired-tests Does it not fail for you? > We could explicitely set 'dired-recursive-deletes' 'top if you > prefer that. I tried also binding it during the test, but it still failed: modified test/lisp/dired-tests.el @@ -364,7 +364,8 @@ dired-test-with-temp-dirs (declare (indent 1) (debug body)) (let ((dir (make-symbol "dir")) (ignore-funcs (make-symbol "ignore-funcs"))) - `(let* ((,dir (make-temp-file "bug27940" t)) + `(let* ((dired-recursive-deletes 'top) + (,dir (make-temp-file "bug27940" t)) (dired-deletion-confirmer (lambda (_) "yes")) ; Suppress prompts. (inhibit-message t) (default-directory ,dir)) From unknown Sun Jun 22 00:49:02 2025 X-Loop: help-debbugs@gnu.org Subject: bug#27940: Recursively delete dir34? (yes, no, all, quit) Resent-From: Tino Calancha Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 16 Oct 2017 10:44:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27940 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Noam Postavsky Cc: 27940@debbugs.gnu.org Received: via spool by 27940-submit@debbugs.gnu.org id=B27940.150815061715420 (code B ref 27940); Mon, 16 Oct 2017 10:44:02 +0000 Received: (at 27940) by debbugs.gnu.org; 16 Oct 2017 10:43:37 +0000 Received: from localhost ([127.0.0.1]:42550 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e42rx-00040e-06 for submit@debbugs.gnu.org; Mon, 16 Oct 2017 06:43:37 -0400 Received: from mail-pf0-f180.google.com ([209.85.192.180]:44555) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e42rv-00040Q-JG for 27940@debbugs.gnu.org; Mon, 16 Oct 2017 06:43:35 -0400 Received: by mail-pf0-f180.google.com with SMTP id x7so15544999pfa.1 for <27940@debbugs.gnu.org>; Mon, 16 Oct 2017 03:43:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=f80mIa+6TjxvVXEoK3+BzYzo6ltea5fNcuKwdSL6cyg=; b=Hg+DayzyikR5gLYpZ/JO5L+PfP2sBzIX7j/IeY1SDKAs6xF9ia2gU80lJf57LuLv73 5H+SFIqwZfc7OnVz+nrZmbPpbI2wHVXHE7w1+ZXrXRCJF7Vfwj9YFukszy2FIe6EFDIt ewZQqSprWQ2ol8+EniwKphXIul1eqYkFOpXzLwDqd2utdRNvOmheDZhJY7h9l6Nmj4U2 SENEzDFUvJGJUMuwdhw5DsPLM7bii+74e66jxgskjDQW2gNewhkvhaX7oAJ7e8uh0c0o tyzOWRjHlRLi5QARjmm6to+bs9LnifB38TUhnVXtG5m5ePpE5MIjXQgsscQ3FkiDEoS8 ZZtg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=f80mIa+6TjxvVXEoK3+BzYzo6ltea5fNcuKwdSL6cyg=; b=Ea/jVgw59VX3YEkra1NF8WkuN0u60ky+qbuMH2C/fuX6A254G9d5hcvmC3gpeXtNF9 negYmaliWxpz2chn4UjEK+K5YmN+IMMwjUqtyOTiU4/Le4JYMdwvNGsQydtFTwdvsuiP FSdJmgbSArHuP3yFvoImu07qTnwYkg9k3QT5gQOPfQxAwUmrFiC6uCzWW1x9kOfdJ1ws Jpq5GRNrsvZ33tUZN/fYEm5sTv0L84xWovaupkDKbdhcd0bVFGPjnyKyCj39tzu4IayO 4zAFVuI5OFuYocNFlKhPWzRVHZMHJ7v5Xv9evvxcSKhhsZL1rxEWoCA7k1J36KKEO9tf iVwA== X-Gm-Message-State: AMCzsaWFrrBU1+6rBdlcsqrBlTf/AzkoIyfEbjvq5kmkMMwidyaghmeE AzE2a1/AHaA86siCEsDRuBrxLg== X-Google-Smtp-Source: AOwi7QB3QzdWD0F9HloSQlRkpkNf070KeEG12MDH+4SfqKpVnm+/WXt/Xskcl0jDBGqN8slC+LTnlA== X-Received: by 10.98.163.193 with SMTP id q62mr8416859pfl.276.1508150609547; Mon, 16 Oct 2017 03:43:29 -0700 (PDT) Received: from calancha-pc (203.191.218.133.dy.bbexcite.jp. [133.218.191.203]) by smtp.gmail.com with ESMTPSA id b1sm11866234pgc.67.2017.10.16.03.43.27 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 16 Oct 2017 03:43:28 -0700 (PDT) From: Tino Calancha References: <87o9rwxmfz.fsf@jidanni.org> <87r2wrkacy.fsf@calancha-pc> <83a83fybrc.fsf@gnu.org> <87vam365q2.fsf@calancha-pc> <834ltnxzyz.fsf@gnu.org> <871sorz9kg.fsf@calancha-pc> <83tw1nwfhp.fsf@gnu.org> <87r2wppabm.fsf@calancha-pc> <87k22e9obk.fsf@ctlt579.codethink.co.uk> <87shek8pi4.fsf@users.sourceforge.net> <87k1zv3bzw.fsf@gmail.com> <87tvyzgz1e.fsf@users.sourceforge.net> Date: Mon, 16 Oct 2017 19:43:22 +0900 In-Reply-To: <87tvyzgz1e.fsf@users.sourceforge.net> (Noam Postavsky's message of "Mon, 16 Oct 2017 06:36:13 -0400") Message-ID: <87fuaj2x11.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.8 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.8 (--) Noam Postavsky writes: > Tino Calancha writes: > >> Those tests implicitely assume you keep the >> 'dired-recursive-deletes' default, i.e. 'top; IMO it's not >> sorprising that they fail if you run them interactively >> with other 'dired-recursive-deletes' value. > > It is failing for me when I run non-interactively: > > make -C test dired-tests > > Does it not fail for you? No, in my case they pass (commit: eed3a3d9e95d2c5346a23c9d92ca4e5848330183): passed 4/11 dired-test-bug27243-01 passed 5/11 dired-test-bug27243-02 passed 6/11 dired-test-bug27243-03 passed 7/11 dired-test-bug27631 passed 8/11 dired-test-bug27899 passed 9/11 dired-test-bug27940 passed 10/11 dired-test-bug27968 passed 11/11 dired-test-bug7131 Ran 11 tests, 11 results as expected (2017-10-16 19:37:34+0900) It pass in the gitlab CI as well: https://gitlab.com/emacs-ci/emacs/-/jobs/36237548 I don't know why it fails for you. From unknown Sun Jun 22 00:49:02 2025 X-Loop: help-debbugs@gnu.org Subject: bug#27940: Recursively delete dir34? (yes, no, all, quit) Resent-From: Noam Postavsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 17 Oct 2017 12:41:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27940 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Tino Calancha Cc: 27940@debbugs.gnu.org Received: via spool by 27940-submit@debbugs.gnu.org id=B27940.15082440472017 (code B ref 27940); Tue, 17 Oct 2017 12:41:01 +0000 Received: (at 27940) by debbugs.gnu.org; 17 Oct 2017 12:40:47 +0000 Received: from localhost ([127.0.0.1]:45021 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e4RAs-0000WS-UH for submit@debbugs.gnu.org; Tue, 17 Oct 2017 08:40:47 -0400 Received: from mail-it0-f54.google.com ([209.85.214.54]:46109) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e4RAr-0000WG-Jy for 27940@debbugs.gnu.org; Tue, 17 Oct 2017 08:40:46 -0400 Received: by mail-it0-f54.google.com with SMTP id f187so2299086itb.1 for <27940@debbugs.gnu.org>; Tue, 17 Oct 2017 05:40:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=OWPCBxnB6e9TdOsQrwWkvpTxnILzgR+UIeXdgtcB26E=; b=CsdT1x2EMe3fPGYuQNrVqmZ1LUF1tj89pw1WkA1AF1TO4272QLy/0lTd+WA/qfMl4+ 6CK2pQTHdv/AEVKvwUrqroMvvYKnuxlQS23xKI3SScDZT5Pzk75HkbDhVBbspd8i4RBo G4NOeXq3HXfgSQxluh/njpPNyonISqc5ZpbKoSSwlO+DRlda4Y+ivRE0jtoPCYSmPwB7 /v7yQzpYBcYG4m4g3yjb256eduS3yR9UnLPs/ziNj5vjsywExlJEskWoxgOfnxQnAI3F tcsgigWIo/KeXuvaBHRyxTUdyGkGYldM8qtcf55QkXRDwYXZwPFq3ClrUn6y3XRBfBTz pnwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=OWPCBxnB6e9TdOsQrwWkvpTxnILzgR+UIeXdgtcB26E=; b=XQKDYDH09zpj3IqTWo2/WCBTZuekQuogEkYEQKduqp5QyYXUuD3aAwANw++8noBEKa 7JM4SxGLC+WNgwbIIKukUVo9QAMV1j/YHQKXdob3uezA0WR2zTKI3PfW7MkGPLoK/UWU Uc/Z0Mw1Bz4wnQ1q7Jmd+j+UdDFAu6lotHq4MXy2kDDYYlGXMWJwacZyBeeYaZ47H5f3 ng6E7uJtUBhrS/HP6dp0S/UwQv6xmjz905c2I082p95arVVB7D8l8iEpXL/5P4fisqPH yL6AIO5ecww32t0Bj2JcHni/3VhySmJJPSw345iib7ju6WkJGo7dmEQQu0BoKgAf1Wtr J98A== X-Gm-Message-State: AMCzsaWtYjYbpcxKDQDqz8hPQLLOriSxaOSGMpIGAjCUBlcDLXTvWiQi +5VIELnAhDzrJHTiKxtfza9b1w== X-Google-Smtp-Source: ABhQp+TNseFgZTTEatROb0X0uS/TUBG2nf6BtV9QEc9wYclXrds9AjqLSwx62mEoMzjwpBjt70l31g== X-Received: by 10.36.166.78 with SMTP id r14mr5516066iti.76.1508244039763; Tue, 17 Oct 2017 05:40:39 -0700 (PDT) Received: from zebian ([45.2.119.34]) by smtp.googlemail.com with ESMTPSA id j71sm765040itj.2.2017.10.17.05.40.38 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 17 Oct 2017 05:40:38 -0700 (PDT) From: Noam Postavsky References: <87o9rwxmfz.fsf@jidanni.org> <87r2wrkacy.fsf@calancha-pc> <83a83fybrc.fsf@gnu.org> <87vam365q2.fsf@calancha-pc> <834ltnxzyz.fsf@gnu.org> <871sorz9kg.fsf@calancha-pc> <83tw1nwfhp.fsf@gnu.org> <87r2wppabm.fsf@calancha-pc> <87k22e9obk.fsf@ctlt579.codethink.co.uk> <87shek8pi4.fsf@users.sourceforge.net> <87k1zv3bzw.fsf@gmail.com> <87tvyzgz1e.fsf@users.sourceforge.net> <87fuaj2x11.fsf@gmail.com> Date: Tue, 17 Oct 2017 08:40:37 -0400 In-Reply-To: <87fuaj2x11.fsf@gmail.com> (Tino Calancha's message of "Mon, 16 Oct 2017 19:43:22 +0900") Message-ID: <87376igd6i.fsf@users.sourceforge.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Tino Calancha writes: > Ran 11 tests, 11 results as expected (2017-10-16 19:37:34+0900) > It pass in the gitlab CI as well: > https://gitlab.com/emacs-ci/emacs/-/jobs/36237548 > > I don't know why it fails for you. Oh, it's because of another patch I have[1] which changes the condition-case in dired-do-internal-deletions to condition-case-unless-debug. This is really another case of Bug#11218. [1]: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=28797#11