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

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

[elpa] master 53fccc5 175/187: Rename buffers after renaming (#56).


From: Michael Albinus
Subject: [elpa] master 53fccc5 175/187: Rename buffers after renaming (#56).
Date: Wed, 30 Dec 2015 11:50:30 +0000

branch: master
commit 53fccc52eefd0a50eb39274e8935be80d3affc44
Author: Thierry Volpiatto <address@hidden>
Commit: Thierry Volpiatto <address@hidden>

    Rename buffers after renaming (#56).
---
 dired-async.el |   17 ++++++++++++-----
 1 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/dired-async.el b/dired-async.el
index c007751..6827b0f 100644
--- a/dired-async.el
+++ b/dired-async.el
@@ -151,10 +151,10 @@ Should take same args as `message'."
 
 See `dired-create-files' for the behavior of arguments."
   (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)
-                                                 
(dired-async-after-file-create ,(length fn-list)))))
+  (let (dired-create-files-failures
+        failures async-fn-list
+        skipped (success-count 0) (total (length fn-list))
+        callback)
     (let (to overwrite-query
              overwrite-backup-query)    ; for dired-handle-overwrite
       (dolist (from fn-list)
@@ -215,7 +215,14 @@ ESC or `q' to not overwrite any of the remaining files,
                         (push (dired-make-relative from) failures)
                         (dired-log "%s `%s' to `%s' failed"
                                    operation from to)))
-                  (push (cons from to) async-fn-list))))))
+                  (push (cons from to) async-fn-list)))))
+      (setq callback
+            `(lambda (&optional ignore)
+               (dired-async-after-file-create ,(length fn-list))
+               (cl-loop for (file . to) in ',async-fn-list
+                 do (and (get-file-buffer file)
+                         (with-current-buffer (get-file-buffer file)
+                           (set-visited-file-name to nil t)))))))
     ;; Handle error happening in host emacs.
     (cond
       (dired-create-files-failures



reply via email to

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