unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#7470: 24.0.50; Word Isearch lazy highlighting
@ 2010-11-23 20:29 Dani Moncayo
  2010-11-24  1:43 ` Juri Linkov
  0 siblings, 1 reply; 4+ messages in thread
From: Dani Moncayo @ 2010-11-23 20:29 UTC (permalink / raw)
  To: 7470

Hi,

Please, consider the situation arising after performing these steps::
0) Start Emacs (emacs -Q).
1) Go to the beginning of the *scratch* buffer (M-<).
2) Start an incremental _word_ search (M-s w).
3) Type `that fil'.

After step 3, the second occurrence of `that fil' should be
highlighted with `lazy-highlighting' face [1], but that doesn't
happen.

--------------

[1] Emacs Manual. Section "13.3 Word Search" (node "Word Search").
Last paragraph:
>   A nonincremental word search differs slightly from the incremental
> version in the way it finds a match: the last word in the search string
> must be an exact match for a whole word.  In an incremental word
> search, the last word in the search string can match part of a word;
> this allows the matching to proceed incrementally as you type.

-- 
Dani Moncayo





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#7470: 24.0.50; Word Isearch lazy highlighting
  2010-11-23 20:29 bug#7470: 24.0.50; Word Isearch lazy highlighting Dani Moncayo
@ 2010-11-24  1:43 ` Juri Linkov
  2010-11-24  7:49   ` Dani Moncayo
  0 siblings, 1 reply; 4+ messages in thread
From: Juri Linkov @ 2010-11-24  1:43 UTC (permalink / raw)
  To: Dani Moncayo; +Cc: 7470

> Please, consider the situation arising after performing these steps::
> 0) Start Emacs (emacs -Q).
> 1) Go to the beginning of the *scratch* buffer (M-<).
> 2) Start an incremental _word_ search (M-s w).
> 3) Type `that fil'.
>
> After step 3, the second occurrence of `that fil' should be
> highlighted with `lazy-highlighting' face [1], but that doesn't
> happen.

The task of the word search is to find and highlight complete words.
The heuristics it applies with partial lax word search (comparing
the current search string with the previous one in `isearch-search-fun')
is to help the user to type the complete word search string
without signaling an error.  So I doubt that lazy highlighting should
follow the same logic as partial lax word search.

What does lazy highlighting try to tell the user: "Look, if you type
C-s, then Isearch will land in the next highlighted place".  But in case of
incomplete word search this is not true.  When the user types C-s,
it will not stop at the partial word string highlighted as you suggested.





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#7470: 24.0.50; Word Isearch lazy highlighting
  2010-11-24  1:43 ` Juri Linkov
@ 2010-11-24  7:49   ` Dani Moncayo
  2010-12-05  1:16     ` Chong Yidong
  0 siblings, 1 reply; 4+ messages in thread
From: Dani Moncayo @ 2010-11-24  7:49 UTC (permalink / raw)
  To: Juri Linkov; +Cc: 7470

On Wed, Nov 24, 2010 at 02:43, Juri Linkov <juri@jurta.org> wrote:
>
> The task of the word search is to find and highlight complete words.
> The heuristics it applies with partial lax word search (comparing
> the current search string with the previous one in `isearch-search-fun')
> is to help the user to type the complete word search string
> without signaling an error.  So I doubt that lazy highlighting should
> follow the same logic as partial lax word search.
>
> What does lazy highlighting try to tell the user: "Look, if you type
> C-s, then Isearch will land in the next highlighted place".  But in case of
> incomplete word search this is not true.  When the user types C-s,
> it will not stop at the partial word string highlighted as you suggested.
>

I understand and agree with your reasoning, and I think would be good
to include that idea in the section of the manual that I quoted
before. The way it is worded now seems a bit misleading/incomplete to
me.

Thank you very much.

-- 
Dani Moncayo





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#7470: 24.0.50; Word Isearch lazy highlighting
  2010-11-24  7:49   ` Dani Moncayo
@ 2010-12-05  1:16     ` Chong Yidong
  0 siblings, 0 replies; 4+ messages in thread
From: Chong Yidong @ 2010-12-05  1:16 UTC (permalink / raw)
  To: Dani Moncayo; +Cc: 7470

Dani Moncayo <dmoncayo@gmail.com> writes:

> I understand and agree with your reasoning, and I think would be good
> to include that idea in the section of the manual that I quoted
> before. The way it is worded now seems a bit misleading/incomplete to
> me.

I've changed the manual text to reflect this.  Thanks.





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-12-05  1:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-23 20:29 bug#7470: 24.0.50; Word Isearch lazy highlighting Dani Moncayo
2010-11-24  1:43 ` Juri Linkov
2010-11-24  7:49   ` Dani Moncayo
2010-12-05  1:16     ` Chong Yidong

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).