From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#35624: log-view-diff regression Date: Wed, 08 May 2019 22:52:41 +0300 Organization: LINKOV.NET Message-ID: <874l64raeu.fsf@mail.linkov.net> References: <87pnou2ak2.fsf@mail.linkov.net> <051f40d7-206b-e5b5-f0b7-2354d0552dcf@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="200811"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) Cc: 35624@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed May 08 21:55:30 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hOSez-000q1m-8d for geb-bug-gnu-emacs@m.gmane.org; Wed, 08 May 2019 21:55:25 +0200 Original-Received: from localhost ([127.0.0.1]:43127 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hOSey-0002KZ-6e for geb-bug-gnu-emacs@m.gmane.org; Wed, 08 May 2019 15:55:24 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:42754) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hOSee-0002Ie-Hs for bug-gnu-emacs@gnu.org; Wed, 08 May 2019 15:55:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hOSed-0000hj-Hj for bug-gnu-emacs@gnu.org; Wed, 08 May 2019 15:55:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:48803) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hOSed-0000hW-Ee for bug-gnu-emacs@gnu.org; Wed, 08 May 2019 15:55:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hOSed-0004me-Cf for bug-gnu-emacs@gnu.org; Wed, 08 May 2019 15:55:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 08 May 2019 19:55:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 35624 X-GNU-PR-Package: emacs Original-Received: via spool by 35624-submit@debbugs.gnu.org id=B35624.155734530018361 (code B ref 35624); Wed, 08 May 2019 19:55:03 +0000 Original-Received: (at 35624) by debbugs.gnu.org; 8 May 2019 19:55:00 +0000 Original-Received: from localhost ([127.0.0.1]:34112 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hOSea-0004m5-31 for submit@debbugs.gnu.org; Wed, 08 May 2019 15:55:00 -0400 Original-Received: from firebrick.maple.relay.mailchannels.net ([23.83.214.59]:29487) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hOSeW-0004lc-Rt for 35624@debbugs.gnu.org; Wed, 08 May 2019 15:54:57 -0400 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 8A3415E2ACC; Wed, 8 May 2019 19:54:55 +0000 (UTC) Original-Received: from pdx1-sub0-mail-a31.g.dreamhost.com (100-96-79-6.trex.outbound.svc.cluster.local [100.96.79.6]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 2B8825E17DC; Wed, 8 May 2019 19:54:52 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from pdx1-sub0-mail-a31.g.dreamhost.com ([TEMPUNAVAIL]. [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.17.2); Wed, 08 May 2019 19:54:55 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Coil-Occur: 562cb9181d27891f_1557345295233_2482227489 X-MC-Loop-Signature: 1557345295233:1592432728 X-MC-Ingress-Time: 1557345295233 Original-Received: from pdx1-sub0-mail-a31.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a31.g.dreamhost.com (Postfix) with ESMTP id F0B7B8014A; Wed, 8 May 2019 12:54:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=linkov.net; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=linkov.net; bh=jUFV/gppkHMSYj96AD9zxzKleP0=; b= fAu6IAgwZN5wWm3bhlTHIJ5A2iiika19ol3G5qInnc4V/8VE7Oyly25maxPMHlLQ b7dmIHQGGhohx+9/G7uZCDo9yrRrW/er30UddmiOTxKRHp2SSB5Xc4mH0UgC4h9p u0/uTU19YPSZlW8ANAP/DE0wwAHAcBnrpgeTdE+En1M= Original-Received: from mail.jurta.org (m91-129-96-230.cust.tele2.ee [91.129.96.230]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by pdx1-sub0-mail-a31.g.dreamhost.com (Postfix) with ESMTPSA id DDE6E80149; Wed, 8 May 2019 12:54:47 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a31 In-Reply-To: <051f40d7-206b-e5b5-f0b7-2354d0552dcf@yandex.ru> (Dmitry Gutov's message of "Wed, 8 May 2019 01:54:32 +0300") X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduuddrkeefgddugeefucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrdeliedrvdeftdenucfrrghrrghmpehmohguvgepshhmthhppdhhvghlohepmhgrihhlrdhjuhhrthgrrdhorhhgpdhinhgvthepledurdduvdelrdeliedrvdeftddprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopegughhuthhovheshigrnhguvgigrdhruhenucevlhhushhtvghrufhiiigvpedu X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:158959 Archived-At: > I think the patch should look like the one below instead. Does it fix your > problem? It also looks "obviously correct" in my opinion. This is exactly what was my initial thought, but this is a wrong fix, as I realized later. > 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 patch doesn't check if the region's end is after the last revision, also fails if the summary line is expanded to multiline revision's header/body. > Your proposal would fail in the presence of "Show 2X entries" (when the log > is long enough). Yes, I know my previous patch is not perfect, I also tried (not (re-search-forward log-view-message-re nil t)) but it seems this is impossible to do because currently log-view.el doesn't support the notion of the end of the last revision expanded body. For example, 1. with the expanded last visible revision * h8..: 2019-05-08 Revision h8. b * g7..: 2019-05-07 Revision g7. * f6..: 2019-05-06 Revision f6. * e5..: 2019-05-05 Revision e5. commit e5 Date: 2019-05-05 first line second line e third line should compare e5 and g7 2. but when region's end (e) is after the last line of the last expanded revision: * h8..: 2019-05-08 Revision h8. b * g7..: 2019-05-07 Revision g7. * f6..: 2019-05-06 Revision f6. * e5..: 2019-05-05 Revision e5. commit e5 Date: 2019-05-05 first line second line third line e should compare d4 (a previous revision of the last revision) and g7.