[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 11:47:48 -0700 |
> I've tested your proposal (I don't need to test the other one, since
> the behavior is pretty obvious).
Good. Thanks for trying it out.
> I see two problems in your proposal:
> 1. It adds a bit of (unnecesary) user-level complexity: the users has
> to remember whether the search string was accepted (i.e. pushed to the
> search ring) or not, since the way of retrieving it is different in
> each case.
> 2. The user can't The search string is lost if is not accepted and is
> not the last one.
Agreed. To me, neither of those is a problem in practice.
But it is well to point them out.
As I said, if the second is really a problem then we could add separate search
rings for such strings. Having used the feature a bit, I don't really think
that's necessary. I use `M-g' to retrieve such a string only occasionally, and
the last such string is the one I want, in practice. YMMV.
> The following approach overcomes these two problems:
>
> Define a new user-option whereby the user can choose between
> these 3 behaviors:
> a. Don't remember any cancelled search strings: i.e., the
> current behavior.
> b. Remember only the last cancelled search string: if the users
> cancels an i-search with `C-g', that search string will be retrieved
> by `C-s C-s' or `C-s M-p' as if it was stored at the top of the search
> ring; but this string will be forgot/removed after the next i-search
> session.
> b. Remember all cancelled search string: any cancelled search string
> will be pushed to the search ring, like the accepted ones.
>
> I think this approach is simple and flexible. I would adapt to the
> different usage patterns that people have expressed so far in this
> thread.
None of those 3 does what I proposed and what you tried: be able to _yank_ that
search string anywhere you like into the current search string, as many times as
you like.
Think of what `C-y' does during search - this is similar to that. (But you can
follow `C-y' with `M-y' to cycle through the kill ring. My proposal does not
save/retrieve more than the most recent such search string, as you pointed out.)
Anyway, I've explained this enough. For anyone who wants it there is Isearch+.
Whatever Emacs Dev ends up doing for isearch.el, I hope that at least users will
be able to get the current, traditional behavior back. And I would hope that
any optional alternative behavior be opt-in rather than opt-out.
- Re: Isearch: retrieve last successful search string from when you quit (`C-g'), (continued)
- RE: Isearch: retrieve last successful search string from when you quit (`C-g'), Drew Adams, 2012/10/01
- Re: Isearch: retrieve last successful search string from when you quit (`C-g'), Christopher Monsanto, 2012/10/01
- RE: Isearch: retrieve last successful search string from when you quit (`C-g'), Drew Adams, 2012/10/01
- Re: Isearch: retrieve last successful search string from when you quit (`C-g'), Dani Moncayo, 2012/10/01
- RE: Isearch: retrieve last successful search string from when you quit (`C-g'), Drew Adams, 2012/10/01
- Re: Isearch: retrieve last successful search string from when you quit (`C-g'), Juri Linkov, 2012/10/01
- RE: Isearch: retrieve last successful search string from when you quit (`C-g'), Drew Adams, 2012/10/01
- Re: Isearch: retrieve last successful search string from when you quit (`C-g'), Dani Moncayo, 2012/10/01
- RE: Isearch: retrieve last successful search string from when you quit (`C-g'),
Drew Adams <=
- Re: Isearch: retrieve last successful search string from when you quit (`C-g'), Christopher Monsanto, 2012/10/01
- Re: Isearch: retrieve last successful search string from when you quit (`C-g'), Lennart Borgman, 2012/10/01
- RE: Isearch: retrieve last successful search string from when you quit (`C-g'), Drew Adams, 2012/10/01
- Re: Isearch: retrieve last successful search string from when you quit (`C-g'), Dani Moncayo, 2012/10/01
- Re: Isearch: retrieve last successful search string from when you quit (`C-g'), Nix, 2012/10/02
- RE: Isearch: retrieve last successful search string from when you quit (`C-g'), Drew Adams, 2012/10/02
- Re: Isearch: retrieve last successful search string from when you quit (`C-g'), Eli Zaretskii, 2012/10/02
- Re: Isearch: retrieve last successful search string from when you quit (`C-g'), Nix, 2012/10/04
- Re: Isearch: retrieve last successful search string from when you quit (`C-g'), Andrew W. Nosenko, 2012/10/05
RE: Isearch: retrieve last successful search string from when you quit (`C-g'), Drew Adams, 2012/10/01