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: Thu, 09 May 2019 22:41:15 +0300 Organization: LINKOV.NET Message-ID: <87imujju04.fsf@mail.linkov.net> References: <87pnou2ak2.fsf@mail.linkov.net> <051f40d7-206b-e5b5-f0b7-2354d0552dcf@yandex.ru> <874l64raeu.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="258410"; 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 Thu May 09 21:59:18 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 1hOpCH-00154j-FI for geb-bug-gnu-emacs@m.gmane.org; Thu, 09 May 2019 21:59:17 +0200 Original-Received: from localhost ([127.0.0.1]:60176 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hOpCG-0005VP-CO for geb-bug-gnu-emacs@m.gmane.org; Thu, 09 May 2019 15:59:16 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:34370) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hOpAp-0004U9-2C for bug-gnu-emacs@gnu.org; Thu, 09 May 2019 15:57:49 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hOp3K-0001Xx-Dq for bug-gnu-emacs@gnu.org; Thu, 09 May 2019 15:50:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:51185) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hOp3K-0001Xi-5U for bug-gnu-emacs@gnu.org; Thu, 09 May 2019 15:50:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hOp3J-0005sw-VZ for bug-gnu-emacs@gnu.org; Thu, 09 May 2019 15:50:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 09 May 2019 19:50:01 +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.155743134422549 (code B ref 35624); Thu, 09 May 2019 19:50:01 +0000 Original-Received: (at 35624) by debbugs.gnu.org; 9 May 2019 19:49:04 +0000 Original-Received: from localhost ([127.0.0.1]:36494 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hOp2O-0005rc-7y for submit@debbugs.gnu.org; Thu, 09 May 2019 15:49:04 -0400 Original-Received: from bonobo.maple.relay.mailchannels.net ([23.83.214.22]:19498) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hOp2M-0005r8-9E; Thu, 09 May 2019 15:49:03 -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 D13D83E66E7; Thu, 9 May 2019 19:49:00 +0000 (UTC) Original-Received: from pdx1-sub0-mail-a59.g.dreamhost.com (unknown [100.96.20.60]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 872643E268B; Thu, 9 May 2019 19:49:00 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from pdx1-sub0-mail-a59.g.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.17.2); Thu, 09 May 2019 19:49:00 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Trade-Plucky: 4c957c147468d615_1557431340660_2865009672 X-MC-Loop-Signature: 1557431340660:3320052332 X-MC-Ingress-Time: 1557431340659 Original-Received: from pdx1-sub0-mail-a59.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a59.g.dreamhost.com (Postfix) with ESMTP id 0C9C480A88; Thu, 9 May 2019 12:49:00 -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=jK10XHFxOM1DlQh/kQq1Pt7U2Z0=; b= OVD71qExIT8H+6Pk306620KJkb1ey7q1WwSG7dKlF+GmXpG7cK/VVkPu65nBR7io FdVfNskLBtpyvzGl9WE/CH4H+55ZiF/KtCH5PWNF4wBpvdt4c/YGvCxYDarUT4NN cHGsSqXhvWxpiU/0s4Vhf2lfz6RlKM4Q3ol75n4ZJM8= 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-a59.g.dreamhost.com (Postfix) with ESMTPSA id 822C580A72; Thu, 9 May 2019 12:48:56 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a59 In-Reply-To: (Dmitry Gutov's message of "Thu, 9 May 2019 16:26:31 +0300") X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduuddrkeeigdekudcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdfftffgtefojffquffvnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffuohhfffgjkfgfgggtsehmtderredtredtnecuhfhrohhmpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqnecukfhppeeluddruddvledrleeirddvfedtnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledrleeirddvfedtpdhrvghtuhhrnhdqphgrthhhpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhhrtghpthhtohepughguhhtohhvseihrghnuggvgidrrhhunecuvehluhhsthgvrhfuihiivgeptd 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:159001 Archived-At: --=-=-= Content-Type: text/plain found 35624 26.1 tags 35624 + patch quit >> This is exactly what was my initial thought, but this is a wrong fix, >> as I realized later. > > Okay, let's work on it. > > I do want to just commit that patch first, since it was obviously the idea > behind the previous change. Since it's wrong in any case, better to revert it altogether in emacs-26. >> 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. > > The other option is check whether all lines between the point and EOB are > either empty of start with "Show 2X entries". Which is a design I don't > particularly like, but it could serve your goal. Actually there is the much needed function log-view-inside-comment-p for expanded comments, and this patch correctly handles all cases: --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=log-view-diff-message.patch diff --git a/lisp/vc/log-view.el b/lisp/vc/log-view.el index e47fad8908..f7aeacc273 100644 --- a/lisp/vc/log-view.el +++ b/lisp/vc/log-view.el @@ -618,10 +618,11 @@ log-view-diff-common ;; When TO and FR are the same, or when point is on a line after ;; the last entry, look at the previous revision. (when (or (string-equal fr to) - (>= (point) - (save-excursion - (goto-char (car fr-entry)) - (forward-line)))) + (and (not (log-view-inside-comment-p end)) + (save-excursion + (goto-char end) + (beginning-of-line) + (not (re-search-forward log-view-message-re nil t))))) (setq fr (vc-call-backend log-view-vc-backend 'previous-revision nil fr))) (vc-diff-internal t (list log-view-vc-backend --=-=-=--