all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Dmitry Gutov <dgutov@yandex.ru>
To: Juri Linkov <juri@linkov.net>
Cc: 35624@debbugs.gnu.org
Subject: bug#35624: log-view-diff regression
Date: Thu, 9 May 2019 16:26:31 +0300	[thread overview]
Message-ID: <cd810df2-e041-1ca7-3dee-ba5b7922fcba@yandex.ru> (raw)
In-Reply-To: <874l64raeu.fsf@mail.linkov.net>

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.





  reply	other threads:[~2019-05-09 13:26 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-07 21:56 bug#35624: log-view-diff regression Juri Linkov
2019-05-07 22:54 ` Dmitry Gutov
2019-05-08 19:52   ` Juri Linkov
2019-05-09 13:26     ` Dmitry Gutov [this message]
2019-05-09 19:41       ` Juri Linkov
2019-05-10  0:14         ` Dmitry Gutov
2019-05-10  7:56           ` Eli Zaretskii
2019-05-11 20:58           ` Juri Linkov
2019-05-13  0:32             ` Dmitry Gutov
2019-05-13 20:40               ` Juri Linkov
2019-05-13 21:21                 ` Dmitry Gutov
2019-05-14 20:29                   ` Juri Linkov
2019-05-15  0:34                     ` Dmitry Gutov
2019-05-15 21:12                       ` Juri Linkov
2019-05-15 22:05                         ` Dmitry Gutov
2019-05-16 20:04                           ` Juri Linkov
2019-05-19 20:11                             ` Juri Linkov
2019-05-20 23:29                               ` Dmitry Gutov
2019-05-21 20:12                                 ` Juri Linkov
2019-05-21 20:39                                   ` Dmitry Gutov
2019-05-21 21:32                                     ` Juri Linkov
2019-05-21 21:52                                       ` Dmitry Gutov
2019-05-22 21:52                                         ` Dmitry Gutov
2019-05-23 21:07                                         ` Juri Linkov
2019-05-24  1:29                                           ` Dmitry Gutov
2019-05-24 18:41                                             ` Juri Linkov
2019-05-27 15:26                                               ` Dmitry Gutov
2019-05-27 19:47                                                 ` Juri Linkov
2019-06-10  0:57                                                   ` Dmitry Gutov
2019-06-10 20:50                                                     ` Juri Linkov
2019-06-10 22:19                                                       ` Dmitry Gutov
2019-06-16  0:55                                                   ` Dmitry Gutov
2019-06-16 20:13                                                     ` Juri Linkov
2019-06-17 13:48                                                       ` Dmitry Gutov
2019-06-17 20:42                                                         ` Juri Linkov
2019-06-17 22:23                                                           ` Dmitry Gutov
2019-05-20 23:39                             ` Dmitry Gutov
2019-05-10  7:54     ` Eli Zaretskii
2019-05-08  6:01 ` Eli Zaretskii
2019-05-08 19:52   ` Juri Linkov
2019-05-10  7:51     ` Eli Zaretskii
2019-05-11 20:53       ` Juri Linkov
2019-05-12  2:36         ` Eli Zaretskii
2019-05-12 19:15           ` Juri Linkov
2019-05-13 14:24             ` Eli Zaretskii
2019-05-13 14:44               ` Dmitry Gutov
2019-05-13 15:09                 ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cd810df2-e041-1ca7-3dee-ba5b7922fcba@yandex.ru \
    --to=dgutov@yandex.ru \
    --cc=35624@debbugs.gnu.org \
    --cc=juri@linkov.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.