GNU bug report logs - #35624
log-view-diff regression

Previous Next

Package: emacs;

Reported by: Juri Linkov <juri <at> linkov.net>

Date: Tue, 7 May 2019 22:02:02 UTC

Severity: normal

Tags: patch

Found in version 26.1

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 35624 <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Juri Linkov <juri <at> linkov.net>, 35624 <at> debbugs.gnu.org
Subject: Re: bug#35624: log-view-diff regression
Date: Wed, 8 May 2019 01:54:32 +0300
On 08.05.2019 0:56, Juri Linkov wrote:
> bug#28466 caused a regression in 26.0.50.  Maybe it's too late to fix it
> in the release branch, so the patch below is for master.
> 
> The problem is that after the change a year and a half ago
> log-view-diff always falls back to the previous revision
> even when point is in the middle of the log buffer,
> and not after the last entry.
> 
> This patch uses the previous revision only at the end of the log buffer:

Hi Juri,

I think the patch should look like the one below instead. Does it fix 
your problem? It also looks "obviously correct" in my opinion.

Your proposal would fail in the presence of "Show 2X entries" (when the 
log is long enough).

diff --git a/lisp/vc/log-view.el b/lisp/vc/log-view.el
index e47fad8908..e1e453115b 100644
--- a/lisp/vc/log-view.el
+++ b/lisp/vc/log-view.el
@@ -621,7 +621,8 @@ log-view-diff-common
               (>= (point)
                   (save-excursion
                     (goto-char (car fr-entry))
-                    (forward-line))))
+                    (forward-line)
+                    (point))))
       (setq fr (vc-call-backend log-view-vc-backend 'previous-revision 
nil fr)))
     (vc-diff-internal
      t (list log-view-vc-backend




This bug report was last modified 5 years and 337 days ago.

Previous Next


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