This is pretty simple, I'm trying to find (or build) a hook that fires when files are visited and selected (i.e. immediately displayed).
Background
I'm writing a UI centric entry for find-file-hook
, but it turns out that find-file-hook
is fired for all sorts of things that I don't need:
- Semantic assets which are loaded when semantic starts
- Files opened in the background for my on-the-fly diffing program
- Probably other stuff, that's all I could think of off the top of my head
Most of this is done by way of find-file-noselect
, which associates a buffer with a file, but does not switch-to-buffer
on the newly created buffer like find-file
does.
I would like my hook to execute only when the current buffer changes.