emacs-diffs
[Top][All Lists]
Advanced

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

master 4ce5646: Fix Bug#45518 in compile.el


From: Michael Albinus
Subject: master 4ce5646: Fix Bug#45518 in compile.el
Date: Fri, 29 Jan 2021 03:44:42 -0500 (EST)

branch: master
commit 4ce5646d592c8d998d066d56108e6dd92372e22b
Author: Michael Albinus <michael.albinus@gmx.de>
Commit: Michael Albinus <michael.albinus@gmx.de>

    Fix Bug#45518 in compile.el
    
    * lisp/progmodes/compile.el (compilation-get-file-structure):
    Avoid call of `file-truename' for remote files.  (Bug#45518)
---
 lisp/progmodes/compile.el | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index 94e4f3c..2c1e6ff 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -3041,7 +3041,12 @@ TRUE-DIRNAME is the `file-truename' of DIRNAME, if 
given."
            ;; Get the specified directory from FILE.
            (spec-directory
              (if (cdr file)
-                (file-truename (concat comint-file-name-prefix (cdr file))))))
+                 ;; This function is active in `compilation-filter'.
+                 ;; There could be problems to call `file-truename'
+                 ;; for remote compilation processes.
+                (if (file-remote-p default-directory)
+                    (concat comint-file-name-prefix (cdr file))
+                  (file-truename (concat comint-file-name-prefix (cdr 
file)))))))
 
        ;; Check for a comint-file-name-prefix and prepend it if appropriate.
        ;; (This is very useful for compilation-minor-mode in an rlogin-mode



reply via email to

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