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

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

[nongnu] elpa/helm 2ff63556c2 6/7: Mcp notifications in mode-line


From: ELPA Syncer
Subject: [nongnu] elpa/helm 2ff63556c2 6/7: Mcp notifications in mode-line
Date: Wed, 21 Sep 2022 01:59:10 -0400 (EDT)

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

    Mcp notifications in mode-line
---
 helm-files.el | 20 +++++++++++++++-----
 1 file changed, 15 insertions(+), 5 deletions(-)

diff --git a/helm-files.el b/helm-files.el
index b6f57fbd19..394a80e708 100644
--- a/helm-files.el
+++ b/helm-files.el
@@ -84,6 +84,8 @@
 (declare-function tramp-make-tramp-file-name "tramp")
 (declare-function tramp-cleanup-connection "tramp-cmds")
 (declare-function dired-async-processes "ext:dired-async.el")
+(declare-function dired-async-mode-line-message "ext:dired-async.el")
+(declare-function dired-async--modeline-mode "ext:dired-async.el")
 (declare-function all-the-icons-icon-for-file "ext:all-the-icons.el")
 (declare-function all-the-icons-octicon "ext:all-the-icons.el")
 (declare-function all-the-icons-match-to-alist "ext:all-the-icons.el")
@@ -6052,11 +6054,19 @@ be directories."
                          finally return (list file copies skipped)))
              (lambda (result)
                (let ((copied (nth 1 result)))
-                 (message "Mcp done, %s %s of %s done, %s files skipped"
-                          copied (if (> copied 1)
-                                     "copies" "copy")
-                          (helm-basename (nth 0 result))
-                          (nth 2 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--modeline-mode 1)))))))
 
 (helm-make-command-from-action helm-ff-run-mcp
     "Copy the car of marked candidates to the remaining marked candidates."



reply via email to

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