[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/async d6222c2 22/60: Ensure wdired-use-interactive-rena
From: |
Stefan Monnier |
Subject: |
[elpa] externals/async d6222c2 22/60: Ensure wdired-use-interactive-rename is disabled. |
Date: |
Tue, 8 Oct 2019 10:11:30 -0400 (EDT) |
branch: externals/async
commit d6222c2959caaca5c4980038756097da8a51e505
Author: Thierry Volpiatto <address@hidden>
Commit: Thierry Volpiatto <address@hidden>
Ensure wdired-use-interactive-rename is disabled.
* dired-async.el (dired-async-wdired-do-renames): New advice.
(wdired-do-renames): Same.
(dired-async-mode): Add new advice.
---
dired-async.el | 25 +++++++++++++++++++++----
1 file changed, 21 insertions(+), 4 deletions(-)
diff --git a/dired-async.el b/dired-async.el
index ed37953..a68098a 100644
--- a/dired-async.el
+++ b/dired-async.el
@@ -310,6 +310,19 @@ ESC or `q' to not overwrite any of the remaining files,
(dired-async--modeline-mode 1)
(message "%s proceeding asynchronously..." operation))))
+(defvar wdired-use-interactive-rename)
+(defun dired-async-wdired-do-renames (old-fn &rest args)
+ ;; Perhaps a better fix would be to ask for renaming BEFORE starting
+ ;; OLD-FN when `wdired-use-interactive-rename' is non-nil. For now
+ ;; just bind it to nil to ensure no questions will be asked between
+ ;; each rename.
+ (let (wdired-use-interactive-rename)
+ (apply old-fn args)))
+
+(defadvice wdired-do-renames (around wdired-async)
+ (let (wdired-use-interactive-rename)
+ ad-do-it))
+
(defadvice dired-create-files (around dired-async)
(dired-async-create-files file-creator operation fn-list
name-constructor marker-char))
@@ -321,11 +334,15 @@ ESC or `q' to not overwrite any of the remaining files,
:global t
(if dired-async-mode
(if (fboundp 'advice-add)
- (advice-add 'dired-create-files :override #'dired-async-create-files)
- (ad-activate 'dired-create-files))
+ (progn (advice-add 'dired-create-files :override
#'dired-async-create-files)
+ (advice-add 'wdired-do-renames :around
#'dired-async-wdired-do-renames))
+ (ad-activate 'dired-create-files)
+ (ad-activate 'wdired-do-renames))
(if (fboundp 'advice-remove)
- (advice-remove 'dired-create-files #'dired-async-create-files)
- (ad-deactivate 'dired-create-files))))
+ (progn (advice-remove 'dired-create-files #'dired-async-create-files)
+ (advice-remove 'wdired-do-renames
#'dired-async-wdired-do-renames))
+ (ad-deactivate 'dired-create-files)
+ (ad-deactivate 'wdired-do-renames))))
(provide 'dired-async)
- [elpa] externals/async 8bc0678 01/60: Fix home url in *pkg.el., (continued)
- [elpa] externals/async 8bc0678 01/60: Fix home url in *pkg.el., Stefan Monnier, 2019/10/08
- [elpa] externals/async a2196f7 03/60: Add `async-let' macro, Stefan Monnier, 2019/10/08
- [elpa] externals/async 1dd865c 09/60: Add some documentation in README for async-let., Stefan Monnier, 2019/10/08
- [elpa] externals/async 57f5d81 06/60: Allow passing multiple forms to async-let, Stefan Monnier, 2019/10/08
- [elpa] externals/async 31b1691 02/60: Don't query in set-visited-file-name., Stefan Monnier, 2019/10/08
- [elpa] externals/async 8242878 08/60: Merge pull request #69 from jwiegley/async_let, Stefan Monnier, 2019/10/08
- [elpa] externals/async 2018523 15/60: Inject nsm-* vars in smtp-mail for emacs-25+ (#75)., Stefan Monnier, 2019/10/08
- [elpa] externals/async 666066d 14/60: Merge pull request #72 from jwiegley/Fix_async_ready, Stefan Monnier, 2019/10/08
- [elpa] externals/async 54977d6 10/60: Improve formatting in README., Stefan Monnier, 2019/10/08
- [elpa] externals/async e1a3735 20/60: Merge branch 'master' of github.com:jwiegley/emacs-async, Stefan Monnier, 2019/10/08
- [elpa] externals/async d6222c2 22/60: Ensure wdired-use-interactive-rename is disabled.,
Stefan Monnier <=
- [elpa] externals/async d422df5 24/60: Add new var to allow calling emacs with -Q or -q (#80)., Stefan Monnier, 2019/10/08
- [elpa] externals/async c3b297f 27/60: Merge pull request #83 from darkfeline/lighter, Stefan Monnier, 2019/10/08
- [elpa] externals/async 4e894a2 16/60: Update README., Stefan Monnier, 2019/10/08
- [elpa] externals/async 324549b 36/60: Merge pull request #94 from astahlman/auto-select-coding, Stefan Monnier, 2019/10/08
- [elpa] externals/async d13c0bc 35/60: Choose coding system based on environment, Stefan Monnier, 2019/10/08
- [elpa] externals/async 890b38f 18/60: Add makefile., Stefan Monnier, 2019/10/08
- [elpa] externals/async afd1ad5 39/60: Allow removing text properties in strings when injecting, Stefan Monnier, 2019/10/08
- [elpa] externals/async 0a56cae 50/60: Update README, Stefan Monnier, 2019/10/08
- [elpa] externals/async b13baeb 47/60: Fix two issues in async-inject-variables, Stefan Monnier, 2019/10/08
- [elpa] externals/async 6fa6a86 49/60: Don't quote numbers as well, Stefan Monnier, 2019/10/08