[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#61926: 29.0.60; [PATCH] Make tramp-remote-path behave like exec-path
From: |
João Távora |
Subject: |
bug#61926: 29.0.60; [PATCH] Make tramp-remote-path behave like exec-path |
Date: |
Fri, 3 Mar 2023 16:20:29 +0000 |
On Fri, Mar 3, 2023 at 7:24 AM Eli Zaretskii <eliz@gnu.org> 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.
João