emacs-devel
[Top][All Lists]
Advanced

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

Re: isearch-query-replace-regexp and stuff


From: Juri Linkov
Subject: Re: isearch-query-replace-regexp and stuff
Date: Fri, 09 Jul 2004 23:54:14 +0300
User-agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (gnu/linux)

David Kastrup <address@hidden> writes:
> And how would you want to write this in the manual?
>
> "You can use either M-% or C-M-% in a regexp isearch to do a regexp
> replacement, but only M-% will do a plain replacement in normal
> isearch whereas C-M-% will switch to a regexp replacement, while the
> current match will not [or maybe will?] get quotified so the match
> does not stop for future replacements".
>
> That's a bunch of crock.  It is not worth the price in obscurity,
> just to save the user from pressing one additional key.

But information about pressing that additional key to switch the
search to regexp mode to start a regexp replacement should be
documented in the manual too.

Anyway, I looked at the problem from the user's point of view and
allowing C-M-% to call a regexp replacement in normal isearch was
based on the simple premise: it is natural for Emacs users to expect
that typing C-M-% regardless of search type (regexp or normal) will
start a regexp replacement with the from-string taken from the search
string displayed in the isearch echo area.  And it is the responsibility
of the user to guarantee that the search string before typing C-M-% is
literally the same as the user intended to use it for the from-string
argument of a regexp replacement.

If you agree with this, appropriately writing this in the manual might
not look too ugly.  If not, it's not a big problem not to bind C-M-%
to a regexp replacement in normal isearch.

-- 
Juri Linkov
http://www.jurta.org/emacs/





reply via email to

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