GNU bug report logs - #61748
27.2; Eglot should use shell-file-name when launching the language server for a remote file

Previous Next

Package: emacs;

Reported by: jeberger <at> free.fr

Date: Fri, 24 Feb 2023 07:40:01 UTC

Severity: normal

Found in version 27.2

Done: João Távora <joaotavora <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: João Távora <joaotavora <at> gmail.com>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: jeberger <at> free.fr, 61748 <at> debbugs.gnu.org
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 15:23:24 +0000
On Tue, Feb 28, 2023 at 3:15 PM Michael Albinus <michael.albinus <at> gmx.de> wrote:

> > Indeed, as the adage goes, cache invalidation is a hard problem of
> > computer science, we deal with it every day.  But it's a bit unfair to expect
> > the user to solve it.
>
> I don't expect a user to solve it. And a user shouldn't expect that
> changing a variable is sufficient.

I respectfully but diametrically disagree here.

Here's an untested patch that could solve this.  It can probably
be made smarter by only invalidating the cache when a change
to the variable is detected.

João

diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index ec8437176db..eae00923395 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -5578,11 +5578,7 @@ tramp-get-remote-path
     ;; Expand connection-local variables.
     (tramp-set-connection-local-variables vec)
     (with-tramp-connection-property
- ;; When `tramp-own-remote-path' is in `tramp-remote-path', we
- ;; cache the result for the session only.  Otherwise, the
- ;; result is cached persistently.
- (if (memq 'tramp-own-remote-path tramp-remote-path)
-     (tramp-get-process vec) vec)
+ (tramp-get-process vec)
  "remote-path"
       (let* ((remote-path (copy-tree tramp-remote-path))
       (elt1 (memq 'tramp-default-remote-path remote-path))




This bug report was last modified 2 years and 161 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.