emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: isearch-allow-move [Was: isearch-allow-prefix]


From: Juri Linkov
Subject: Re: isearch-allow-move [Was: isearch-allow-prefix]
Date: Fri, 07 Jun 2013 22:30:18 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu)

> What happens in a regexp search?  Particularly when the last typed
> characters are "\)" or "]", or "?", or there's still an unbalanced
> "\(" in the string.

It does exactly the same as `C-M-w' already does in a regexp search.
IOW, the new feature just replaces `C-M-r ... C-M-w C-M-w ...'
with a more intuitive key sequence `C-M-r ... M-s C-b C-b ...'

If the existing `C-M-w' (isearch-del-char) has some problems,
then `M-s C-b' shares the same problems with it, although
I'm not aware of any problems with `isearch-del-char'.

However, the new feature `M-s C-f' helped to discover a problem
in a word search where the same problem exists in `C-M-y'
(isearch-yank-char).

Test case: type `M-s w C-M-y C-M-y ...' and see how it fails
to grab the next character at the word boundary at the end
of the word.

This bug should be fixed with the following patch:

=== modified file 'lisp/isearch.el'
--- lisp/isearch.el     2013-06-05 20:57:09 +0000
+++ lisp/isearch.el     2013-06-07 19:28:35 +0000
@@ -1549,7 +1635,7 @@ (defun word-search-regexp (string &optio
       ""
     (concat
      "\\b"
-     (mapconcat 'identity (split-string string "\\W+" t) "\\W+")
+     (mapconcat 'identity (split-string string "\\W+") "\\W+")
      (if (or (not lax) (string-match-p "\\W$" string)) "\\b"))))
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]