GNU bug report logs -
#25562
25.1; isearch-forward-word first matches a non-word
Previous Next
Full log
View this message in rfc822 format
Juri Linkov <juri <at> linkov.net> writes:
> Thanks for confirming that it would be a good solution. We are
> already using "Pending" indication in the search prompt in other
> places to show that the search is not yet fully accepted.
Ok, then let's just do this.
> This could do the same for word search as well:
>
> diff --git a/lisp/isearch.el b/lisp/isearch.el
> index 5c48c30..3c9dff1 100644
> --- a/lisp/isearch.el
> +++ b/lisp/isearch.el
> @@ -2741,6 +2747,8 @@ (defun isearch-search-fun-default ()
> (if isearch-forward #'re-search-forward #'re-search-backward)
> (cond (isearch-regexp-function
> (let ((lax (isearch--lax-regexp-function-p)))
> + (when lax
> + (setq isearch-adjusted t))
> (if (functionp isearch-regexp-function)
> (funcall isearch-regexp-function string lax)
> (word-search-regexp string lax))))
I tried it. Works as I would expect in *scratch* and dired, but hmm,
not in Info (the prompt just doesn't contain "pending" there). I tried
with emacs -Q, and in any buffer I started a word search and just began
typing characters.
BTW, a different question: when I delete characters from my input (with
backspace) in a word search and then add some new characters, I somehow
expected that isearch would return to that "pending" state. But I got
the jumpy (nonlax) incremental search behavior instead. I don't have an
opinion about that, just wanted to mention it.
Regards,
Michael.
This bug report was last modified 8 years and 98 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.