[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master aabc7b4 086/187: * helm-async.el: Rename all with dired-as
From: |
Michael Albinus |
Subject: |
[elpa] master aabc7b4 086/187: * helm-async.el: Rename all with dired-async prefix instead of helm-async. |
Date: |
Wed, 30 Dec 2015 11:49:51 +0000 |
branch: master
commit aabc7b44df66938b7650475351ee4d4a1973ee71
Author: Thierry Volpiatto <address@hidden>
Commit: Thierry Volpiatto <address@hidden>
* helm-async.el: Rename all with dired-async prefix instead of helm-async.
---
helm-async.el | 74 ++++++++++++++++++++++++++++----------------------------
1 files changed, 37 insertions(+), 37 deletions(-)
diff --git a/helm-async.el b/helm-async.el
index de5d88b..3073e15 100644
--- a/helm-async.el
+++ b/helm-async.el
@@ -50,55 +50,55 @@
(eval-when-compile
(defvar async-callback))
-(defvar helm-async-operation nil)
+(defvar dired-async-operation nil)
(defgroup helm-async nil
"Copy rename files asynchronously from helm or dired."
:group 'helm)
-(defcustom helm-async-env-variables-regexp
+(defcustom dired-async-env-variables-regexp
"\\`\\(tramp-\\(default\\|connection\\|remote\\)\\|ange-ftp\\)-.*"
"Variables matching this regexp will be loaded on Child Emacs."
:type 'regexp
:group 'helm-async)
-(defcustom helm-async-message-function 'helm-async-mode-line-message
+(defcustom dired-async-message-function 'dired-async-mode-line-message
"Function to use to notify result when operation finish.
Should take same args as `message'."
:group 'helm-async
:type 'function)
-(defcustom helm-async-log-file "/tmp/helm-async.log"
+(defcustom dired-async-log-file "/tmp/helm-async.log"
"File use to communicate errors from Child Emacs to host Emacs."
:group 'helm-async
:type 'string)
-(defcustom helm-async-be-async t
+(defcustom dired-async-be-async t
"When non--nil make `dired-create-file' async.
This allow to turn off async features provided to this package."
:group 'helm-async
:type 'boolean)
-(defface helm-async-message
+(defface dired-async-message
'((t (:foreground "yellow")))
"Face used for mode-line message."
:group 'helm-async)
-(defface helm-async-mode-message
+(defface dired-async-mode-message
'((t (:background "Firebrick1")))
- "Face used for `helm-async-mode' lighter."
+ "Face used for `dired-async-mode' lighter."
:group 'helm-async)
-(define-minor-mode helm-async-mode
+(define-minor-mode dired-async-mode
"Notify mode-line that an async process run."
:group 'helm-async
:global t
:lighter (:eval (propertize " [Async job running]"
- 'face 'helm-async-mode-message))
- (unless helm-async-mode
+ 'face 'dired-async-mode-message))
+ (unless dired-async-mode
(let ((visible-bell t)) (ding))))
-(defun helm-async-mode-line-message (text &rest args)
+(defun dired-async-mode-line-message (text &rest args)
"Notify end of operation in `mode-line'."
(message nil)
(let ((mode-line-format (concat
@@ -106,45 +106,45 @@ This allow to turn off async features provided to this
package."
(if args
(apply #'format text args)
text)
- 'face 'helm-async-message))))
+ 'face 'dired-async-message))))
(force-mode-line-update)
(sit-for 3)
(force-mode-line-update)))
-(defun helm-async-processes ()
+(defun dired-async-processes ()
(loop for p in (process-list)
when (loop for c in (process-command p) thereis
(string= "async-batch-invoke" c))
collect p))
-(defun helm-async-kill-process ()
+(defun dired-async-kill-process ()
(interactive)
- (let* ((processes (helm-async-processes))
+ (let* ((processes (dired-async-processes))
(proc (car (last processes))))
(delete-process proc)
(unless (> (length processes) 1)
- (helm-async-mode -1))))
+ (dired-async-mode -1))))
-(defun helm-async-after-file-create (len-flist)
+(defun dired-async-after-file-create (len-flist)
"Callback function used for operation handled by `dired-create-file'."
- (unless (helm-async-processes)
+ (unless (dired-async-processes)
;; Turn off mode-line notification
;; only when last process end.
- (helm-async-mode -1))
- (when helm-async-operation
- (if (file-exists-p helm-async-log-file)
+ (dired-async-mode -1))
+ (when dired-async-operation
+ (if (file-exists-p dired-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))
+ (insert-file-contents dired-async-log-file)
+ (delete-file dired-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))))
+ dired-async-message-function "Asynchronous %s of %s file(s) on %s
file(s) done"
+ (car dired-async-operation) (cadr dired-async-operation) len-flist))))
-(defun helm-async-maybe-kill-ftp ()
+(defun dired-async-maybe-kill-ftp ()
"Return a form to kill ftp process in child emacs."
(quote
(progn
@@ -179,11 +179,11 @@ corresponding new file name or nil to skip.
Optional MARKER-CHAR is a character with which to mark every
newfile's entry, or t to use the current marker character if the
old file was marked."
- (setq helm-async-operation nil)
+ (setq dired-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)))))
+ (dired-async-after-file-create ,(length fn-list)))))
(let (to overwrite-query
overwrite-backup-query) ; for dired-handle-overwrite
(dolist (from fn-list)
@@ -237,7 +237,7 @@ ESC or `q' to not overwrite any of the remaining files,
(file-in-directory-p destname from)
(error "Cannot copy `%s' into its subdirectory `%s'"
from to)))
- (if helm-async-be-async
+ (if dired-async-be-async
(if overwrite
(or (and dired-overwrite-confirmed
(push (cons from to) async-fn-list))
@@ -288,24 +288,24 @@ ESC or `q' to not overwrite any of the remaining files,
(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)
+ (when (and async-fn-list dired-async-be-async)
(async-start `(lambda ()
(require 'cl) (require 'dired-aux)
- ,(async-inject-variables helm-async-env-variables-regexp)
+ ,(async-inject-variables
dired-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
+ (with-temp-file ,dired-async-log-file
(insert (format "%S" err)))))
- ,(helm-async-maybe-kill-ftp))
+ ,(dired-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)))
+ (dired-async-mode 1)
+ (setq dired-async-operation (list operation (length async-fn-list)))
(message "%s proceeding asynchronously..." operation)))
- (unless helm-async-be-async
+ (unless dired-async-be-async
(dired-move-to-filename)))
- [elpa] master b05c63a 083/187: Don't rely on async.el being in load-path., (continued)
- [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
- [elpa] master aabc7b4 086/187: * helm-async.el: Rename all with dired-async prefix instead of helm-async.,
Michael Albinus <=
- [elpa] master a37e1db 089/187: * dired-async.el: Finish converting all names to dired*., Michael Albinus, 2015/12/30
- [elpa] master b311374 092/187: * dired-async.el (dired-async-mode): Notify number of jobs running in lighter., Michael Albinus, 2015/12/30
- [elpa] master b514e21 093/187: * async-test.el: Remove now unnecessary tests., Michael Albinus, 2015/12/30
- [elpa] master 4d14cbb 094/187: * async-test.el: Update copyrights., Michael Albinus, 2015/12/30
- [elpa] master 3712607 097/187: * smtpmail-async.el: Exclude some vars when injecting (#22)., Michael Albinus, 2015/12/30
- [elpa] master a0195ad 104/187: Fix markdown in README, Michael Albinus, 2015/12/30
- [elpa] master 3a23aa1 095/187: * dired-async.el (helm-async-be-async): Move it as obsolete variable alias to helm., Michael Albinus, 2015/12/30
- [elpa] master eaa0ec1 098/187: * smtpmail-async.el: Fix encoding problems (#27), Michael Albinus, 2015/12/30
- [elpa] master 05c9861 103/187: * smtpmail-async.el (async-smtpmail-before-send-hook): Add docstring., Michael Albinus, 2015/12/30
- [elpa] master b2b4bd6 107/187: * async-bytecomp.el: New file., Michael Albinus, 2015/12/30