Hi, Is it possible to reset a connection local variable to the default in a buffer when default-directory changes from remote to local? I have attached an example ert test to demonstrate the issue. I would kind of expect the supplied code to work but I may be doing something wrong and there might be some other way of doing this. Couldn't find anything in the manual though. To run the code: emacs -Q -l ./connection-local.el The problem is a real world problem from my package rg.el (https://github.com/dajva/rg.el). It is similar to the grep.el package with the added possibility to rerun a searches with modified parameters from the results buffer. So a typical use case would be to do a search on a remote host and then change the default-directory in the results buffer to do the same search on the local computer. The connection local is used to store the path to the ripgrep executable that is driving the search. Best regards, David Landell