emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs-26 a7ebc6b: dired-do-shell-command: Notify users aft


From: Tino Calancha
Subject: [Emacs-diffs] emacs-26 a7ebc6b: dired-do-shell-command: Notify users after abort the command
Date: Thu, 11 Oct 2018 04:27:12 -0400 (EDT)

branch: emacs-26
commit a7ebc6bf633bd3849ccab032dad6b1fd31b1ef43
Author: Tino Calancha <address@hidden>
Commit: Tino Calancha <address@hidden>

    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).
---
 lisp/dired-aux.el | 21 +++++++++++----------
 1 file changed, 11 insertions(+), 10 deletions(-)

diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el
index 516cd2c..e406273 100644
--- a/lisp/dired-aux.el
+++ b/lisp/dired-aux.el
@@ -757,16 +757,17 @@ can be produced by `dired-get-marked-files', for example."
                    (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 "Command 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 ""



reply via email to

[Prev in Thread] Current Thread [Next in Thread]