Subject: Re: bug#25562: 25.1; isearch-forward-word first matches a non-word

From: Juri Linkov <[email-masked]>
Date: Wed, 01 Feb 2017 02:44:36 +0200

>> I agree it's an ill defined problem ; but then, so is isearching for foo\|bar.
>>
>> I disabled the beeping and screen flashing, so it doesn't bother me, but I get the point.
>>
>> In the end, it's mostly a matter of personal convenience. The patched behavior suits me better, and seems
>> more consistent with the way regexp are handled.
>
> Did you try typing RET right after "C-s M-s w", then typing the word
> to search, and then typing "C-s C-s" again to repeat that?  This might
> be better suited to your needs, I think, and it doesn't require any
> changes.

Since incrementality of word search is not well-defined,
it makes sense to type the word in non-incremental mode indeed.

One problem I noticed is that it's not easy to get back to incremental
mode: after typing a word in non-incremental mode ‘M-s w RET it’
typing ‘C-s’ in the minibuffer doesn't go back to incremental mode.
Also ‘C-s C-s’ doesn't reuse the previous word search.
We need to fix this.