default-directory in remote shells (was: Tramp connection status with connection sharing)
Michael Albinus <[email protected]> Sun, 09 Feb 2025 09:27:51 +0100
| Newsgroups | gmane.emacs.tramp |
|---|---|
| Message-ID | <[email protected]> |
Ship Mints <[email protected]> writes: Hi, > In the end, it was ansi-osc-directory-tracker resetting > default-directory without regard to the shell being in Tramp-space. So it must be fixed there. > I'm all ears for a better solution that doesn't involve shell-hook > trickery. If this kind of thing is to be fixed in Emacs core, it could > be in shell-mode proper so no hook required. Would either need a Tramp > local or shell-mode can just do what I did. > > Other approaches? I don't believe we shall hack shell-mode in any way. default-directory is a fundamental concept in Emacs. ansi-osc-directory-tracker must not change it randomly w/o supporting remote default-directory. I recommend you to write an Emacs bug report "Make ansi-osc.el aware of remote directories". > -Stephane Best regards, Michael.