Subject: Re: bug#18131: 24.4.50; View-search-... skips all matches between (point) and edge of window

From: Dima Kogan <[email-masked]>
Date: Sat, 24 Dec 2016 22:43:04 -0800

Lars Ingebrigtsen <[email-masked]> writes:

> Dima Kogan <[email-masked]> writes:
>
>> The emacs view-mode has navigation with 'n' and 'p' keys to navigate by
>> searching (like isearch, but with fewer keystrokes and very similar to
>> less and vi).
>>
>> I just discovered that unlike less and vi, this view-mode navigation
>> doesn't hit all the matches, but rather skips the ones between (point)
>> and the edge of the window. This ensures that any matches that are
>> visible by the user (but not highlighted by view-mode) are skipped.
>>
>> This clearly was a design choice, rather than a bug. However, the
>> documentation doesn't mention this, and I think it is counterintuitive.
>> Attaching a very simple patch to fix.
>
> [...]
>
>> -	(move-to-window-line (if (< times 0) 0 -1)))
>
> If this was a design choice, then we should perhaps ask the person who
> designed it what it's all about...  which isn't easy in this instance,
> since this is very old code.
>
> Does anybody have an opinion here?

Can we revisit this? I think view-mode behaving like 'less' does would
be an improvement.