Subject: bug#70901: closed (Re: bug#70901: 30.0.50; Tramp doesn't use ControlMaster even with (setq tramp-use-connection-share nil))

From: [email-masked] (GNU bug Tracking System)
Date: Sat, 25 May 2024 09:44:02 +0000

Your bug report

#70901: 30.0.50; Tramp doesn't use ControlMaster even with (setq tramp-use-connection-share nil)

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
70901: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=70901
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#70901: 30.0.50; Tramp doesn't use ControlMaster even with (setq tramp-use-connection-share nil)
From: Michael Albinus <[email-masked]>
To: Dmitry Gutov <[email-masked]>
Cc: [email-masked]
Date: Sat, 25 May 2024 11:42:49 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Version: 30.1

Dmitry Gutov <[email-masked]> writes:

> Hi Michael,

Hi Dmitry,

>> I've changed it such a way that the message "Opening connection ..."
>> appears only until the prompt from remote is seen. For the rest, there
>> will be another message "Setup connection ...".
>> As bonus, the "Opening connection ..." message appears now for every
>> hop
>> in the multi-hop case. This is new.
>> Could you pls check the appended patch?
>
> It's working well, thank you.

Thanks for the feedback. Pushed to master, closing the bug.

> A minor downside is more messages, but at level 3 Tramp is fairly
> chatty anyway - so people who would be bothered by it should reduce
> the value of 'tramp-verbose'. But now the connection process looks
> more clear.

You cannot have both: dividing the message into two different ones, and
not making Tramp more chatty. And if you change the message level of
"Setup connection ..." to something different, there will be a quiet
Tramp saying "Opening connection ... done" w/o returning control to the
user for a while. Another source of complaints I like to avoid.

The change, that Tramp says now "Opening connection ..." for every hop
in a multi-hop environment is an advantage I believe. You have a better
view on where Tramp is working (and maybe being blocked).

> Best regards,
> Dmitry

Best regards, Michael.

Subject: 30.0.50; Tramp doesn't use ControlMaster even with (setq tramp-use-connection-share nil)
From: Dmitry Gutov <[email-masked]>
To: [email-masked]
Date: Mon, 13 May 2024 05:00:28 +0300
List-Id: <debbugs-submit.debbugs.gnu.org>

I have ~/.ssh/config set up correctly enough that

ssh <user>@<host> in the terminal connects quickly (and when I Ctrl-D
out of it, it finishes with "Shared connection to <...> closed.")

But I haven't been able to make Tramp reuse the connection.

I (setq tramp-use-connection-share nil) - so it would pick up the user
settings from my ssh config - and the first 'C-x C-f /ssh:user@host:'
takes a lot of time anyway with its "Opening connection ...".

For context: I'm on a high-latency network node geographically, and
using an even slower server for this example. I.e. my ping to it is
~170ms, but the full new ssh connection takes around 4 seconds.

On a related note, are asynchronous processes supposed to use
ControlMaster when it's available? I get "Opening connection ..." for
every M-& call, for example.

In GNU Emacs 30.0.50 (build 7, x86_64-pc-linux-gnu, X toolkit, cairo
  version 1.18.0, Xaw scroll bars) of 2024-05-12 built on potemkin
Repository revision: b20d4ab374fb9b3c80b968df6acd6444f763bd40
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12302000
System Description: Ubuntu 23.10