help-gnu-emacs
[Top][All Lists]
Advanced

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

[no subject]


From: Martin Kjær Jørgensen
Subject:
Date: Tue, 22 Apr 2025 08:21:58 +0200

Hey,

Have any of you got SSH connection sharing issues when using ripgrep with
rg.el over TRAMP? On my setup it reconnect ssh every time it is invoked, using
Emacs 30.1 and latest rg.el.

I have enable connection sharing within Emacs and it still reopens new
connections.

(setopt tramp-use-connection-share t)

Seen bellow is the first ssh connection made by Emacs when using dired over
TRAMP which creates a socket file
~/.cache/emacs/tramp.d1ab9fe731f6d0b99fcd76cb47737eae2332dfe7 . The second
connection is made by rg when invoked with (M-x) in the same dired directory.

mkj       7720  0.1  0.0 237500  7888 pts/1    Ss+  12:07   0:00 ssh -l root -o 
ControlMaster=auto -o ControlPath=/home/mkj/.cache/emacs/tramp.%C -o 
ControlPersist=no -e none anon
mkj       8173  0.5  0.0 237240  7552 pts/5    Ss+  12:08   0:00 ssh -q -l root 
-o ControlMaster=no -o ControlPath=none -e none anon

In my ssh/config I also have the following entry, which seems to work fine
with dired and find-file over TRAMP if tramp-use-connection-share is set to
nil. In this case dired/find-file will reuse ssh mux processes correctly, but
rg will not.

Host *
  ServerAliveInterval 5
  ServerAliveCountMax 2
  ControlPath ~/.ssh/master-%r-at-%h-%p
  ControlMaster auto
  ControlPersist yes


-- 
/Martin



reply via email to

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