[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 9779abc 044/187: Fix github issue 2
From: |
Michael Albinus |
Subject: |
[elpa] master 9779abc 044/187: Fix github issue 2 |
Date: |
Wed, 30 Dec 2015 11:49:35 +0000 |
branch: master
commit 9779abc87581cd6570b1557309cb10c16c3949e1
Author: John Wiegley <address@hidden>
Commit: John Wiegley <address@hidden>
Fix github issue 2
---
dired-async.el | 47 +++++++++++++----------------------------------
1 files changed, 13 insertions(+), 34 deletions(-)
diff --git a/dired-async.el b/dired-async.el
index fc2f65a..4e96ca9 100644
--- a/dired-async.el
+++ b/dired-async.el
@@ -78,21 +78,22 @@
(require 'dired-aux)
(require 'async)
+(require 'async-file)
(defgroup dired-async nil
"Copy/move/delete asynchronously in dired"
:group 'dired)
-(defcustom dired-async-use-native-commands nil
- "If non-nil, use native cp/mv/rm commands for local-only files."
- :type 'boolean
- :group 'dired-async)
-
(defface dired-async-in-process-face
'((t (:background "yellow")))
"Face used to show that an asynchronous operation is in progress."
:group 'dired-async)
+(defvar dired-async-queue nil
+ "Queue of pending asynchronous file operations.
+Each operation that succeeds will start the next member of the queue. If an
+error occurs at any point, the rest of the queue is flushed.")
+
(defun dired-async-highlight-file (file)
(save-excursion
(dired-goto-file file)
@@ -137,46 +138,24 @@
`(lambda (&optional ignore)
(dired-after-file-create ,to ,actual-marker-char
,overwrite))
- 'ignore)))
+ (lambda (&optional ignore)))))
(if (and recursive
(eq t (car attrs))
(or (eq recursive 'always)
(yes-or-no-p (format "Recursive copies of %s? " from))))
;; This is a directory.
(dired-async-wrap-call from callback
- (if (and dired-async-use-native-commands
- (not (file-remote-p from))
- (not (file-remote-p to)))
- (let ((args (list "-fR" from to)))
- (if preserve-time
- (setq args (cons "-p" args)))
- (unless ok-flag
- (setq args (cons "-n" args)))
- (apply #'async-start-process "cp" (executable-find "cp")
- callback args))
- (async-start (apply-partially #'copy-directory from to
- preserve-time)
- callback)))
+ (async-copy-file from to ok-flag preserve-time
+ :callback callback))
;; Not a directory.
(or top (dired-handle-overwrite to))
(condition-case err
(if (stringp (car attrs))
;; It is a symlink
(make-symbolic-link (car attrs) to ok-flag)
- (if (and dired-async-use-native-commands
- (not (file-remote-p from))
- (not (file-remote-p to)))
- (let ((args (list "-f" from to)))
- (if preserve-time
- (setq args (cons "-p" args)))
- (unless ok-flag
- (setq args (cons "-n" args)))
- (apply #'async-start-process "cp" (executable-find "cp")
- callback args))
- (dired-async-wrap-call from callback
- (async-start (apply-partially #'copy-file from to ok-flag
- preserve-time)
- callback))))
+ (dired-async-wrap-call from callback
+ (async-copy-file from to ok-flag preserve-time
+ :callback callback)))
(file-date-error
(push (dired-make-relative from)
dired-create-files-failures)
@@ -198,7 +177,7 @@
(dired-after-file-create ,newname ,actual-marker-char
,overwrite))
- 'ignore)))
+ (lambda (&optional ignore)))))
(if (and dired-async-use-native-commands
(not (file-remote-p file))
(not (file-remote-p newname)))
- [elpa] master 49f8b81 038/187: * helm-async.el: Update copyright, (continued)
- [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, 2015/12/30
- [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 <=
- [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
- [elpa] master 3cc71f3 051/187: * helm-async.el (helm-async-mode): ding when finish., Michael Albinus, 2015/12/30
- [elpa] master d9d68f7 049/187: Merge pull request #5 from mstrlu/fix-async-copy-call, Michael Albinus, 2015/12/30
- [elpa] master bd43f86 053/187: * helm-async.el (dired-create-files): Honor dired-overwrite-confirmed., Michael Albinus, 2015/12/30
- [elpa] master fba2cb9 052/187: Merge branch 'master' of github.com:jwiegley/emacs-async, Michael Albinus, 2015/12/30
- [elpa] master 42fba8d 050/187: * dired-async.el: Add a defvar for `dired-async-use-native-commands', Michael Albinus, 2015/12/30
- [elpa] master 0afa685 056/187: Merge pull request #11 from myuhe/pkg, Michael Albinus, 2015/12/30
- [elpa] master 34ee9c5 054/187: * helm-async.el (dired-create-file): Fix operation is executed even when replying no for overwriting., Michael Albinus, 2015/12/30