GNU bug report logs -
#76165
[PATCH] ansi-osc-directory-tracker respects Tramp remote files
Previous Next
Reported by: Ship Mints <shipmints <at> gmail.com>
Date: Sun, 9 Feb 2025 19:06:01 UTC
Severity: normal
Tags: patch
Fixed in version 31.1
Done: Michael Albinus <michael.albinus <at> gmx.de>
Bug is archived. No further changes may be made.
Full log
Message #79 received at 76165 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
I think that won't work for a use case where I often will initiate a
connection back to my own machine and I do want the effect of retaining
remote file semantics in default-directory?
On Mon, Feb 10, 2025 at 9:19 AM Michael Albinus <michael.albinus <at> gmx.de>
wrote:
> Visuwesh <visuweshm <at> gmail.com> writes:
>
> Hi,
>
> > That reminds me why my :override advice was simpler. Indeed, I had to
> > get rid of that test to ensure that the function would work as intended
> > for remote shell buffers. It never made much sense IMO and I got the
> > impression that it is in place as a "let's be absolutely sure" measure.
> > I can say that I face no issues with the test omitted thus far. It could
> > be a product of me being in control of $PS1 for local and remote shells
> > though.
>
> Well. The host part of the URL could be anything, and must not be the
> same like the current host name. So perhaps the check could be like
> this, "to be absolutely sure":
>
> --8<---------------cut here---------------start------------->8---
> (when-let* ((url (url-generic-parse-url text))
> ((string= (url-type url) "file"))
> ((or (null (url-host url))
> ;; Use `downcase' to match `url-generic-parse-url'
> behavior
> (string= (url-host url)
> (downcase
> (or (file-remote-p default-directory 'host)
> (system-name)))))))
> (ignore-errors
> (cd-absolute
> (concat (file-remote-p default-directory)
> (url-unhex-string (url-filename url)))))))
> --8<---------------cut here---------------end--------------->8---
>
> WDYT?
>
> Best regards, Michael.
>
[Message part 2 (text/html, inline)]
This bug report was last modified 102 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.