unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Michael Albinus <michael.albinus@gmx.de>
To: Phil Sainty <psainty@orcon.net.nz>
Cc: 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:04:58 +0200	[thread overview]
Message-ID: <8736z8u96d.fsf@gmx.de> (raw)
In-Reply-To: <3d76a935822f56f94705b1f59421a00a@webmail.orcon.net.nz> (Phil Sainty's message of "Fri, 04 May 2018 01:52:09 +1200")

Phil Sainty <psainty@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.





  parent reply	other threads:[~2018-05-03 14:04 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 [this message]
2018-05-03 14:47   ` Phil Sainty
2018-05-03 14:59     ` Michael Albinus
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=8736z8u96d.fsf@gmx.de \
    --to=michael.albinus@gmx.de \
    --cc=31355@debbugs.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).