From b20e4f9029343a51d1238ee6f89e390e18005340 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Mon, 10 Feb 2025 16:37:25 +0100 Subject: [PATCH] * lisp/ansi-osc.el (ansi-osc-directory-tracker): Don't check host name. (cherry picked from commit 0c7214dc97aef577487d71851580e8a68784075d) --- lisp/ansi-osc.el | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/lisp/ansi-osc.el b/lisp/ansi-osc.el index 5334089ee48..ef08ccd44ee 100644 --- a/lisp/ansi-osc.el +++ b/lisp/ansi-osc.el @@ -114,16 +114,15 @@ list that is the value of `ansi-osc-handlers'. You should arrange for your shell to print the appropriate escape sequence at each prompt, such as with the following command: - printf \"\\e]7;file://%s%s\\e\\\\\" \"$HOSTNAME\" \"$PWD\"" - (let ((url (url-generic-parse-url text))) - (when (and (string= (url-type url) "file") - (or (null (url-host url)) - ;; Use `downcase' to match `url-generic-parse-url' behavior - (string= (url-host url) (downcase (system-name))))) - (ignore-errors - (cd-absolute - (concat (file-remote-p default-directory - (url-unhex-string (url-filename url))))))))) + printf \"\\e]7;file://%s%s\\e\\\\\" \"$HOSTNAME\" \"$PWD\" + +A remote `default-directory' is maintained." + (when-let* ((url (url-generic-parse-url text)) + ((string= (url-type url) "file"))) + (ignore-errors + (cd-absolute + (concat (file-remote-p default-directory) + (url-unhex-string (url-filename url))))))) ;; Hyperlink handling (OSC 8) -- 2.39.5