GNU bug report logs -
#31355
26.1; [PATCH] Fix remote-host/tramp directory tracking for shells in `term' buffers
Previous Next
Reported by: Phil Sainty <psainty <at> orcon.net.nz>
Date: Thu, 3 May 2018 13:53:01 UTC
Severity: normal
Tags: patch
Found in version 26.1
Done: Phil Sainty <psainty <at> orcon.net.nz>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Phil Sainty <psainty <at> orcon.net.nz> writes:
Hi Phil,
> With tramp methods now being mandatory, the term.el directory tracking
> was generating invalid tramp paths on remote hosts.
>
> I've rolled a patch for this (along with some very minor improvements
> to the related commentary) in which I'm hard-coding the "ssh" method.
> I'm not sure whether that's the ideal fix, but I suspect it's likely
> to do the trick for most people, whereas the current code won't work
> at all.
Thanks for this. I haven't tested, just a short comment:
> @@ -2753,8 +2756,8 @@ term-handle-ansi-terminal-messages
> (string= term-ansi-at-user (user-real-login-name)))
> (expand-file-name term-ansi-at-dir)
> (if (string= term-ansi-at-user (user-real-login-name))
> - (concat "/" term-ansi-at-host ":" term-ansi-at-dir)
> - (concat "/" term-ansi-at-user "@" term-ansi-at-host ":"
> + (concat "/ssh:" term-ansi-at-host ":" term-ansi-at-dir)
> + (concat "/ssh:" term-ansi-at-user "@" term-ansi-at-host ":"
I believe it is always save to use term-ansi-at-user. There's no need to
check, whether it is equal to (user-real-login-name).
Furthermore, I wouldn't hard-code "ssh". People might have other
preferences, and on some systems it doesn't work. Think about Emacs
running on MS WIndows, where "plink" is used instead of "ssh". Just take
"-" as method, this is a notation to apply user's default (Tramp) method.
> -Phil
Best regards, Michael.
This bug report was last modified 7 years and 68 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.