From: Michael Albinus <michael.albinus@gmx.de>
To: Phil Sainty <psainty@orcon.net.nz>
Cc: bug-gnu-emacs
<bug-gnu-emacs-bounces+psainty=orcon.net.nz@gnu.org>,
31355@debbugs.gnu.org
Subject: 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 [thread overview]
Message-ID: <87vac4ss3t.fsf@gmx.de> (raw)
In-Reply-To: <dafc95295384ff7a6e2f141882c53986@webmail.orcon.net.nz> (Phil Sainty's message of "Fri, 04 May 2018 02:47:40 +1200")
Phil Sainty <psainty@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.
next prev parent reply other threads:[~2018-05-03 14:59 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-03 13:52 bug#31355: 26.1; [PATCH] Fix remote-host/tramp directory tracking for shells in `term' buffers Phil Sainty
2018-05-03 14:00 ` Phil Sainty
2018-05-03 14:04 ` Michael Albinus
2018-05-03 14:47 ` Phil Sainty
2018-05-03 14:59 ` Michael Albinus [this message]
2018-05-03 21:01 ` Phil Sainty
2018-05-04 7:27 ` Michael Albinus
2018-05-08 12:52 ` Phil Sainty
2018-05-08 17:43 ` Michael Albinus
2018-05-08 20:27 ` Phil Sainty
2018-06-03 23:40 ` Phil Sainty
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87vac4ss3t.fsf@gmx.de \
--to=michael.albinus@gmx.de \
--cc=31355@debbugs.gnu.org \
--cc=bug-gnu-emacs-bounces+psainty=orcon.net.nz@gnu.org \
--cc=psainty@orcon.net.nz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).