GNU bug report logs -
#10885
Replace expressions: enhance functionality when searching in filled paragraphs
Previous Next
Reported by: linuxfever <linuxfever <at> yahoo.gr>
Date: Sun, 26 Feb 2012 01:31:01 UTC
Severity: wishlist
Done: Juri Linkov <juri <at> jurta.org>
Bug is archived. No further changes may be made.
Full log
Message #23 received at 10885 <at> debbugs.gnu.org (full text, mbox):
>> In a nutshell, I believe enhancing the functionality of the replacement
>> functions to accommodate for expressions split in two lines, would make
>> their usability so much easier.
>
> Adding a "word-type mode" to query-replace (analogous of the word-type
> mode of Isearch) would do what you want, and would be a good feature,
> IMO.
>
> That is: add an option to query-replace whereby the matches are found
> using a word-type search, instead of the (default) normal search.
There exists already a "word query-replace mode" with `C-u M-%',
but currently it is very limited.
To bring it in sync with the "word search" is possible
with this patch (for 24.2):
=== modified file 'lisp/replace.el'
--- lisp/replace.el 2012-02-24 22:46:57 +0000
+++ lisp/replace.el 2012-02-27 10:55:04 +0000
@@ -1813,10 +1813,7 @@ (defun perform-replace (from-string repl
(if delimited-flag
(setq search-function 're-search-forward
- search-string (concat "\\b"
- (if regexp-flag from-string
- (regexp-quote from-string))
- "\\b")))
+ search-string (word-search-regexp from-string)))
(when query-replace-lazy-highlight
(setq isearch-lazy-highlight-last-string nil))
This bug report was last modified 12 years and 259 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.