From: "Drew Adams" <drew.adams@oracle.com>
To: "'Dani Moncayo'" <dmoncayo@gmail.com>
Cc: 'Stefan Monnier' <monnier@iro.umontreal.ca>, emacs-devel@gnu.org
Subject: RE: Isearch: retrieve last successful search string from when you quit (`C-g')
Date: Mon, 1 Oct 2012 11:47:48 -0700 [thread overview]
Message-ID: <39255EF6E11E4DA1BB439ED7BBAB1695@us.oracle.com> (raw)
In-Reply-To: <CAH8Pv0h9-kwmJqQAsFZ6YtAysD5ULempo7FOC4fzykonWasUbg@mail.gmail.com>
> 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.
next prev parent reply other threads:[~2012-10-01 18:47 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-30 21:09 Isearch: retrieve last successful search string from when you quit (`C-g') Drew Adams
2012-10-01 6:41 ` Dani Moncayo
2012-10-01 14:57 ` Stefan Monnier
2012-10-01 15:05 ` Christopher Monsanto
2012-10-01 15:11 ` Dani Moncayo
2012-10-01 15:22 ` Drew Adams
2012-10-01 15:21 ` Drew Adams
2012-10-01 15:30 ` Christopher Monsanto
2012-10-01 15:40 ` Drew Adams
2012-10-01 15:41 ` Dani Moncayo
2012-10-01 16:00 ` Drew Adams
2012-10-01 17:49 ` Juri Linkov
2012-10-01 18:21 ` Drew Adams
2012-10-01 18:31 ` Dani Moncayo
2012-10-01 18:47 ` Drew Adams [this message]
2012-10-01 18:50 ` Christopher Monsanto
2012-10-01 18:54 ` Lennart Borgman
2012-10-01 20:00 ` Drew Adams
2012-10-01 19:12 ` Dani Moncayo
2012-10-02 11:26 ` Nix
2012-10-02 13:55 ` Drew Adams
2012-10-02 16:48 ` Eli Zaretskii
2012-10-04 11:37 ` Nix
2012-10-05 22:58 ` Andrew W. Nosenko
2012-10-01 15:18 ` Drew Adams
2012-10-02 3:22 ` Stephen J. Turnbull
2012-10-02 12:37 ` Richard Stallman
2012-10-02 14:05 ` Isearch: retrieve last successful search string from when youquit (`C-g') Drew Adams
2012-10-01 15:17 ` Isearch: retrieve last successful search string from when you quit (`C-g') Drew Adams
2012-10-02 11:29 ` Nix
2012-10-02 14:03 ` Drew Adams
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=39255EF6E11E4DA1BB439ED7BBAB1695@us.oracle.com \
--to=drew.adams@oracle.com \
--cc=dmoncayo@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).