aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Albinus2025-02-10 16:37:25 +0100
committerMichael Albinus2025-02-10 16:37:25 +0100
commit0c7214dc97aef577487d71851580e8a68784075d (patch)
tree328ba469da337726c6991ea0e499b3d0bc50df18
parent55ffbeaab1da66abee8a84f79c2cebd2c61f336f (diff)
downloademacs-0c7214dc97aef577487d71851580e8a68784075d.tar.gz
emacs-0c7214dc97aef577487d71851580e8a68784075d.zip
* lisp/ansi-osc.el (ansi-osc-directory-tracker): Don't check host name.
-rw-r--r--lisp/ansi-osc.el17
1 files changed, 7 insertions, 10 deletions
diff --git a/lisp/ansi-osc.el b/lisp/ansi-osc.el
index 2a93b582479..97d6f6c8754 100644
--- a/lisp/ansi-osc.el
+++ b/lisp/ansi-osc.el
@@ -116,19 +116,16 @@ such as with the following command:
116 116
117 printf \"\\e]7;file://%s%s\\e\\\\\" \"$HOSTNAME\" \"$PWD\" 117 printf \"\\e]7;file://%s%s\\e\\\\\" \"$HOSTNAME\" \"$PWD\"
118 118
119`default-directory' remote file name forms are maintained. 119A remote `default-directory' is maintained.
120 120
121This functionality serves as an alternative to `dirtrack-mode' 121This functionality serves as an alternative to `dirtrack-mode'
122and `shell-dirtrack-mode'." 122and `shell-dirtrack-mode'."
123 (let ((url (url-generic-parse-url text))) 123 (when-let* ((url (url-generic-parse-url text))
124 (when (and (string= (url-type url) "file") 124 ((string= (url-type url) "file")))
125 (or (null (url-host url)) 125 (ignore-errors
126 ;; Use `downcase' to match `url-generic-parse-url' behavior 126 (cd-absolute
127 (string= (url-host url) (downcase (system-name))))) 127 (concat (file-remote-p default-directory)
128 (ignore-errors 128 (url-unhex-string (url-filename url)))))))
129 (cd-absolute
130 (concat (file-remote-p default-directory
131 (url-unhex-string (url-filename url)))))))))
132 129
133;; Hyperlink handling (OSC 8) 130;; Hyperlink handling (OSC 8)
134 131