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: Tue, 28 Feb 2023 14:59:32 +0100 (CET) Message-ID: <75486564.6945596.1677592772065.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="34814"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Michael Albinus , 61748@debbugs.gnu.org To: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Feb 28 15:00:35 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 1pX0Wx-0008xB-DQ for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 28 Feb 2023 15:00:35 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pX0WU-000608-JI; Tue, 28 Feb 2023 09:00:06 -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 1pX0WR-0005zs-UW for bug-gnu-emacs@gnu.org; Tue, 28 Feb 2023 09:00:04 -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 1pX0WR-0006Ko-Ev for bug-gnu-emacs@gnu.org; Tue, 28 Feb 2023 09:00:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pX0WQ-0000Sv-UJ for bug-gnu-emacs@gnu.org; Tue, 28 Feb 2023 09:00: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: Tue, 28 Feb 2023 14:00: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.16775927771722 (code B ref 61748); Tue, 28 Feb 2023 14:00:02 +0000 Original-Received: (at 61748) by debbugs.gnu.org; 28 Feb 2023 13:59:37 +0000 Original-Received: from localhost ([127.0.0.1]:49971 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pX0W0-0000Ri-Ii for submit@debbugs.gnu.org; Tue, 28 Feb 2023 08:59:36 -0500 Original-Received: from smtp4-g21.free.fr ([212.27.42.4]:51660) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pX0Vy-0000RW-0u for 61748@debbugs.gnu.org; Tue, 28 Feb 2023 08:59:34 -0500 Original-Received: from zimbra60-e10.priv.proxad.net (unknown [172.20.243.210]) by smtp4-g21.free.fr (Postfix) with ESMTP id 26A0219F591; Tue, 28 Feb 2023 14:59:32 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=free.fr; s=smtp-20201208; t=1677592772; bh=CdUtTErOUa65CpnYOkLGdBD+io5e4+/LHPiZai4C02s=; h=Date:From:To:Cc:In-Reply-To:Subject:From; b=JaektmjZ/njmv42/CtaviU26BNxMNhX8zy8ak5U8awob38VWM6lXg7GlHsqLZfiC0 FksYuFkx7QJ4I30fmnza38V7DenO5i7L+8OvJa1cjelkByuGeKDE8Ws9ToagtjeZcG /DOyN3/B5GMr8y2X5wO+T0lwnKyHCAlWN+NPH75gSt7yoGDMy6KybZ0CW1dJMOlNeH ItSrDgxK3tiEsdX7MF6nYCnqn38GO+3Zgn6dsPRiSTY6EkdZwIMWo7YVRwmfWDvvhw 5TRX0rcVTch8xJbYzEmO17Ap2PyKxnDSgSdUniT48ciW4e+DyzUpWgxFJc/tuT1Vui 1v7MeS07c7FEA== In-Reply-To: <87sfeqq8z5.fsf@gmail.com> 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:256963 Archived-At: Jo=C3=A3o T=C3=A1vora writes: > Michael Albinus writes: >=20 > > You must set tramp-remote-path before accessing the remote server. > > Try this: > > > > ~/Source/Emacs/emacs/src/emacs -Q -l tramp > > \ > > --eval '(add-to-list (quote tramp-remote-path) "~/bin")' > > \ > > /ssh:sshuser@localhost#2022:$REMOTE_FILE > > \ > > -f eglot >=20 > This works, and this would explain the instability I saw earlier. > Thanks. I wonder if it fixes Jer=C3=B4me's problem, too. >=20 No I've already got it setup as part of my config before I ever access Tramp, which seems only logical: first configure the environment, then try to use it. Just to be clear, which problem are we talking about here? There were two related problems in my report: 1. When told that the language server is `rust-analyzer`, Eglot fails to launch it. This is caused by the hardcoded `"sh" "-c"` in `eglot--cmd` and is fixed by using `(or shell-file-name "sh") (or shell-command-switch "-c")`, possibly with an added `with-connection-local-variables` as per Michael's mail. Or maybe by removing the whole `eglot--cmd` function since from the comment it looks like it only exists to call `stty raw` for remote files, and Eglot is the only package that tries to do that. This can only be fixed in Eglot since that's where it's hardcoded. 2. Eglot doesn't detect `rust-analyzer` automatically. This could be related to the fact that `rust-analyzer` is in a non-standard path or to some mix-up between the local and remote environments (e.g. if Eglot tries to detect the server on the local PC even though it would need the remote one), or something else altogether. It is not fixed by the abovementioned changes.=20 I have no idea how Eglot tries to determine which server it should use, and so no idea where to start looking for a solution. J=C3=A9r=C3=B4me