Subject: bug#61926: 29.0.60; [PATCH] Make tramp-remote-path behave like exec-path

From: Stefan Kangas <[email-masked]>
Date: Tue, 11 Feb 2025 20:38:08 -0800

João Távora <[email-masked]> writes:

> On Fri, Mar 3, 2023 at 7:24 AM Eli Zaretskii <[email-masked]> wrote:
>
>> We nowadays have variable-watching feature in Emacs, see
>> add-variable-watcher.  Could that facility be used in this case to
>> allow a more elegant solution?
>
> Yes, good idea.  But only if we have access to the cache
> locations that we have to flush. These would be the "remote-path"
> properties of every Tramp connection, and I _think_ there's
> an accessor for that, but I have to check.
>
> Which reminds me, that patch I sent has a big thinko :-)
>
> If you re-set tramp-remote-path you get flushing for the
> next call to tramp-get-remote-path, which will be for a given
> connection.  At that moment you forget changes by setting
> tramp-last-used-remote-path so and you will fail to flush for
> the next connection.
>
> Not hard to fix, we just have to make sure to flush _all_
> connections when we detect the change, however we detect it.

What's the status here?  Did you make any progress with this?