From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#35624: log-view-diff regression Date: Thu, 9 May 2019 16:26:31 +0300 Message-ID: References: <87pnou2ak2.fsf@mail.linkov.net> <051f40d7-206b-e5b5-f0b7-2354d0552dcf@yandex.ru> <874l64raeu.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="260374"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 Cc: 35624@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu May 09 15:27: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 1hOj58-0015bL-9i for geb-bug-gnu-emacs@m.gmane.org; Thu, 09 May 2019 15:27:30 +0200 Original-Received: from localhost ([127.0.0.1]:54576 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hOj57-0004je-8h for geb-bug-gnu-emacs@m.gmane.org; Thu, 09 May 2019 09:27:29 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:48851) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hOj4j-0004X3-Ux for bug-gnu-emacs@gnu.org; Thu, 09 May 2019 09:27:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hOj4i-000417-2q for bug-gnu-emacs@gnu.org; Thu, 09 May 2019 09:27:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49699) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hOj4g-00040j-6V for bug-gnu-emacs@gnu.org; Thu, 09 May 2019 09:27:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hOj4g-0002WU-0j for bug-gnu-emacs@gnu.org; Thu, 09 May 2019 09:27:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 09 May 2019 13:27: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.15574084149685 (code B ref 35624); Thu, 09 May 2019 13:27:01 +0000 Original-Received: (at 35624) by debbugs.gnu.org; 9 May 2019 13:26:54 +0000 Original-Received: from localhost ([127.0.0.1]:35010 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hOj4Y-0002W8-56 for submit@debbugs.gnu.org; Thu, 09 May 2019 09:26:54 -0400 Original-Received: from mail-wr1-f67.google.com ([209.85.221.67]:38281) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hOj4V-0002Vk-1c for 35624@debbugs.gnu.org; Thu, 09 May 2019 09:26:52 -0400 Original-Received: by mail-wr1-f67.google.com with SMTP id v11so3076758wru.5 for <35624@debbugs.gnu.org>; Thu, 09 May 2019 06:26:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=C/Rm2YU356stKk30k/F1AWfQPdkxIKgeBhvQDxuL9CE=; b=XEyfkby9Vk7HgLJOdifKc+kVnksLqcLBj1Og8WnWmoAdAv//3HEBx5RNWr51wqRGw2 dh8WhsWYc/ikbuUeYgXRaNmayAg0pKRWmCQjx3ZKbcTONcQg+rAKHnlGM+aWdIfus0+N +ytP2fdcQebz5mXaT8XnwGYc2Oqmp3nLCWFZDDOey9VmUEWf0umQMrJjj8zBLa48NKk+ 5B42/HJ1zMhvqx3lmjyuC0LvJiibz8bXpUM7HMHjadrOl9ki+qJ/dGhjVvjOuWqfQw4N yO1kaAooC//jB9D+trQhFBO08gPZUVk2mtIVGfy/P0MH4B291ZIWeG0GB+WBMRXtmIdQ LCgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=C/Rm2YU356stKk30k/F1AWfQPdkxIKgeBhvQDxuL9CE=; b=jZ8ozUAJIJpawtKdZJncyf4ytDWeLRR0gfTGNyfZYM3TAZ05Wy5Aq+BQD3yFYy/Ame 50IEG62uKxp1R8YM4IsrPo9fgISxrE5Sm9WWsdszI0EmwRFRO5Zm1mWw+eR67stc37XX O2qEbyM1IpbWJatFJANB4D344i41aLr9J9WImzxWv82QRvvA0ZJQgC6M5XtFAMarsLdq RCOizMZP+a1wdXnBDUmU1uD2TsHrUtfhmFU5vzWAFSP5WRr2RAZrG8lq7psOUAoMRs53 RqYXpMUuDQ4S6iAvgwaeFH/g2U7RUI2s1npLGvoKH3IxPdqwCOdZdIBCeflkIVXYnmru wkzw== X-Gm-Message-State: APjAAAWGQYnga+7pLg90QZhtiOiU2Pf7mLjq29qX3FFzjvFlezka6bC+ hdu4AHZdXOfJmtTo5VUKdBJ099Gh X-Google-Smtp-Source: APXvYqxC6sMj5Dq4NBqgqm4grikP2al18BT4dBETeYO8/vYnmeR2SBScMOdnn1rRo5hRcShWgmWnHw== X-Received: by 2002:adf:cf0e:: with SMTP id o14mr3040640wrj.230.1557408404588; Thu, 09 May 2019 06:26:44 -0700 (PDT) Original-Received: from [192.168.0.195] ([109.110.245.170]) by smtp.googlemail.com with ESMTPSA id x5sm1116065wrt.72.2019.05.09.06.26.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 09 May 2019 06:26:33 -0700 (PDT) In-Reply-To: <874l64raeu.fsf@mail.linkov.net> Content-Language: en-US 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:158986 Archived-At: On 08.05.2019 22:52, Juri Linkov wrote: > 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. >> 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, What do you mean it doesn't? That's the whole purpose of the comparison (the part of the function the diff above changes). > also fails if the summary line is expanded to multiline revision's header/body. Isn't it the only situation where it fails? I wouldn't say it's a hugely important case. The whole approach becomes iffy once the lower bound position is *inside* the revision entry. Should it be the lower bound? Should the changes be included in the diff? I could never be sure without looking at the docstring. >> 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. 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.