[Top][All Lists]

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

master 44c43ba4bd 2/3: * lisp/net/browse-url.el (browse-url-of-file): Im

From: Michael Albinus
Subject: master 44c43ba4bd 2/3: * lisp/net/browse-url.el (browse-url-of-file): Improve browsing remote files.
Date: Sat, 25 Dec 2021 08:14:14 -0500 (EST)

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

    * lisp/net/browse-url.el (browse-url-of-file): Improve browsing remote 
 lisp/net/browse-url.el | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el
index b7840f0589..9a41f018f2 100644
--- a/lisp/net/browse-url.el
+++ b/lisp/net/browse-url.el
@@ -701,8 +701,10 @@ interactively.  Turn the filename into a URL with function
          (cond ((not (buffer-modified-p)))
                (browse-url-save-file (save-buffer))
                (t (message "%s modified since last save" file))))))
-  (when (file-remote-p file)
-    (setq file (file-local-copy file)))
+  (when (and (file-remote-p file)
+             (not browse-url-temp-file-name))
+    (setq browse-url-temp-file-name (file-local-copy file)
+          file browse-url-temp-file-name))
   (browse-url (browse-url-file-url file))
   (run-hooks 'browse-url-of-file-hook))

reply via email to

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