[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 1c57dc3 31/39: Better handling of errors happening on chil
From: |
Thierry Volpiatto |
Subject: |
[elpa] master 1c57dc3 31/39: Better handling of errors happening on child. |
Date: |
Wed, 18 May 2016 18:02:53 +0000 (UTC) |
branch: master
commit 1c57dc30997ac2d1bf06630238b1d517d88e573f
Author: Thierry Volpiatto <address@hidden>
Commit: Thierry Volpiatto <address@hidden>
Better handling of errors happening on child.
* dired-async.el (dired-async-create-files): Use dired-log and print its
output to dired-async-log-file.
---
dired-async.el | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/dired-async.el b/dired-async.el
index df8ea01..be6a68f 100644
--- a/dired-async.el
+++ b/dired-async.el
@@ -255,8 +255,10 @@ ESC or `q' to not overwrite any of the remaining files,
(when (string= (downcase operation) "rename")
(cl-loop for (file . to) in async-fn-list
for bf = (get-file-buffer file)
- do (and bf (with-current-buffer bf
- (set-visited-file-name to nil t))))))))
+ for destp = (file-exists-p to)
+ do (and bf destp
+ (with-current-buffer bf
+ (set-visited-file-name to nil t))))))))
;; Start async process.
(when async-fn-list
(async-start `(lambda ()
@@ -285,16 +287,17 @@ ESC or `q' to not overwrite any of the remaining files,
(condition-case err
(copy-file from to ok
dired-copy-preserve-time)
(file-date-error
- (push (dired-make-relative from)
-
dired-create-files-failures)
(dired-log "Can't set date on
%s:\n%s\n" from err)))))))
;; Now run the FILE-CREATOR function on files.
(cl-loop with fn = (quote ,file-creator)
for (from . dest) in (quote
,async-fn-list)
do (funcall fn from dest t)))
(file-error
- (with-temp-file ,dired-async-log-file
- (insert (format "%S" err)))))
+ (dired-log "%s: %s\n" (car err) (cdr err))
+ (dired-log t)
+ (with-current-buffer dired-log-buffer
+ (write-region (point-min) (point-max)
+ ,dired-async-log-file))))
,(dired-async-maybe-kill-ftp))
callback)
;; Run mode-line notifications while process running.
- [elpa] master 4d6efb9 25/39: Handle error also on host when async-list of file is empty., (continued)
- [elpa] master 4d6efb9 25/39: Handle error also on host when async-list of file is empty., Thierry Volpiatto, 2016/05/18
- [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 <=
- [elpa] master dd09794 33/39: Fix success message on callback., Thierry Volpiatto, 2016/05/18
- [elpa] master 14170a4 35/39: Add more info in mode-line on failures., Thierry Volpiatto, 2016/05/18
- [elpa] master 6e29e82 17/39: Switch to lexical-binding., Thierry Volpiatto, 2016/05/18
- [elpa] master 0e327f7 37/39: Update version number here too., Thierry Volpiatto, 2016/05/18
- [elpa] master 6521911 07/39: Merge pull request #59 from kolewu/kolewu-fix-typo-1, Thierry Volpiatto, 2016/05/18
- [elpa] master cd901e7 12/39: Improve backup-files by handling symlinks and time-stamp errors., Thierry Volpiatto, 2016/05/18
- [elpa] master e8db6cc 36/39: Update pkg file., Thierry Volpiatto, 2016/05/18
- [elpa] master 527c590 38/39: Merge commit '0e327f72bdffc5bc4a1fbc34a8da1b7066e819b3', Thierry Volpiatto, 2016/05/18
- [elpa] master 4c4eba9 19/39: Fix repetition in callback., Thierry Volpiatto, 2016/05/18
- [elpa] master 6552135 32/39: Improve how error buffer is displayed., Thierry Volpiatto, 2016/05/18