GNU bug report logs - #77529
31.0.50; [Feature Request][VC] How can I get the current revision of the buffer opened by =vc-find-revision=?

Previous Next

Package: emacs;

Reported by: jixiuf <jixiuf <at> qq.com>

Date: Fri, 4 Apr 2025 04:26:01 UTC

Severity: wishlist

Found in version 31.0.50

Done: Sean Whitton <spwhitton <at> spwhitton.name>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: jixiuf <jixiuf <at> qq.com>
Cc: 77529 <at> debbugs.gnu.org
Subject: bug#77529: 31.0.50; [Feature Request][VC] How can I get the current revision of the buffer opened by =vc-find-revision=?
Date: Sat, 05 Apr 2025 10:55:44 +0300
> From: jixiuf <jixiuf <at> qq.com>
> Cc: 77529 <at> debbugs.gnu.org
> Date: Sat, 05 Apr 2025 15:41:28 +0800
> 
> Eli Zaretskii <eliz <at> gnu.org> writes:
> 
> >
> > Emacs already has vc-git-next-revision, so if you need this only
> > for Git, the function is already there, you just need to wrap it with
> > a command.
> >
> > As for vc-prev-revision, isn't that just SHA^, where SHA is the hash
> > of the revision used to call vc-prev-revision?
> 
> 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?).




This bug report was last modified 93 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.