From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: jeberger@free.fr Newsgroups: gmane.emacs.bugs 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) Message-ID: <1059072250.16834484.1677237084935.JavaMail.root@zimbra60-e10.priv.proxad.net> References: <774021794.15662399.1677224385920.JavaMail.root@zimbra60-e10.priv.proxad.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4125"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Michael Albinus , 61748@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Feb 24 12:12:18 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pVVzt-0000uh-OU for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 24 Feb 2023 12:12:17 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pVVzf-0004Jr-S0; Fri, 24 Feb 2023 06:12:03 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pVVze-0004Jj-RC for bug-gnu-emacs@gnu.org; Fri, 24 Feb 2023 06:12:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pVVze-0004iO-Hb for bug-gnu-emacs@gnu.org; Fri, 24 Feb 2023 06:12:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pVVze-0003Bw-CJ for bug-gnu-emacs@gnu.org; Fri, 24 Feb 2023 06:12:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: jeberger@free.fr Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 24 Feb 2023 11:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61748 X-GNU-PR-Package: emacs Original-Received: via spool by 61748-submit@debbugs.gnu.org id=B61748.167723708812227 (code B ref 61748); Fri, 24 Feb 2023 11:12:02 +0000 Original-Received: (at 61748) by debbugs.gnu.org; 24 Feb 2023 11:11:28 +0000 Original-Received: from localhost ([127.0.0.1]:36058 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVVz6-0003B9-FE for submit@debbugs.gnu.org; Fri, 24 Feb 2023 06:11:28 -0500 Original-Received: from smtp5-g21.free.fr ([212.27.42.5]:2042) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVVz4-0003B0-Ac for 61748@debbugs.gnu.org; Fri, 24 Feb 2023 06:11:27 -0500 Original-Received: from zimbra60-e10.priv.proxad.net (unknown [172.20.243.210]) by smtp5-g21.free.fr (Postfix) with ESMTP id 112CF5FFB4; Fri, 24 Feb 2023 12:11:24 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=free.fr; s=smtp-20201208; t=1677237085; bh=w+oETT/qvKqOW3PeI8Um1F+znJAVJJH+eaGuYCKtQRE=; h=Date:From:To:Cc:In-Reply-To:Subject:From; b=fCdIIVxCbTLMsijhEs1O7N6ADRy7fhUQgW5kWEVVHvLvbAIVWOzjjMjrkyKcuBYn1 GgDf9umWcRSwPxwWOnbX8dVMdFPm28msn4x6O4BAHqNKFowHMQcENCvKzKquMKZgB9 9DMc3+od6qVGkj1Bm8QiqKhk8VIMZfkzlM0S1TGftzjuJABO62dM6fARcN5rDgy2UT XRAbCVMVgN/8VePLg6FnGBmeQCHTjvGdnE6w8Bsvs0FaLjsmJ4gyFDOHQd4Bi2b2u5 olVfVVmsmSUh2PPfKryDyAFlLnbnk3I5K6fIJqUcP7qXgHIz8CCa8tMzWM7/oa3uJW 8q63VlSM3D8sw== In-Reply-To: <83ttzbo4w7.fsf@gnu.org> X-Originating-IP: [193.240.154.120] X-Mailer: Zimbra 7.2.0-GA2598 (ZimbraWebClient - NAV6 (Win)/7.2.0-GA2598) X-Authenticated-User: jeberger@free.fr X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:256563 Archived-At: > De: "Eli Zaretskii" > =C3=80: jeberger@free.fr, "Michael Albinus" > Cc: 61748@debbugs.gnu.org > Envoy=C3=A9: Vendredi 24 F=C3=A9vrier 2023 09:15:52 > Objet: Re: bug#61748: 27.2; Eglot should use shell-file-name when launchi= ng the language server for a remote file > >> Date: Fri, 24 Feb 2023 08:39:45 +0100 (CET) >> From: jeberger@free.fr >>=20 >> # Partial fix >>=20 >> The server starts correctly if I change function `eglot--cmd` to use `(o= r 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.