all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Nix <nix@esperi.org.uk>
To: "Drew Adams" <drew.adams@oracle.com>
Cc: emacs-devel@gnu.org, 'Dani Moncayo' <dmoncayo@gmail.com>
Subject: Re: Isearch: retrieve last successful search string from when you quit (`C-g')
Date: Tue, 02 Oct 2012 12:29:21 +0100	[thread overview]
Message-ID: <87k3v95cz2.fsf@spindle.srvr.nix> (raw)
In-Reply-To: <CF1094981F9D4B1BAEF89B0C5B5B2E12@us.oracle.com> (Drew Adams's message of "Mon, 1 Oct 2012 08:17:49 -0700")

On 1 Oct 2012, Drew Adams told this:
> This is a one-off, occasional thing - nowhere near as frequent as reusing a
> search that you actually followed.  Just imagine saving your search rings
> persistently (e.g. via savehist.el), to see the folly of saving each successful
> but abandoned search string.

If you're trying to avoid having unsuccessful searches crowd successful
ones out of he history, the right solution is presumably to have two
rings, one for successful searches, one for unsuccessful ones, and have
the default 'back in search' option merge the two rings at runtime.
(This is easily implementable by making each entry in each ring a pair
of (counter . value), incrementing the counter on each ring insertion,
and taking from whichever ring has the lowest counter value for the next
item on each ring pop.)

This has the benefit that it is easy to have two keybindings to navigate
each ring independently, if you so desire.

-- 
NULL && (void)



  reply	other threads:[~2012-10-02 11:29 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
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 [this message]
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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87k3v95cz2.fsf@spindle.srvr.nix \
    --to=nix@esperi.org.uk \
    --cc=dmoncayo@gmail.com \
    --cc=drew.adams@oracle.com \
    --cc=emacs-devel@gnu.org \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.