GNU bug report logs - #32969
"Confirm--do you mean to use ‘*’ as a wildcard? (y or n)" stays in minibuffer

Previous Next

Package: emacs;

Reported by: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>

Date: Sun, 7 Oct 2018 13:34:03 UTC

Severity: wishlist

Done: Tino Calancha <tino.calancha <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Tino Calancha <tino.calancha <at> gmail.com>
To: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
Cc: 32969 <at> debbugs.gnu.org
Subject: bug#32969: "Confirm--do you mean to use ‘*’ as a wildcard? (y or n)" stays in minibuffer
Date: Mon, 08 Oct 2018 02:44:12 +0900
積丹尼 Dan Jacobson <jidanni <at> jidanni.org> writes:

> Dired has a message:
> Confirm--do you mean to use ‘*’ as a wildcard? (y or n)
> if one answers "n" the message just stays in the minibuffer.
>
> It should instead say "command aborted", else the user thinks it used
> '*' in its other (text replacement) way. Which it turns out it doesn't.
Thank you for the report!
I agree.

--8<-----------------------------cut here---------------start------------->8---
commit e76bbfa62b7185cd3284d69483704366dc54e7e8
Author: Tino Calancha <tino.calancha <at> gmail.com>
Date:   Mon Oct 8 02:40:30 2018 +0900

    dired-do-shell-command: Notify users after abort the command
    
    * lisp/dired-aux.el (dired-do-shell-command):  Notify users that
    the command have aborted when they answer 'n' to the prompt (Bug#32969).

diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el
index 1f13204b7c..a4145eb67a 100644
--- a/lisp/dired-aux.el
+++ b/lisp/dired-aux.el
@@ -763,16 +763,17 @@ dired-do-shell-command
 	            (y-or-n-p (format-message
 			       "Confirm--do you mean to use `?' as a wildcard? ")))
 	           (t))))
-    (when ok
-      (if on-each
-	  (dired-bunch-files (- 10000 (length command))
-	                     (lambda (&rest files)
-	                       (dired-run-shell-command
-                                (dired-shell-stuff-it command files t arg)))
-	                     nil file-list)
-	;; execute the shell command
-	(dired-run-shell-command
-	 (dired-shell-stuff-it command file-list nil arg)))))))
+    (cond ((not ok) (message "OK, canceled"))
+          (t
+           (if on-each
+	       (dired-bunch-files (- 10000 (length command))
+	                          (lambda (&rest files)
+	                            (dired-run-shell-command
+                                     (dired-shell-stuff-it command files t arg)))
+	                          nil file-list)
+	     ;; execute the shell command
+	     (dired-run-shell-command
+	      (dired-shell-stuff-it command file-list nil arg))))))))
 
 ;; Might use {,} for bash or csh:
 (defvar dired-mark-prefix ""

--8<-----------------------------cut here---------------end--------------->8---




This bug report was last modified 6 years and 224 days ago.

Previous Next


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