Eli Zaretskii writes: >> But how can I get the SHA of the current revision when I am in a buffer >> opened by =vc-find-revision=? > > That's the argument with which vc-find-revision was called, right? So > the only change we might need is to record the revision in some > buffer-local variable, if we don't already do that (don't we show the > revision of the mode line?). Yes a buffer-local. the 'revision' on the mode line is part of buffer name, not always a revision. (vc-find-revision "doc/lispref/help.texi" "remotes/origin/emacs-29" 'Git)