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.help Subject: Re: tramp-sshfs doesn't seem to respect tramp-remote-path Date: Thu, 08 Aug 2024 16:23:23 +0200 Message-ID: <87mslnks9w.fsf@gmx.de> References: <072f5d9f-42d9-4d64-a9f0-e49ca0a1142d@tecgraf.puc-rio.br> <87h6c6g72m.fsf@gmx.de> <7a469804-eb2a-4aab-8e7f-31b4147c2f05@tecgraf.puc-rio.br> <871q39okab.fsf@gmx.de> <1a94e324-1a79-4c9a-8eeb-770e7249b523@tecgraf.puc-rio.br> <87a5hxldfc.fsf@gmx.de> <0359c325-007d-4cae-82b7-c262214c33a2@tecgraf.puc-rio.br> <87r0azkuqf.fsf@gmx.de> <3f15bb51-8145-4b79-9465-12dfa063729b@tecgraf.puc-rio.br> 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="19051"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: help-gnu-emacs@gnu.org To: Luiz =?utf-8?Q?Rom=C3=A1rio?= Santana Rios Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu Aug 08 16:24:17 2024 Return-path: Envelope-to: geh-help-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 1sc43s-0004k8-BC for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 08 Aug 2024 16:24:16 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sc43G-00062m-6y; Thu, 08 Aug 2024 10:23:38 -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 1sc43A-0005gU-HI for help-gnu-emacs@gnu.org; Thu, 08 Aug 2024 10:23:33 -0400 Original-Received: from mout.gmx.net ([212.227.17.21]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sc438-0004zB-MB for help-gnu-emacs@gnu.org; Thu, 08 Aug 2024 10:23:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.de; s=s31663417; t=1723127005; x=1723731805; i=michael.albinus@gmx.de; bh=4p1LsoQ/ZqT3QgY9xX5ISAOfSuMgzZ46l3MDoP8Nbvw=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date: Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:cc: content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=lFD+9MZhx2RCV8Vel9XwCmi2MNO96BM3LciAt0BIt0sSddRACkz3cHu0lSl66+ku IblyiZPzp1E1FGAaS5PtGkrJfdFBzCaK54PN+DfKT3qF00CqiXnlD7HwRvyKH/sAE 7UjTikcJubRRugiUa0MWSgdCIKC6chPabm0Wq5OZJ1qDRVHd/fMrKB2/WEUzKwPP5 et4fYn2TrAXJygdfbZ6rJeNG8pwLBg23oXzLrU+h5nBi6kKFjhNQ8QAo+qJUaSR8I eEoGVc/dresgsrmDjgisoZcM0nEqVxx1deT8hJnt5QpRV5tuCM8D/szx5Zmu7RAc8 u8eMZVDgJ3KpCThgKg== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Original-Received: from gandalf.gmx.de ([185.89.38.155]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1McpNy-1s3HSh1YfK-00aw9k; Thu, 08 Aug 2024 16:23:25 +0200 In-Reply-To: <3f15bb51-8145-4b79-9465-12dfa063729b@tecgraf.puc-rio.br> ("Luiz =?utf-8?Q?Rom=C3=A1rio?= Santana Rios"'s message of "Thu, 8 Aug 2024 10:37:54 -0300") X-Provags-ID: V03:K1:Bnm6k10zxCc0EjQwW2HGdYOveYx0GN3PYZzbogigETTrl2hEbGT mhRd1sxUjUCshfqi/wen7YPKm77PgYROTO4NUQPr6tsmvlH1X2Teydw6+yWeP6Jx7ZNX1oD yFC13c0dghJURljzm3KMNNsHFZnOcohxJP71Cxe1EJFUB4kESpVOleAS+PB4hsTsfZlrnoX /XKKloPt8CumOj5srMRWg== UI-OutboundReport: notjunk:1;M01:P0:t3sd3fi0TPk=;oh5B3I4iI0YJoXP734hVSTI5mog UbTKJLB294+yuWFmfJZQqnohoLrkTsfrTA9psbhU3YRDgdpRgdWVTdoKtzwCnbyxliInDlFIJ ozBPpWmRXgErWnQsR3ddzR8SDG4jOxe9RehVY1bbPAGJMNS/aWLHdCudXTrbX1HOEfRwhYFQN 6poxDmyR88zK3V4D5zgio9x/RDi+d2UNsdp1X/mq5BFVc3P2SD6439X48LRUOUdT+7Uoc8Mgt fTe5tr4SBukCXaLZOPXc9Rn72tU/5AbGiNKd/Ku8UA7kapoSr0HAMHGgagV2bXa3BpwR2OFUa p/Zw+//Yvl3I+SkyinKlpVCWd8ite89FvfgkSSpawRFICn2dFsg1cXdtXMBVcA6dvSZxNcdIq zZjgBiLCAwhvR719K3NbPVFmnDnAQdPTUwu0KsqKN/GyhJoexjgTBsVLoPN8/n/P9HfI/H8LX RwCGEek9a6527ZVKOWx3teKVv1fwpfjDtEhORXQYduPxjZnFhKvVjdTVN8J1gk3ocqCYUAtBg KPsimdLJc2E0vV97bzsjNhw/AY3eKcoxAJxmc1Rubr+TFeLHK9PIsCqyyDJZhrHi1CjBDNtkJ +TF3MI/D32vIFs7Ri87cWWqwhWc6ouTqI2ecSBngZ2ylWxTM6ns4eeBURMPxTr2TptwuZATro P6yRJfsOPGJDw9og1Gtr2SNhgwfc2RmlhJkO4jAEvijRmZJZ+WGselgB3+bPJeX6LNUArPwZU pPwS0BXST788W6Mr6ptsHjJn+sy1x9cjayBT1H6mOTl8o9nbD0AoymNBJ0Rfyr/AOeIjneKY Received-SPF: pass client-ip=212.227.17.21; envelope-from=michael.albinus@gmx.de; helo=mout.gmx.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:147546 Archived-At: Luiz Rom=C3=A1rio Santana Rios writes: Hi Rom=C3=A1rio, > Thanks for the explanation. > > Any reason we couldn't just query `tramp-remote-path` instead of > calling getconf? I've been using eglot with sshfs for a while and it > doesn't seem to have any trouble calling a remote clangd process. Because tramp-remote-path has some features which aren't well suited for sshfs connections. For example, there are the tramp-default-remote-path and tramp-own-remote-path symbols. Furthermore, Tramp applies a sanity check when using it, and removes non-existing directories. And tramp-remote-path is marked as connection-local variable, which isn't supported in tramp-sshfs.el. > I'd be very interested in ironing out sshfs. I work remotely through > an ssh connection everyday and sshfs has greatly improved performance > and stability compared to the regular ssh, but this issue prevents me > from e.g. calling magit. I've never looked into emacs's code, but I > know a little emacs-lisp from writing my own .emacs file. Where do I > look for resources on adding support to `tramp-remote-path` on sshfs? You might override tramp-sshfs-handle-exec-path with an own implementation. Something like (untested) --8<---------------cut here---------------start------------->8--- (with-eval-after-load 'tramp-sshfs (add-function :override (symbol-function #'tramp-sshfs-handle-exec-path) (lambda () `("/bin" "/usr/bin" ;; The equivalent to `exec-directory'. ,(tramp-file-local-name (expand-file-name default-directory)))))) --8<---------------cut here---------------end--------------->8--- However, I don't know whether it works sufficiently. process-file for remote sshfs processes uses the *local* call-process, so there might be differences in used exec directories and program availability. > Regards, Rom=C3=A1rio. Best regards, Michael.