emacs-devel
[Top][All Lists]
Advanced

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

Re: Word Delimited Query Replace


From: Stefan Monnier
Subject: Re: Word Delimited Query Replace
Date: Sat, 18 Oct 2008 15:21:58 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

> BTW, I discovered a UI problem: to prepare the patch it was necessary
> to rename the string "default" but not its plural form "defaults" in
> read-regexp.  So I selected the region around the body of read-regexp
> and typed `C-s default C-u M-%'.  The C-u prefix argument of query-replace
> means to replace only matches surrounded by word boundaries, but while
> implementing isearch-query-replace a few years ago we missed this case,
> so currently isearch-query-replace just ignores it.

IIUC the right way to do it is to use M-s w during the search to toggle
isearch-word, after which M-% should DTRT (just like M-% in regexp
isearch requests a query-replace-regexp).

Also, are you sure your patch works?  As far as I can tell, C-u
currently leaves isearch, and I don't see anything in your patch that
would change it.


        Stefan




reply via email to

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