Open crazazy opened 3 years ago
@crazazy, thanks for your contribution. For the record could you elaborate what went wrong and how your PR fixes it?
I think this is how it works, but I'm not 100% sure. So in the old version, the exec-path variable didn't actually get changed within executable-find, but actually creates a new binding within the let form and within the let form only. make-local-variable changes the value of exec-path, but only in the current buffer. This means we temporarily change the value of exec-path buffer-wide instead of let-binding wide, which does affect the behavior of executable-find
Having said that, I believe there is a flaw in my implementation as well, since the variable is still affected if you don't change the buffer.
I found that the former version of nix-executable-find didn't work. I've tested this one and it seems to work now