[Top][All Lists]

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

Re: Isearch interaction model

From: dancol
Subject: Re: Isearch interaction model
Date: Tue, 6 Mar 2018 14:22:58 -0800
User-agent: SquirrelMail/1.4.23 [SVN]

>> I think the answer is to have one history which records the mode used
>> for
>> each search, so that it is reused correctly.  (When it makes sense, the
>> user can change the search mode after selecting the history element.)
> I still don't see how this unified history should work.  Suppose we have
> a history variable like
> (setq isearch-history
>   '(((search-string "word") (mode word))
>     ((search-string "regexp") (mode regexp))))
> Then after typing ‘C-M-s M-p’ (in regexp search mode) what should it
> do?
> Possible variants:
> 1. Take a previous history item with the same search mode,
>    i.e. the string "regexp", skipping the last used search "word".
> 2. Take the last history item "word" and toggle the current search mode
>    from regexp mode to word mode.
> 3. Take the last history item and adapt it to the current search mode,
>    so turn the search string "word" into the regexp "\<word\>".
> 4. Take the last history item and do nothing more.
>    Then what to do when the last search string is a regexp
>    and the current search mode is not regexp mode?

The isearch mode should be attached to the history item. C-M-s M-p and C-s
M-p should have the same effect: the "mode" is only a default for a new
search. If the last search was a regex search, it'll put in you regex
search mode.

reply via email to

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