[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: tramp-sshfs doesn't seem to respect tramp-remote-path
From: |
Michael Albinus |
Subject: |
Re: tramp-sshfs doesn't seem to respect tramp-remote-path |
Date: |
Thu, 08 Aug 2024 16:23:23 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Luiz Romário Santana Rios <luizromario@tecgraf.puc-rio.br> writes:
Hi Romário,
> Thanks for the explanation.
>
> Any reason we couldn't just query `tramp-remote-path` instead of
> calling getconf? I've been using eglot with sshfs for a while and it
> doesn't seem to have any trouble calling a remote clangd process.
Because tramp-remote-path has some features which aren't well suited for
sshfs connections. For example, there are the tramp-default-remote-path
and tramp-own-remote-path symbols. Furthermore, Tramp applies a sanity
check when using it, and removes non-existing directories. And
tramp-remote-path is marked as connection-local variable, which isn't
supported in tramp-sshfs.el.
> I'd be very interested in ironing out sshfs. I work remotely through
> an ssh connection everyday and sshfs has greatly improved performance
> and stability compared to the regular ssh, but this issue prevents me
> from e.g. calling magit. I've never looked into emacs's code, but I
> know a little emacs-lisp from writing my own .emacs file. Where do I
> look for resources on adding support to `tramp-remote-path` on sshfs?
You might override tramp-sshfs-handle-exec-path with an own
implementation. Something like (untested)
--8<---------------cut here---------------start------------->8---
(with-eval-after-load 'tramp-sshfs
(add-function
:override (symbol-function #'tramp-sshfs-handle-exec-path)
(lambda ()
`("/bin" "/usr/bin"
;; The equivalent to `exec-directory'.
,(tramp-file-local-name (expand-file-name default-directory))))))
--8<---------------cut here---------------end--------------->8---
However, I don't know whether it works sufficiently. process-file for
remote sshfs processes uses the *local* call-process, so there might be
differences in used exec directories and program availability.
> Regards, Romário.
Best regards, Michael.