GNU bug report logs -
#61748
27.2; Eglot should use shell-file-name when launching the language server for a remote file
Previous Next
Reported by: jeberger <at> free.fr
Date: Fri, 24 Feb 2023 07:40:01 UTC
Severity: normal
Found in version 27.2
Done: João Távora <joaotavora <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
Message #113 received at 61748 <at> debbugs.gnu.org (full text, mbox):
Michael Albinus wrote:
> jeberger <at> free.fr writes:
>
> Hi Jérôme,
>
> > Effectively, `(executable-find "rust-analyzer" t)` doesn't find it.
>
> Your current buffer is a remote one when you call it, right?
>
> > I'll try to find out why, but this point should indeed be fixed in
> > `executable-find` rather than Eglot.
>
> Pls set tramp-verbose to 10, rerun the test, and show me the Tramp
> debug
> buffer. Something like
>
> --8<---------------cut here---------------start------------->8---
> # emacs -Q -l tramp --eval '(setq tramp-verbose 10)' --eval
> '(add-to-list (quote tramp-remote-path) ...)' /ssh:user <at> host: --eval
> '(executable-find "rust-analyzer" t)'
> --8<---------------cut here---------------end--------------->8---
>
> > Jérôme
>
Yes, it's with a remote buffer. I also noticed that `(exec-path)` is
wrong: it only contains the standard paths ("/bin" "/usr/bin" "/sbin"
"/usr/sbin" "/usr/local/bin" "/usr/local/sbin") plus the path of the
current file. It's missing the paths from the remote environment and
the paths I've added manually to `tramp-remote-path`.
However `(shell-command "echo $PATH")` prints the correct path, and
`(shell-command "rust-analyzer --version")` works.
I tried with a minimalist emacs:
```
emacs -Q -l tramp \
--eval '(setq tramp-verbose 10)' \
--eval "(setq tramp-remote-path '(tramp-own-remote-path tramp-default-remote-path))" \
--eval '(setq shell-file-name "zsh")' \
/plink:user <at> host: \
--eval '(message (exec-path))'
```
But Tramp ignores `shell-file-name` and uses `/bin/sh` instead. E.g.
in the Tramp debug buffer, I see lines like this:
```
16:53:16.188134 tramp-send-command (6) # /bin/sh -l -c 'echo 1e814d9777358b9e0b5ab89ad5422ddb \"$PATH\"' 2>/dev/null; echo tramp_exit_status $?
```
and when I call `shell-command`, it's clear that it's using `sh` too
even though `C-h v` shows that `shell-file-name` is correctly set to
`zsh`.
Jérôme
This bug report was last modified 2 years and 161 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.