[Top][All Lists]

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

Re: Shell-quoting issue for sshx/scpx on MS Windows

From: Michael Albinus
Subject: Re: Shell-quoting issue for sshx/scpx on MS Windows
Date: Thu, 08 Apr 2021 12:32:04 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Jim Porter <> writes:

Hi Jim,

>     A few days ago I've changed sshx/scpx methods on MS Windows to use
>     powershell as local encoding shell. With this, the template
>     RemoteCommand='%l' seems to work well.
>     Would you mind to test it in your environment? Honestly, I'm kind
>     of
>     restricted, because I don't run MS Windows on my machines.
> It works! One thing I noticed while testing, however, is that there
> are a couple of cases where the latest git revision is quite a bit
> slower than Tramp This might be due to the switch to
> Powershell, or perhaps something else has changed.

Yes, it is related. Powershell does not understand the "&& exit || exit"
pattern, so I've changed it to "; exit". Likely, this is slower.

So I've reverted the use of powershell in Tramp on MS Windows. Instead,
I'm using the "double apostroph" quoting as suggested by you, and this
works proper.

Side remark: Since I don't use MS Windows myself, I heavily depend on
reports of people using Emacs/Tramp there. Thanks a lot for your report
and your suggestions, again!

> The biggest performance issue that I saw is exiting from M-x gdb[1].
> Using sshx on Tramp (with the quoting fix for RemoteCommand),
> after M-x gdb, I can hit C-d in the gud buffer to stop debugging, and
> it's almost instant. On the latest git revision, Emacs hangs for a
> couple seconds after hitting C-d.
> Another particularly-noticeable case is disabling auto-revert-mode in
> a remote buffer (again using sshx). That too was almost instant on
>, but takes a couple seconds on the latest git. Enabling
> auto-revert-mode is fast on both versions, although I think is
> still faster. Other things might also be slower on the latest git, but
> nothing else stuck out during my tests.
> All the above cases were tested with a Windows 10 system using the
> default MS-provided OpenSSH client and connecting via sshx to a Linux
> VM running on localhost. I tried with scpx too, and things seem to be
> the same there. I'll send some Tramp debug logs off-list for the M-x
> gdb test in case they're useful for you (I don't think there's any
> sensitive information in them, but better safe than sorry).

Could you pls pull the recent git sources, and check whether it makes a

> Thanks,
> - Jim
> [1] Caveat: there are a couple issues in core Emacs preventing M-x gdb
> from fully working over Tramp, but they shouldn't affect this test.
> I'll be submitting patches for these problems once I get them
> extracted from my .emacs and cleaned up a bit.

Please do, this will be much appreciated!

Best regards, Michael.

reply via email to

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