emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master ea1cf09: Handle symlinks in wdired.el when restorin


From: Stephen Berman
Subject: [Emacs-diffs] master ea1cf09: Handle symlinks in wdired.el when restoring filename property
Date: Sun, 29 Jul 2018 07:17:06 -0400 (EDT)

branch: master
commit ea1cf0960a86bc373cfd4900f46d9fe5e847941e
Author: Stephen Berman <address@hidden>
Commit: Stephen Berman <address@hidden>

    Handle symlinks in wdired.el when restoring filename property
    
    * lisp/wdired.el (wdired--restore-dired-filename-prop): If the
    file name is a symbolic link, only propertize the link name.  This
    prevents wdired-create-parentdirs from turning the link into a
    directory.
---
 lisp/wdired.el | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/lisp/wdired.el b/lisp/wdired.el
index 1d01067..be0bde2 100644
--- a/lisp/wdired.el
+++ b/lisp/wdired.el
@@ -611,7 +611,10 @@ Optional arguments are ignored."
       (when (re-search-forward directory-listing-before-filename-regexp
                                (line-end-position) t)
         (setq beg (point)
-              end (line-end-position))
+              end (if (and (file-symlink-p (dired-get-filename))
+                           (search-forward " -> " (line-end-position) t))
+                      (goto-char (match-beginning 0))
+                    (line-end-position)))
         (put-text-property beg end 'dired-filename t)))))
 
 (defun wdired-next-line (arg)



reply via email to

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