[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)
- [elpa] master 1ce4381 10/39: Allow reproducing "cp --backup=numbered from to"., (continued)
- [elpa] master 1ce4381 10/39: Allow reproducing "cp --backup=numbered from to"., Thierry Volpiatto, 2016/05/18
- [elpa] master 2bfd6a0 15/39: Ensure dired-copy-preserve-time is passed to child with its current value., Thierry Volpiatto, 2016/05/18
- [elpa] master 4f6b98d 24/39: Fix operation arg of callback., Thierry Volpiatto, 2016/05/18
- [elpa] master a7e8cf3 30/39: When failures have been printed to dired log add the date at bob., Thierry Volpiatto, 2016/05/18
- [elpa] master dc63e41 27/39: Revert last commit., Thierry Volpiatto, 2016/05/18
- [elpa] master c9ddbbc 11/39: Merge pull request #62 from jwiegley/backup_files, Thierry Volpiatto, 2016/05/18
- [elpa] master ed05631 03/39: Assign copyrights to the FSF, add autoloads file, Thierry Volpiatto, 2016/05/18
- [elpa] master e35506f 18/39: Remove unuseful code never called., Thierry Volpiatto, 2016/05/18
- [elpa] master af8933d 20/39: Unquote all callbacks., Thierry Volpiatto, 2016/05/18
- [elpa] master a48e509 28/39: Ensure a new line is added when printing to dired log buffer., Thierry Volpiatto, 2016/05/18
- [elpa] master 4d6efb9 25/39: Handle error also on host when async-list of file is empty.,
Thierry Volpiatto <=
- [elpa] master 8632abd 39/39: Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs/elpa, Thierry Volpiatto, 2016/05/18
- [elpa] master 8d1a26d 29/39: Remove unused commented code., Thierry Volpiatto, 2016/05/18
- [elpa] master 228ec4b 34/39: Handle errors file by file instead of returning on first error., Thierry Volpiatto, 2016/05/18
- [elpa] master 0b8fbed 23/39: Remove commented line, no code change., Thierry Volpiatto, 2016/05/18
- [elpa] master 3ec3fb6 02/39: Declare package-alist in async-bytecomp.., Thierry Volpiatto, 2016/05/18
- [elpa] master dd77b81 22/39: Fix formatting the help form in dired-create-files., Thierry Volpiatto, 2016/05/18
- [elpa] master 8d27590 21/39: Finally handle the failures correctly., Thierry Volpiatto, 2016/05/18
- [elpa] master 1763517 14/39: Add comment no code change., Thierry Volpiatto, 2016/05/18
- [elpa] master 9a82294 26/39: DRY use apply., Thierry Volpiatto, 2016/05/18
- [elpa] master 1c57dc3 31/39: Better handling of errors happening on child., Thierry Volpiatto, 2016/05/18