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: Wed, 07 Jul 2004 21:29:52 +0300
User-agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (gnu/linux)

David Kastrup <address@hidden> writes:
> Juri Linkov <address@hidden> writes:
>> The current behavior of C-M-s to repeat the non-regexp search is not
>> the most reasonable one.  More correct would be to switch the search
>> to regexp mode before doing the search again.  I guess it works now
>> that way because it was simpler to implement and nobody cared about
>> handling this case specially.  But we could change the behavior of
>> C-M-s in non-regexp mode to switch to regexp mode for consistency
>> with C-M-%.
>
> But that's inconsistent with being able to use both C-s and M-C-s in
> regexp searches.
>
> Don't you see that?

You can see the following comments for `isearch-mode-map' in isearch.el
(underlining is mine):

    ;; Define M-C-s and M-C-r like C-s and C-r so that the same key
    ;; combinations can be used to repeat regexp isearches that can
                                          ================
    ;; be used to start these searches.

So the meaning of C-M-s in a non-regexp search is still undefined,
and the fact that C-M-s can repeat a non-regexp search is a side effect
of the current implementation.

And there is no symmetry between normal and regexp searches and it
doesn't need to be.  The regexp search C-M-s is regarded everywhere
in Emacs as a specific type of more general C-s search per se.  So
there is no need to keep symmetry for C-M-s in a normal search with
C-M-s in a regexp search.

And moreover, more appropriate action for C-M-s in a normal search is
to switch the search to regexp mode because the Meta key in C-M-s
has an strong association with a specific regexp search type.

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





reply via email to

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