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: Sun, 04 Mar 2018 00:50:27 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu)

>>> We have a search history because it's often the case that we want to
>>> repeat something we've recently done --- look up the same word, find
>>> the same function, and so on. It doesn't make sense to me that the
>>> exact mechanism we use to search for a particular thing should
>>> affect its recency or the way in which we recall it.
>> But "repeating" a search for \_<foo\_> as a non-regexp search is useless.
>
> It is. That's why we'll store the search flags along with the history
> entry. A long time ago (years and years), I posted a proof-of-concept of
> this model to emacs-devel.
>
>>
>>> It's very easy already to casually switch between literal and regex
>>> isearch with M-r. Why should this distinction affect the way in which
>>> we recall that search?
>> 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.)
>>
>
> Yep.

One of the main questions to decide is how to attach search parameters
to the search string in the search history in a backward-compatible way.
We can't do this by adding text properties with search parameters
to the search string because text properties on strings can't be saved
in the desktop file or by other history saving libraries.

I see no way other than introducing a new incompatible history variable
that will keep previous searches with parameters in the same format
as is used currently by the search stack in isearch-cmds.



reply via email to

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