From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.bugs Subject: bug#66093: Eglot over tramp sshfs/sftp Date: Fri, 22 Sep 2023 20:02:21 +0200 Message-ID: <87h6nm9jde.fsf@gmx.de> References: <878r92wqpf.fsf@gmx.de> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29477"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 66093@debbugs.gnu.org, joaotavora@gmail.com To: Ko Nishi Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Sep 22 20:03:10 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 1qjkUg-0007Th-Ny for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 22 Sep 2023 20:03:10 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qjkUR-0003Wq-4g; Fri, 22 Sep 2023 14:02:55 -0400 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 1qjkUO-0003WY-KG for bug-gnu-emacs@gnu.org; Fri, 22 Sep 2023 14:02:53 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qjkUO-00054D-5u for bug-gnu-emacs@gnu.org; Fri, 22 Sep 2023 14:02:52 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qjkUY-0008PA-FV for bug-gnu-emacs@gnu.org; Fri, 22 Sep 2023 14:03:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 22 Sep 2023 18:03:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66093 X-GNU-PR-Package: emacs Original-Received: via spool by 66093-submit@debbugs.gnu.org id=B66093.169540576432283 (code B ref 66093); Fri, 22 Sep 2023 18:03:02 +0000 Original-Received: (at 66093) by debbugs.gnu.org; 22 Sep 2023 18:02:44 +0000 Original-Received: from localhost ([127.0.0.1]:37274 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qjkUF-0008Od-MJ for submit@debbugs.gnu.org; Fri, 22 Sep 2023 14:02:44 -0400 Original-Received: from mout.gmx.net ([212.227.15.15]:50059) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qjkUC-0008OP-4p for 66093@debbugs.gnu.org; Fri, 22 Sep 2023 14:02:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.de; s=s31663417; t=1695405742; x=1696010542; i=michael.albinus@gmx.de; bh=mE5rt+zROb1Ee3bRP6JliWUzsLpB+h6kIejAqzxln+4=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date; b=DFsUepvBVSKz8mcZ401sPta31OkHvvABZ8+g3vjQWXp8jNZFpVxBLrsVbbMLs5I7h3kxZ7qrUWG oijgxUyF4QX6bxo8YUXXv+UfFh75SCC3opyb7t7Xy8ohtncJb5UQ5iaMUtSL6g+5k1/mJ2YzIAM74 jzvtJF/lJjgLM9PIYeo+Q+5SCmE6tysEzz/rpK0dTnJjCN34PseGaJdjl1U6wrLB266fW0kVt8Hn3 tklUD/pfjUUaKD8YQVVBkbhDbXl5F6Fo+fDJxACARjJfdthsTbDIRytLiUQmm518a2euMwC5zqeog A0hGUex2rV9DvlA4LhY2crxAh7urHyDDeGuA== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Original-Received: from gandalf.gmx.de ([185.89.39.17]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MhU9Z-1rNSt30pFb-00ef0G; Fri, 22 Sep 2023 20:02:22 +0200 In-Reply-To: (Ko Nishi's message of "Tue, 19 Sep 2023 20:59:06 +0200") X-Provags-ID: V03:K1:5CTRNuto/vV90Ipv+kn/ZcWodtX/TKZ8fzOVeFTBlZyYWmVm+Jw /eBLcjCz5FwCYDmCBwWHjxvYwq7X6iwv9cxkpZxcMdAMUStKfhyziLJHNUyPjKWzN/CqB4C mQWGIGtCctJpmmFfbFdJq+TVnOeAtfBpJs388v1IVglSHNMdv/n5tPc501QQLvG+UEm6gZY UKCUblXpTifnmlUe1eksA== UI-OutboundReport: notjunk:1;M01:P0:ZLwUYqtS+qE=;uIaO1GnD1rrYpGH0uD1E88Ve6/8 hChIhRs/o5xejKwjTQn/BLLwY52/77SbdCDe9BnmPhDqnFqaS8WI2ByUlEYfadqwgenpR18x4 hXUaj0J37BW2WZPm0GP/ZVRMGV30P0Y9tYW7raZPIWl7gXB8JS2xg7xEUNL/LINm5kusPKxhT 1KKAW4RhIYDC0kQcDb7i2JeqspDIPNfqFCRS+HlmWAEZ/f3vSZX3+XzwYsV8TtdOd97xLSATW bej9pwUywBgKc1k4Xov30vmuQV+nd3vAEc+O5P7FXwYLyxcUmBPA4+N2ELKFo6stQtohk4HW5 HmZjHFTc0tOeA/VKYtctB12kwf10x5jepN/kY8WKhX3L2bpWS7Vumk08jzPiXCjsHgAshMOg8 9KonWTF57b/Vl9JZj5wFGM0uN7jcGPfxmKO9rzzzjgHpF8blOtQifaiXsbbNNjgMUAcm20cX9 Uuf5aISgiBkVkkaVpqyHzN6vzVAx8ZGRb6BxvNTV28Eu3/EzyI1ZJTePhBcClLtOgIDHclaUi CT/8NtiMC3uHAd8vEF/LjKevipKkgNNqEUA5SztAOL96xJfTkJvGb76ecmnMwxEIjGeDnKXTF Vi83w2sRJOW5mQJTtotcDACitEBK1KvptdUrBHpPqJ9vzXoDgc7anGc+nl2LpwucWfCPvk/yP d9eatr0vAfTWaplrycHS2XnBfBywwphVUEyd4MkHQk8WU3cJW6ID3kbNN4PZ+upor4sUycpK3 1TsXBqHBEVZuLLHXBcK+KB6MXamTXh+vyuDU+qnJiN+Vlxv6bCxPcGxZDYIWtaW/ZLjIFK0D 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:271119 Archived-At: --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Ko Nishi writes: > Hi Michael, Hi Ko, > Without really understanding the code, If I copy the list from the ssh > section of tramp-sh.el:245 and remove ("%c"), it started work after > manually telling eglot to start clangd manually on propmt. Well, after all it was a perfect shot! The "-t -t" ssh arguments have prevented the pipe process, eglot is using, to work properly. Could you pls test the appended patch? It is on top of the emacs-29 branch of the Emacs git repository, but it should apply also on the Emacs 29.1 sources. > Other than that many other things aren't working like vc-root-dir, > finding PATH and etc. > I'll try to understand the code and play around later. Yep, that's still open. Perhaps my patch improves the situation, because it suppresses the "-t -t" arguments only for pipe processes. > Best, > Ko Best regards, Michael. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment Content-Transfer-Encoding: quoted-printable diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 8ace0165ed9..7e6fce16d56 100644 =2D-- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -283,6 +283,8 @@ tramp-methods - \"%z\" is replaced by the `tramp-scp-direct-remote-copying' argument if it is supported. - \"%d\" is replaced by the device detected by `tramp-adb-get-device'= . + - \"%a\" adds the tty allocation argument \"-t\" in + asynchronous processes, if the connection type is not `pipe'. The existence of `tramp-login-args', combined with the absence of `tramp-copy-args', is an indication that the @@ -5033,6 +5035,7 @@ tramp-handle-make-process (when adb-file-name-handler-p (tramp-compat-funcall 'tramp-adb-get-device v))) + (tty-allocation (unless (eq connection-type 'pipe) "-t")= ) login-args p) ;; Replace `login-args' place holders. Split @@ -5049,7 +5052,7 @@ tramp-handle-make-process v 'tramp-login-args ?h (or host "") ?u (or user "") ?p (or port "") ?c (format-spec (or options "") (format-spec-make ?t tmpfile)) - ?d (or device "") ?l "")))) + ?d (or device "") ?a (or tty-allocation "") ?l "")))) p (make-process :name name :buffer buffer :command (append `(,login-program) login-args command) --=-=-=--