branch: externals/async
commit d395e92d2a12e8b944ccfcdc1330c8665a3187f5
Author: Thierry Volpiatto <[email protected]>
Commit: Thierry Volpiatto <[email protected]>
Use only -q flag when needed
* dired-async.el (dired-async-create-files): Do it.
---
dired-async.el | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/dired-async.el b/dired-async.el
index 1d6d563..a97a9a3 100644
--- a/dired-async.el
+++ b/dired-async.el
@@ -178,8 +178,7 @@ See `dired-create-files' for the behavior of arguments."
(setq overwrite-query nil)
(let ((total (length fn-list))
failures async-fn-list skipped callback
- ;; Fix tramp issue #80 with emacs-26
- (async-quiet-switch "-q"))
+ async-quiet-switch)
(let (to)
(dolist (from fn-list)
(setq to (funcall name-constructor from))
@@ -234,6 +233,13 @@ ESC or `q' to not overwrite any of the remaining files,
(dired-log "%s `%s' to `%s' failed\n"
operation from to)))
(push (cons from to) async-fn-list)))))
+ ;; Fix tramp issue #80 with emacs-26, use "-q" only when needed.
+ (setq async-quiet-switch
+ (if (and (boundp 'tramp-cache-read-persistent-data)
+ async-fn-list
+ (cl-loop for (from . to) in async-fn-list
+ thereis (file-remote-p to)))
+ "-q" "-Q"))
;; When failures have been printed to dired log add the date at bob.
(when (or failures skipped) (dired-log t))
;; When async-fn-list is empty that's mean only one file