[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/helm 7ad76573ee 5/7: Ask and show destinations in mcp
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/helm 7ad76573ee 5/7: Ask and show destinations in mcp |
Date: |
Wed, 21 Sep 2022 01:59:10 -0400 (EDT) |
branch: elpa/helm
commit 7ad76573eed0377f557c9bfc30e12b81d9628fcf
Author: Thierry Volpiatto <thievol@posteo.net>
Commit: Thierry Volpiatto <thievol@posteo.net>
Ask and show destinations in mcp
---
helm-files.el | 42 +++++++++++++++++++++++-------------------
1 file changed, 23 insertions(+), 19 deletions(-)
diff --git a/helm-files.el b/helm-files.el
index 22458b2657..b6f57fbd19 100644
--- a/helm-files.el
+++ b/helm-files.el
@@ -6034,25 +6034,29 @@ be directories."
(cl-incf skipped))
else do (cl-incf skipped))
(when operations
- (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)))
- (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)))))))))
+ (with-helm-display-marked-candidates
+ helm-marked-buffer-name
+ (mapcar #'abbreviate-file-name targets)
+ (when (y-or-n-p (format "Copy `%s' to directories?" file))
+ (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)))
+ (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)))))))))))
(helm-make-command-from-action helm-ff-run-mcp
"Copy the car of marked candidates to the remaining marked candidates."
- [nongnu] elpa/helm updated (0c12230b4f -> 80b3a39da3), ELPA Syncer, 2022/09/21
- [nongnu] elpa/helm 8e8efdd7fb 1/7: Make action name more explicit, ELPA Syncer, 2022/09/21
- [nongnu] elpa/helm 69ebc19e16 2/7: Make mcp asynchronous, ELPA Syncer, 2022/09/21
- [nongnu] elpa/helm 5696da5e86 3/7: Avoid asking for overwrite at each turn in mcp, ELPA Syncer, 2022/09/21
- [nongnu] elpa/helm 80b3a39da3 7/7: Stop removing inotify watchers from the callback, ELPA Syncer, 2022/09/21
- [nongnu] elpa/helm b738e7b65d 4/7: Better handling of errors in mcp, ELPA Syncer, 2022/09/21
- [nongnu] elpa/helm 7ad76573ee 5/7: Ask and show destinations in mcp,
ELPA Syncer <=
- [nongnu] elpa/helm 2ff63556c2 6/7: Mcp notifications in mode-line, ELPA Syncer, 2022/09/21