From: Eli Zaretskii <eliz@gnu.org>
To: jeberger@free.fr, Michael Albinus <michael.albinus@gmx.de>
Cc: 61748@debbugs.gnu.org
Subject: bug#61748: 27.2; Eglot should use shell-file-name when launching the language server for a remote file
Date: Fri, 24 Feb 2023 10:15:52 +0200 [thread overview]
Message-ID: <83ttzbo4w7.fsf@gnu.org> (raw)
In-Reply-To: <774021794.15662399.1677224385920.JavaMail.root@zimbra60-e10.priv.proxad.net> (jeberger@free.fr)
> Date: Fri, 24 Feb 2023 08:39:45 +0100 (CET)
> From: jeberger@free.fr
>
> >From https://github.com/joaotavora/eglot/issues/1175
>
> # Steps to reproduce:
>
> - On the remote machine:
> - Install a language server in a non-standard path (e.g. `rust-analyzer`, which installs in a subdirectory under `$HOME` and not `/usr/bin`)
> - Make sure that the server is in the path for a shell other than `sh` (e.g. set the path in `.zprofile` for `zsh`).
> - On the local machine:
> - Open a file remotely through TRAMP
> - Set `shell-file-name` to the shell you're using on the remote (e.g. `(setq shell-file-name "zsh")`)
> - <key>M-x</key> `eglot`.
>
> # Expected result:
>
> Eglot should start
>
> # Actual result:
>
> Eglot asks `Enter program to execute (or <host>:<port>):`, then when I type `rust-analyzer` it fails with message `[jsonrpc] Server exited with status 127`. Looking at `eglot-events-buffer`, it is clear that eglot tried to use `sh` to start the server.
>
> # Partial fix
>
> The server starts correctly if I change function `eglot--cmd` to use `(or shell-file-name "sh")` instead of plain `"sh"`, e.g.:
I don't think this is the correct fix. The literal "sh -c" is used in
Eglot only for remote server invocations, and I presume this was done
to avoid the problems with running Eglot on MS-Windows. Using
shell-file-name is incorrect for this use case because shell-file-name
gives you the name of the _local_ shell. I think we have better ways
of dealing with this issue' I've CC'ed Michael in the hope that he
will tell how to solve this properly.
Thanks.
next prev parent reply other threads:[~2023-02-24 8:15 UTC|newest]
Thread overview: 59+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1909672588.15608265.1677223717877.JavaMail.root@zimbra60-e10.priv.proxad.net>
2023-02-24 7:39 ` bug#61748: 27.2; Eglot should use shell-file-name when launching the language server for a remote file jeberger
2023-02-24 8:15 ` Eli Zaretskii [this message]
2023-02-24 11:11 ` jeberger
2023-02-24 16:44 ` Michael Albinus
2023-02-27 11:07 ` João Távora
2023-02-27 12:05 ` João Távora
2023-02-27 17:59 ` bug#61748: [informatique] " Jérôme M. Berger
2023-02-27 23:41 ` João Távora
2023-02-28 9:50 ` jeberger
2023-02-28 10:14 ` Michael Albinus
2023-02-28 10:28 ` João Távora
2023-02-27 19:57 ` Michael Albinus
2023-02-27 20:07 ` João Távora
2023-02-27 20:13 ` Michael Albinus
2023-02-28 0:00 ` João Távora
2023-02-28 8:41 ` Michael Albinus
2023-02-28 12:18 ` João Távora
2023-02-28 12:34 ` Michael Albinus
2023-02-28 12:46 ` João Távora
2023-02-28 13:05 ` Michael Albinus
2023-02-28 13:47 ` João Távora
2023-02-28 14:10 ` Michael Albinus
2023-02-28 14:24 ` João Távora
2023-02-28 14:45 ` Michael Albinus
2023-02-28 15:13 ` João Távora
2023-02-28 15:44 ` Michael Albinus
2023-02-28 16:43 ` Eli Zaretskii
2023-02-28 16:49 ` João Távora
2023-02-28 17:56 ` Eli Zaretskii
2023-03-01 4:34 ` Richard Stallman
2023-03-01 9:31 ` João Távora
2023-03-01 13:04 ` Eli Zaretskii
2023-03-01 13:05 ` João Távora
2023-02-28 13:59 ` jeberger
2023-02-28 14:25 ` João Távora
2023-02-28 14:49 ` Michael Albinus
2023-02-28 14:53 ` João Távora
2023-02-28 15:15 ` Michael Albinus
2023-02-28 15:23 ` João Távora
2023-02-28 15:50 ` Michael Albinus
2023-02-28 16:28 ` João Távora
2023-03-02 9:14 ` Michael Albinus
2023-03-02 10:56 ` João Távora
2023-03-02 11:40 ` Michael Albinus
2023-03-03 0:24 ` João Távora
2023-02-28 14:49 ` jeberger
2023-02-28 15:07 ` João Távora
2023-02-28 15:12 ` Michael Albinus
2023-02-28 16:16 ` jeberger
2023-02-28 16:41 ` jeberger
2023-02-28 17:09 ` João Távora
2023-03-01 8:09 ` jeberger
2023-03-02 13:28 ` João Távora
2023-03-07 10:15 ` João Távora
2023-03-01 8:39 ` Michael Albinus
2023-03-01 8:51 ` jeberger
2023-03-01 9:07 ` Michael Albinus
2023-03-01 10:01 ` jeberger
2023-03-01 10:11 ` 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=83ttzbo4w7.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=61748@debbugs.gnu.org \
--cc=jeberger@free.fr \
--cc=michael.albinus@gmx.de \
/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.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
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).