From: Lars Ingebrigtsen <larsi@gnus.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 20470@debbugs.gnu.org, Raoul Gough <raoulgough@yahoo.co.uk>
Subject: bug#20470: 24.5; VC log buffer no longer scrolls itself
Date: Tue, 25 Aug 2020 11:22:16 +0200 [thread overview]
Message-ID: <871rjvdqrb.fsf@gnus.org> (raw)
In-Reply-To: <jwvd22k2nn1.fsf-monnier+emacsbugs@gnu.org> (Stefan Monnier's message of "Fri, 01 May 2015 13:53:15 -0400")
Stefan Monnier <monnier@iro.umontreal.ca> writes:
>> How to reproduce: open a file checked out from RCS, hit C-x v l (or
>> equivalently M-x vc-print-log RET) and notice that the cursor ends up at
>> the start of the *vc-change-log* buffer. It should jump to the log
>> message for the current revision, which was the case until the fix for
>> bug #15322 "VC log buffer scrolls itself"
>
> How far are the two positions? What's between them?
I'm popped to a buffer containing this, and point is at the start of the
buffer. So the revision itself is way down there:
RCS file: foo,v
Working file: foo
head: 1.1
branch:
locks: strict
larsi: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
foo
----------------------------
revision 1.1 locked by: larsi;
date: 2020/08/25 09:15:10; author: larsi; state: Exp;
Initial revision
>> The particular revision control system doesn't really matter,
>
> I'm beginning to suspect it does. IIRC RCS (and CVS) put a bunch of
> file-level metadata before the actual log, whereas other VCSes just put
> the log right away. So for RCS/CVS it might make sense to skip to the
> first actual log message, so as to reproduce the behavior of
> other backends.
>
> Skipping to the log message corresponding to "the current revision"
> seems much less important (and this is the part that was problematic
> with the old behavior).
Yes, I think so too. I this only makes much of a difference for
rcs/cvs, so I'm not sure it worth adding this? Not many people use
those these days...
I've respun the patch for Emacs 28, though.
Apply the patch or close the bug as a "wontfix"?
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el
index 5561292d8c..6dad0cf83a 100644
--- a/lisp/vc/vc.el
+++ b/lisp/vc/vc.el
@@ -817,6 +817,12 @@ vc-log-show-limit
Not all VC backends are able to support this feature."
:type 'integer)
+(defcustom vc-log-jump-to-current nil
+ "If non-nil, `vc-print-log' moves point automatically to the
+log message for the current working revision."
+ :type 'boolean
+ :version "28.1")
+
(defcustom vc-allow-async-revert nil
"Specifies whether the diff during \\[vc-revert] may be asynchronous.
Enabling this option means that you can confirm a revert operation even
@@ -2502,8 +2508,9 @@ vc-print-log
(let* ((vc-fileset (vc-deduce-fileset t)) ;FIXME: Why t? --Stef
(backend (car vc-fileset))
(files (cadr vc-fileset))
-;; (working-revision (or working-revision (vc-working-revision (car files))))
- )
+ (working-revision
+ (or working-revision
+ (and vc-log-jump-to-current (vc-working-revision (car files))))))
(vc-print-log-internal backend files working-revision nil limit)))
;;;###autoload
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
next prev parent reply other threads:[~2020-08-25 9:22 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-30 13:22 bug#20470: 24.5; VC log buffer no longer scrolls itself Raoul Gough
2015-04-30 16:01 ` bug#20470: Acknowledgement (24.5; VC log buffer no longer scrolls itself) Raoul Gough
2015-05-01 17:53 ` bug#20470: 24.5; VC log buffer no longer scrolls itself Stefan Monnier
2020-08-25 9:22 ` Lars Ingebrigtsen [this message]
2020-08-25 18:30 ` Juri Linkov
2020-10-11 3:18 ` Lars Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=871rjvdqrb.fsf@gnus.org \
--to=larsi@gnus.org \
--cc=20470@debbugs.gnu.org \
--cc=monnier@iro.umontreal.ca \
--cc=raoulgough@yahoo.co.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.