[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 204750d 081/187: Revert "* helm-async.el: Fix error handli
From: |
Michael Albinus |
Subject: |
[elpa] master 204750d 081/187: Revert "* helm-async.el: Fix error handling." |
Date: |
Wed, 30 Dec 2015 11:49:49 +0000 |
branch: master
commit 204750d5f278fb84df793e143e62110a89814d22
Author: John Wiegley <address@hidden>
Commit: John Wiegley <address@hidden>
Revert "* helm-async.el: Fix error handling."
This reverts commit 242ae734273162f4ec027618610a099c9a73557b.
---
helm-async.el | 52 ++++++++++++++++++++++++++--------------------------
1 files changed, 26 insertions(+), 26 deletions(-)
diff --git a/helm-async.el b/helm-async.el
index de5d88b..dc001a8 100644
--- a/helm-async.el
+++ b/helm-async.el
@@ -125,7 +125,7 @@ This allow to turn off async features provided to this
package."
(unless (> (length processes) 1)
(helm-async-mode -1))))
-(defun helm-async-after-file-create (len-flist)
+(defun helm-async-after-file-create ()
"Callback function used for operation handled by `dired-create-file'."
(unless (helm-async-processes)
;; Turn off mode-line notification
@@ -141,8 +141,8 @@ This allow to turn off async features provided to this
package."
(delete-file helm-async-log-file))
(run-with-timer
0.1 nil
- helm-async-message-function "Asynchronous %s of %s file(s) on %s
file(s) done"
- (car helm-async-operation) (cadr helm-async-operation) len-flist))))
+ 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."
@@ -182,8 +182,8 @@ old file was marked."
(setq helm-async-operation nil)
(let (dired-create-files-failures failures async-fn-list
skipped (success-count 0) (total (length fn-list))
- (callback `(lambda (&optional ignore)
- (helm-async-after-file-create ,(length fn-list)))))
+ (callback '(lambda (&optional ignore)
+ (helm-async-after-file-create))))
(let (to overwrite-query
overwrite-backup-query) ; for dired-handle-overwrite
(dolist (from fn-list)
@@ -263,7 +263,19 @@ ESC or `q' to not overwrite any of the remaining files,
failures)
(dired-log "%s `%s' to `%s' failed:\n%s\n"
operation from to err)))))))))
- ;; Handle error happening in host emacs.
+ (when (and async-fn-list helm-async-be-async)
+ (async-start `(lambda ()
+ (require 'cl) (require 'dired-aux)
+ ,(async-inject-variables helm-async-env-variables-regexp)
+ (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
(dired-create-files-failures
(setq failures (nconc failures dired-create-files-failures))
@@ -285,26 +297,14 @@ ESC or `q' to not overwrite any of the remaining files,
operation (length skipped) total
(dired-plural-s total))
skipped))
- (t (message "%s: %s file%s"
- operation success-count (dired-plural-s success-count))))
- ;; Start async process.
- (when (and async-fn-list helm-async-be-async)
- (async-start `(lambda ()
- (require 'cl) (require 'dired-aux)
- ,(async-inject-variables helm-async-env-variables-regexp)
- (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)
- ;; Run mode-line notifications while process running.
- (helm-async-mode 1)
- (setq helm-async-operation (list operation (length async-fn-list)))
- (message "%s proceeding asynchronously..." operation)))
+ (t
+ (if (and async-fn-list helm-async-be-async)
+ (progn
+ (helm-async-mode 1)
+ (setq helm-async-operation (list operation (length fn-list)))
+ (message "%s proceeding asynchronously..." operation))
+ (message "%s: %s file%s"
+ operation success-count (dired-plural-s success-count))))))
(unless helm-async-be-async
(dired-move-to-filename)))
- [elpa] master bcffaeb 067/187: * helm-async.el (dired-create-file): Revert changes in fb8f10b., (continued)
- [elpa] master bcffaeb 067/187: * helm-async.el (dired-create-file): Revert changes in fb8f10b., Michael Albinus, 2015/12/30
- [elpa] master 8e05e02 070/187: Prevent accidental creation of lexical closures., Michael Albinus, 2015/12/30
- [elpa] master 9c02acd 069/187: Add test for #17., Michael Albinus, 2015/12/30
- [elpa] master 5ef546a 071/187: Have test file add its own directory to load path, Michael Albinus, 2015/12/30
- [elpa] master 242ae73 068/187: * helm-async.el: Fix error handling., Michael Albinus, 2015/12/30
- [elpa] master 93b05a9 073/187: More robust evaluation and closure-protection of start-func, Michael Albinus, 2015/12/30
- [elpa] master ba705c6 076/187: Add test for handling different ways of passing a function, Michael Albinus, 2015/12/30
- [elpa] master b6d990d 075/187: Add lexbind test, Michael Albinus, 2015/12/30
- [elpa] master f6d7a74 074/187: Merge pull request #18 from DarwinAwardWinner/lexbind-fix, Michael Albinus, 2015/12/30
- [elpa] master 9b5bb5c 072/187: Add more comprehensive testing for anti-closure feature, Michael Albinus, 2015/12/30
- [elpa] master 204750d 081/187: Revert "* helm-async.el: Fix error handling.",
Michael Albinus <=
- [elpa] master b05c63a 083/187: Don't rely on async.el being in load-path., Michael Albinus, 2015/12/30
- [elpa] master 374f514 079/187: Complete the docstring for "async--get-function", Michael Albinus, 2015/12/30
- [elpa] master 9704eb8 080/187: Merge pull request #21 from DarwinAwardWinner/lexbind-fix, Michael Albinus, 2015/12/30
- [elpa] master 4a7b07b 084/187: Merge pull request #23 from DarwinAwardWinner/no-load-path-fix, Michael Albinus, 2015/12/30
- [elpa] master 2a532d3 077/187: Replace closure prevention with closure sanitation, Michael Albinus, 2015/12/30
- [elpa] master f18c735 078/187: Merge pull request #19 from DarwinAwardWinner/lexbind-fix, Michael Albinus, 2015/12/30
- [elpa] master 3f751fb 082/187: Revert master back to 242ae73, Michael Albinus, 2015/12/30
- [elpa] master eff5419 088/187: Rename helm-async.el to dired-async.el, Michael Albinus, 2015/12/30
- [elpa] master ec8decc 090/187: * dired-async.el (helm-async-be-async): alias for dired-async-be-async., Michael Albinus, 2015/12/30
- [elpa] master 5ff0f9b 087/187: * helm-async.el: Use cl-lib instead of cl., Michael Albinus, 2015/12/30