[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master c472c4a 036/187: * helm-async.el Return file errors in chi
From: |
Michael Albinus |
Subject: |
[elpa] master c472c4a 036/187: * helm-async.el Return file errors in child Emacs. |
Date: |
Wed, 30 Dec 2015 11:49:32 +0000 |
branch: master
commit c472c4ae561cd61589f07ddb876b9eb65e18a114
Author: Thierry Volpiatto <address@hidden>
Commit: Thierry Volpiatto <address@hidden>
* helm-async.el Return file errors in child Emacs.
---
helm-async.el | 26 +++++++++++++++++++++-----
1 files changed, 21 insertions(+), 5 deletions(-)
diff --git a/helm-async.el b/helm-async.el
index 3cb40b3..9fe680e 100644
--- a/helm-async.el
+++ b/helm-async.el
@@ -59,6 +59,11 @@ Should take same args as `message'."
:group 'helm-async
:type 'function)
+(defcustom helm-async-log-file "/tmp/helm-async.log"
+ "Where file errors are printed."
+ :group 'helm-async
+ :type 'string)
+
(defface helm-async-message
'((t (:foreground "yellow")))
"Face used for mode-line message.")
@@ -86,8 +91,15 @@ Should take same args as `message'."
"Callback function used for operation handled by `dired-create-file'."
(helm-async-mode -1)
(when helm-async-operation
- (funcall helm-async-message-function "Asynchronous %s of %s file(s) done"
- (car helm-async-operation) (cadr helm-async-operation))))
+ (if (file-exists-p helm-async-log-file)
+ (progn
+ (pop-to-buffer (get-buffer-create "*helm async*"))
+ (erase-buffer)
+ (insert "Error: ")
+ (insert-file-contents helm-async-log-file)
+ (delete-file helm-async-log-file))
+ (funcall helm-async-message-function "Asynchronous %s of %s file(s)
done"
+ (car helm-async-operation) (cadr helm-async-operation)))))
(defun helm-async-maybe-kill-ftp ()
"Return a form to kill ftp process in child emacs."
@@ -186,9 +198,13 @@ ESC or `q' to not overwrite any of the remaining files,
(async-start `(lambda ()
(require 'cl) (require 'dired-aux)
,(async-inject-variables helm-async-env-variables-regexp)
- (let ((dired-recursive-copies (quote always)))
- (loop for (f . d) in (quote ,async-fn-list)
- do (funcall (quote ,file-creator) f d t)))
+ (condition-case err
+ (let ((dired-recursive-copies (quote always)))
+ (loop for (f . d) in (quote ,async-fn-list)
+ do (funcall (quote ,file-creator) f d t)))
+ (file-error
+ (with-temp-file ,helm-async-log-file
+ (insert (format "%S" err)))))
,(helm-async-maybe-kill-ftp))
callback)
(cond
- [elpa] master 3f870f5 028/187: Show ops in progress `dired-async-in-process-face', (continued)
- [elpa] master 3f870f5 028/187: Show ops in progress `dired-async-in-process-face', Michael Albinus, 2015/12/30
- [elpa] master 1cec376 030/187: Added async-sandbox, Michael Albinus, 2015/12/30
- [elpa] master 24811ee 027/187: Show full backtraces if `async-debug' is non-nil, Michael Albinus, 2015/12/30
- [elpa] master 15f737f 032/187: Propagate non-zero exit codes as errors, Michael Albinus, 2015/12/30
- [elpa] master eda8d32 035/187: * helm-async.el (dired-create-file): Use quote., Michael Albinus, 2015/12/30
- [elpa] master ec1f0e8 034/187: * helm-async.el: let-bind dired-recursive-copies to 'always to avoid hanging on child., Michael Albinus, 2015/12/30
- [elpa] master acb0885 031/187: Several minor fixes, Michael Albinus, 2015/12/30
- [elpa] master 49f8b81 038/187: * helm-async.el: Update copyright, Michael Albinus, 2015/12/30
- [elpa] master 416c73a 037/187: * helm-async.el (helm-async-be-async): New, allow turning off async., Michael Albinus, 2015/12/30
- [elpa] master 2db438b 029/187: dired-async now shows progress using overlays, Michael Albinus, 2015/12/30
- [elpa] master c472c4a 036/187: * helm-async.el Return file errors in child Emacs.,
Michael Albinus <=
- [elpa] master eb26295 033/187: * helm-async.el: New, redefine dired-create-file to work with helm and dired., Michael Albinus, 2015/12/30
- [elpa] master c35324c 043/187: Async queue handling has to happen in dired-async, Michael Albinus, 2015/12/30
- [elpa] master ac1b896 040/187: Minor touches, Michael Albinus, 2015/12/30
- [elpa] master ad07ff3 039/187: Merge pull request #1 from thierryvolpiatto/master, Michael Albinus, 2015/12/30
- [elpa] master 6941276 046/187: * helm-async.el (helm-async-processes): use process-name., Michael Albinus, 2015/12/30
- [elpa] master 1647b97 047/187: * async.el (async-start): Use the possible true name of emacs executable., Michael Albinus, 2015/12/30
- [elpa] master 9779abc 044/187: Fix github issue 2, Michael Albinus, 2015/12/30
- [elpa] master 96cbe3a 048/187: Fix missing optional arguments when calling `async-copy-file' in `async-dired.el'., Michael Albinus, 2015/12/30
- [elpa] master 819b936 045/187: * helm-async.el: Turn off mode-line notification only when last process end., Michael Albinus, 2015/12/30
- [elpa] master 9361417 041/187: Started work on a generalized async-file service, Michael Albinus, 2015/12/30