Subject: bug#76165: [PATCH] ansi-osc-directory-tracker respects Tramp remote files

From: Ship Mints <[email-masked]>
Date: Mon, 10 Feb 2025 08:19:05 -0500

I sent the revised patch in my last email.

(defun my/shell-mode-hook ()
  ;; ansi-osc-directory-tracker is on by default in Emacs 28+
  (shell-dirtrack-mode -1)) ; make sure you do this

In your bashrc:

# ansi osc 7 pwd change support
function myprompt () {
  printf "\e]7;file://%s%s\e\\" "$HOSTNAME" "$PWD"
}
export PROMPT_COMMAND=myprompt

On Mon, Feb 10, 2025 at 8:15 AM Michael Albinus <[email-masked]>
wrote:

> Visuwesh <[email-masked]> writes:
>
> Hi,
>
> > The concat form is ill-formed in the patch you pushed, no?
> >
> >     (concat (file-remote-p default-directory
> >                            (url-unhex-string (url-filename url))))
> >
> > should be
> >
> >     (concat (file-remote-p default-directory)
> >             (url-unhex-string (url-filename url)))
>
> Looks like, yes :-(
>
> Since I don't know how to activate ansi-osc-directory-tracker in a shell
> (where is it documented?), I couldn't test it. Could you pls advice me?
>
> I'll fix it then.
>
> Best regards, Michael.
>