emacs-devel
[Top][All Lists]
Advanced

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

Re: Isearch interaction model


From: Juri Linkov
Subject: Re: Isearch interaction model
Date: Tue, 06 Mar 2018 23:47:36 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu)

> 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?



reply via email to

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