GNU bug report logs - #31355
26.1; [PATCH] Fix remote-host/tramp directory tracking for shells in `term' buffers

Previous Next

Package: emacs;

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


Message #17 received at 31355 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Phil Sainty <psainty <at> orcon.net.nz>
Cc: bug-gnu-emacs <bug-gnu-emacs-bounces+psainty=orcon.net.nz <at> gnu.org>,
 31355 <at> debbugs.gnu.org
Subject: Re: bug#31355: 26.1;
 [PATCH] Fix remote-host/tramp directory tracking for shells in `term'
 buffers
Date: Thu, 03 May 2018 16:59:02 +0200
Phil Sainty <psainty <at> orcon.net.nz> writes:

Hi Phil,

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

Of course.

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

OK.

>   ;; Use a tramp path

And here I believe you could always apply

(format "/-:%s@%s:%s" term-ansi-at-user term-ansi-at-host term-ansi-at-dir)

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.