Someone just pulled code you wrote last year. You want to know who it was, what they saw, and when they touched it.
This is where Emacs can become more than just an editor. With the right setup, you can turn it into a full audit tool—tracking file access, line edits, and timestamps without leaving your workflow. When you manage a large repository or sensitive code, knowing exactly who accessed what and when is not optional—it’s essential.
Tracking Who Accessed What and When in Emacs
Emacs has built-in ways to log edits through version control integration, but you can take this further. By combining Emacs with hooks and git-blame or time-stamped commit history views, you unlock a precise log of every access. You can instantly jump to annotations showing the commit author and timestamp. This makes it possible to see not only who changed a file, but also to detect when someone simply read it by running hooks tied to file-opening events.
Hooks That Record Access
Set up find-file-hook in Emacs to trigger a logging function each time a file is opened. Send this data to a secure store that records user identity and timestamp. Pair this with project-wide search of the history to cross-check edits versus reads. With a custom logging layer, you can go beyond git history and watch for silent inspections that never commit code.