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

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

bug#61748: 27.2; Eglot should use shell-file-name when launching the lan


From: jeberger
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 12:11:24 +0100 (CET)

> De: "Eli Zaretskii" <eliz@gnu.org>
> À: jeberger@free.fr, "Michael Albinus" <michael.albinus@gmx.de>
> Cc: 61748@debbugs.gnu.org
> Envoyé: Vendredi 24 Février 2023 09:15:52
> Objet: Re: bug#61748: 27.2; Eglot should use shell-file-name when launching 
> the language server for a remote file
>
>> Date: Fri, 24 Feb 2023 08:39:45 +0100 (CET)
>> From: jeberger@free.fr
>> 
>> # 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.

According to 
https://www.gnu.org/software/tramp/#Running-shell_002dcommand-on-a-remote-host
`shell-file-name` is also used for _remote_ command invocation and set to 
`/bin/sh` by default.
It can be configured using connection local variables. From the same source, 
the fix
should also use `(or shell-command-switch "-c")` instead of plain `"-c"`.

Cordially.





reply via email to

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