From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#20470: 24.5; VC log buffer no longer scrolls itself Date: Tue, 25 Aug 2020 11:22:16 +0200 Message-ID: <871rjvdqrb.fsf@gnus.org> References: <1430400129.57087.YahooMailBasic@web171304.mail.ir2.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22386"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 20470@debbugs.gnu.org, Raoul Gough To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Aug 25 11:23:13 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kAVAf-0005gu-5V for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 25 Aug 2020 11:23:13 +0200 Original-Received: from localhost ([::1]:39778 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kAVAd-0003WN-Ma for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 25 Aug 2020 05:23:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41878) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kAVAU-0003WC-IW for bug-gnu-emacs@gnu.org; Tue, 25 Aug 2020 05:23:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:48743) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kAVAU-0006Ff-7h for bug-gnu-emacs@gnu.org; Tue, 25 Aug 2020 05:23:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kAVAU-0002Ah-4D for bug-gnu-emacs@gnu.org; Tue, 25 Aug 2020 05:23:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 25 Aug 2020 09:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20470 X-GNU-PR-Package: emacs Original-Received: via spool by 20470-submit@debbugs.gnu.org id=B20470.15983473518297 (code B ref 20470); Tue, 25 Aug 2020 09:23:02 +0000 Original-Received: (at 20470) by debbugs.gnu.org; 25 Aug 2020 09:22:31 +0000 Original-Received: from localhost ([127.0.0.1]:60289 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kAV9y-00029l-L9 for submit@debbugs.gnu.org; Tue, 25 Aug 2020 05:22:30 -0400 Original-Received: from quimby.gnus.org ([95.216.78.240]:38872) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kAV9w-00029W-3z for 20470@debbugs.gnu.org; Tue, 25 Aug 2020 05:22:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=YdlpuOa1SzoBc2CW8pAy7aT9ZVz0K/i0UkMiJPQWGgo=; b=t+pRgDjKz3XWu/jdP92ppvmwzK tJ5mYUKSnpOcoAcnw6NJ0nGB0zX0rpx5PENvrnanp4RP1yjmH3c1mfiV2ywmtkPnobn2bc3rC5oI+ StqkFYEqbqoQ+pd1yA2hxBSj7PW1Au5oPvRN2Dua9tKdD+z0y/NmPT5hRNJso6BSg8MU=; Original-Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kAV9m-0003fp-Aj; Tue, 25 Aug 2020 11:22:21 +0200 X-Now-Playing: Jim O'Rourke's _To Magnetize Money and Return a Roving Eye (2)_: "To Magnetize Money and Return a Roving Eye pt2" In-Reply-To: (Stefan Monnier's message of "Fri, 01 May 2015 13:53:15 -0400") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:186243 Archived-At: Stefan Monnier 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