[Top][All Lists]

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

RE: Isearch: retrieve last successful search string from when you quit (

From: Drew Adams
Subject: RE: Isearch: retrieve last successful search string from when you quit (`C-g')
Date: Mon, 1 Oct 2012 08:21:01 -0700

> To be honest, I always thought there was some bug in isearch that made
> it forget my search strings.  I'd love it if isearch just
> unconditionally remembered my searches.

It is not a bug; it is by design.  And a good design it is.

AFAIK, no one has ever filed a bug report complaining that abandoned searches
are not saved in the histories.

I doubt if you would really love it, in practice.  But it is simple for you to
try it, to see.

As an analogy, think of moving to a search hit and staying there as "entering"
the search string into an input history, much as when you hit RET to choose a
completion during minibuffer input with completion.  Would you want your input
history to also remember the minibuffer content that was current each time you
hit TAB?  I don't think so.

When you "accept" a search hit, moving there and ending Isearch, it shows that
the search string was useful to you.  It should be added to the search history.

When you abandon searching, regardless of whether you might have looked at some
search hits, it indicates that you did not want to move to any of them and stay
there.  That search was not useful to you - at least not in terms of changing
your location.  That search string should not be added to the history, IMO.  The
history is (and should remain, IMO) a history of used searches.

But for the last such successful-but-unused search string, yes, there should
perhaps be a way to get it back.  That is what I proposed, not systematically
adding unused searches to the history.

reply via email to

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