emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/helm 3ecf8aaf84: Notify dired-async--modeline-mode we are


From: ELPA Syncer
Subject: [nongnu] elpa/helm 3ecf8aaf84: Notify dired-async--modeline-mode we are running a dired-async-process
Date: Sun, 29 Jan 2023 09:59:29 -0500 (EST)

branch: elpa/helm
commit 3ecf8aaf84afd36753c6f75fd706f99435f433c4
Author: Thierry Volpiatto <thievol@posteo.net>
Commit: Thierry Volpiatto <thievol@posteo.net>

    Notify dired-async--modeline-mode we are running a dired-async-process
---
 helm-files.el | 54 ++++++++++++++++++++++++++++--------------------------
 1 file changed, 28 insertions(+), 26 deletions(-)

diff --git a/helm-files.el b/helm-files.el
index 3327c89e4a..eb05da9070 100644
--- a/helm-files.el
+++ b/helm-files.el
@@ -6189,32 +6189,34 @@ be directories."
           (mapcar #'abbreviate-file-name targets)
           (if (y-or-n-p (format "Copy `%s' to directories?" (helm-basename 
file)))
               (progn
-                (async-start
-                 `(lambda ()
-                    (require 'cl-lib)
-                    (cl-loop with copies = 0
-                             with skipped = ,skipped
-                             for (file dest overwrite) in ',operations
-                             do (condition-case _err
-                                    (progn
-                                      (copy-file file dest overwrite)
-                                      (cl-incf copies))
-                                  (file-error (cl-incf skipped)))
-                             finally return (list file copies skipped)))
-                 (lambda (result)
-                   (let ((copied (nth 1 result)))
-                     (dired-async--modeline-mode -1)
-                     (run-with-idle-timer
-                      0.1 nil
-                      (lambda ()                    
-                        (dired-async-mode-line-message
-                         "Mcp done, %s %s of %s done, %s files skipped"
-                         'dired-async-message
-                         copied
-                         (if (> copied 1)
-                             "copies" "copy")
-                         (helm-basename (nth 0 result))
-                         (nth 2 result)))))))
+                (process-put
+                 (async-start
+                  `(lambda ()
+                     (require 'cl-lib)
+                     (cl-loop with copies = 0
+                              with skipped = ,skipped
+                              for (file dest overwrite) in ',operations
+                              do (condition-case _err
+                                     (progn
+                                       (copy-file file dest overwrite)
+                                       (cl-incf copies))
+                                   (file-error (cl-incf skipped)))
+                              finally return (list file copies skipped)))
+                  (lambda (result)
+                    (let ((copied (nth 1 result)))
+                      (dired-async--modeline-mode -1)
+                      (run-with-idle-timer
+                       0.1 nil
+                       (lambda ()                    
+                         (dired-async-mode-line-message
+                          "Mcp done, %s %s of %s done, %s files skipped"
+                          'dired-async-message
+                          copied
+                          (if (> copied 1)
+                              "copies" "copy")
+                          (helm-basename (nth 0 result))
+                          (nth 2 result)))))))
+                 'dired-async-process t)
                 (dired-async--modeline-mode 1))
             (message "Operation aborted")))))))
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]