emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] master 4d6efb9 25/39: Handle error also on host when async-list o


From: Thierry Volpiatto
Subject: [elpa] master 4d6efb9 25/39: Handle error also on host when async-list of file is empty.
Date: Wed, 18 May 2016 18:02:53 +0000 (UTC)

branch: master
commit 4d6efb904538c7e6fe89fba5741c818427a30ef2
Author: Thierry Volpiatto <address@hidden>
Commit: Thierry Volpiatto <address@hidden>

    Handle error also on host when async-list of file is empty.
    
    * dired-async.el (dired-async-create-files): Do it.
    When only one file and user answer no handle error on host.
---
 dired-async.el |   17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/dired-async.el b/dired-async.el
index c4dca08..c18ec53 100644
--- a/dired-async.el
+++ b/dired-async.el
@@ -229,6 +229,23 @@ ESC or `q' to not overwrite any of the remaining files,
                         (dired-log "%s `%s' to `%s' failed"
                                    operation from to)))
                   (push (cons from to) async-fn-list)))))
+      ;; When async-fn-list is empty that's mean only one file
+      ;; had to be copied and user finally answer NO.
+      ;; In this case async process will never start and callback
+      ;; will have no chance to run, so notify failures here.
+      (unless async-fn-list
+        (cond (failures
+               (funcall dired-async-message-function
+                        "%s failed for %d of %d file%s"
+                        'dired-async-failures
+                        operation (length failures)
+                        total (dired-plural-s total)))
+              (skipped
+               (funcall dired-async-message-function
+                        "%s: %d of %d file%s skipped"
+                        'dired-async-failures
+                        operation (length skipped) total
+                        (dired-plural-s total)))))
       ;; Setup callback.
       (setq callback
             (lambda (&optional _ignore)



reply via email to

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