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

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

[elpa] externals/marginalia 153417a 192/241: marginalia-annotate-file: U


From: Stefan Monnier
Subject: [elpa] externals/marginalia 153417a 192/241: marginalia-annotate-file: Use substitute-in-file-name
Date: Fri, 28 May 2021 20:49:25 -0400 (EDT)

branch: externals/marginalia
commit 153417adc9d7779a5393ad37c6584f875291b6ac
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>

    marginalia-annotate-file: Use substitute-in-file-name
---
 marginalia.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/marginalia.el b/marginalia.el
index 55dbb88..a43ce6e 100644
--- a/marginalia.el
+++ b/marginalia.el
@@ -624,7 +624,7 @@ using `minibuffer-force-complete' on the candidate CAND."
 
 (defun marginalia--remote-p (path)
   "Return t if PATH is a remote path."
-  (string-match-p "/[^:]+:" path))
+  (string-match-p "\\`/[^:]+:" (substitute-in-file-name path)))
 
 (defun marginalia-annotate-file (cand)
   "Annotate file CAND with its size, modification time and other attributes.
@@ -634,7 +634,7 @@ These annotations are skipped for remote paths."
             (with-current-buffer (window-buffer win)
               (marginalia--remote-p (minibuffer-contents-no-properties)))))
       (marginalia--fields ("*Remote*" :face 'marginalia-documentation))
-    (when-let (attributes (file-attributes (marginalia--full-candidate cand) 
'string))
+    (when-let (attributes (file-attributes (substitute-in-file-name 
(marginalia--full-candidate cand)) 'string))
       (marginalia--fields
        ((file-attribute-modes attributes) :face 'marginalia-file-modes)
        ((format "%s:%s"



reply via email to

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