unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Michael Albinus <michael.albinus@gmx.de>
To: "Luiz Romário Santana Rios" <luizromario@tecgraf.puc-rio.br>
Cc: help-gnu-emacs@gnu.org
Subject: Re: tramp-sshfs doesn't seem to respect tramp-remote-path
Date: Thu, 08 Aug 2024 16:23:23 +0200	[thread overview]
Message-ID: <87mslnks9w.fsf@gmx.de> (raw)
In-Reply-To: <3f15bb51-8145-4b79-9465-12dfa063729b@tecgraf.puc-rio.br> ("Luiz Romário Santana Rios"'s message of "Thu, 8 Aug 2024 10:37:54 -0300")

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.



  reply	other threads:[~2024-08-08 14:23 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-30 13:22 tramp-sshfs doesn't seem to respect tramp-remote-path Luiz Romário Santana Rios
2024-07-30 16:47 ` Michael Albinus
2024-07-30 21:28   ` Luiz Romário Santana Rios
2024-07-31 11:47     ` Michael Albinus
2024-07-31 15:18       ` Luiz Romário Santana Rios
2024-07-31 16:43         ` Michael Albinus
2024-08-08 13:13           ` Luiz Romário Santana Rios
2024-08-08 13:30             ` Michael Albinus
2024-08-08 13:37               ` Luiz Romário Santana Rios
2024-08-08 14:23                 ` Michael Albinus [this message]
2024-08-08 15:18                   ` Luiz Romário Santana Rios
2024-08-08 15:24                     ` Michael Albinus
2024-08-08 17:33                       ` Michael Albinus

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=87mslnks9w.fsf@gmx.de \
    --to=michael.albinus@gmx.de \
    --cc=help-gnu-emacs@gnu.org \
    --cc=luizromario@tecgraf.puc-rio.br \
    /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.
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).