[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#31355: 26.1; [PATCH] Fix remote-host/tramp directory tracking for sh

From: Phil Sainty
Subject: bug#31355: 26.1; [PATCH] Fix remote-host/tramp directory tracking for shells in `term' buffers
Date: Fri, 04 May 2018 02:47:40 +1200
User-agent: Orcon Webmail

On 2018-05-04 02:04, Michael Albinus wrote:
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.

Revised patch attached to use the "-" pseudo method.

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).

I've not changed this.  The code is evidentially deciding whether the
user/host pair being tracked in the shell in the term buffer is a match
for the user/host pair known locally to Emacs.  Unless both of those
components match, a tramp path is created.  I've not tested the case
of a different user on the local host, but it seems like reasonable
logic to me, at first look.

(if (and (string= term-ansi-at-host (system-name))
         (string= term-ansi-at-user (user-real-login-name)))
    ;; Use a local path
  ;; Use a tramp path

Attachment: 0001-Fix-remote-host-directory-tracking-for-shells-in-ter.patch
Description: Text Data

reply via email to

[Prev in Thread] Current Thread [Next in Thread]