unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Isearch: retrieve last successful search string from when you quit (`C-g')
@ 2012-09-30 21:09 Drew Adams
  2012-10-01  6:41 ` Dani Moncayo
  0 siblings, 1 reply; 31+ messages in thread
From: Drew Adams @ 2012-09-30 21:09 UTC (permalink / raw)
  To: emacs-devel

I sometimes isearch for a term but ultimately decide not to go to any of its
locations, at least not for the moment.  That is, I hit `C-g' after navigating
around a bit to check things out.

In some cases, the search string for this might have required a bit of typing.
Or maybe it came from multiple `C-w's at search startup, and maybe I later moved
away from that start location, so it would be cumbersome to try to get back that
search string again, for another search.

I guess for a long time I've sub-thought, without considering it consciously,
that it might be good to get back that last successful search string -- the one
I was searching with when I hit `C-g' to quit searching -- for reuse later.  But
it's not saved on the search rings (which makes sense), so it is not available.
`C-g' means bye-bye.

In Isearch+, I added a key (`M-g') to retrieve on demand that last successful
search string (for `C-s') or regexp (for `C-M-s') that was current at the time I
canceled with `C-g'.  To me, it seems handy.

Retrieval is a yank, not a replacement of your current search string.  So you
can append the retrieved string to whatever you are already looking for (or you
can search for just the retrieved string/regexp).

If this sounds like something with wider appeal, let me know - the patch to
isearch.el would be trivial.  You can try it quickly by loading isearch+.el.
http://www.emacswiki.org/emacs-en/download/isearch%2b.el




^ permalink raw reply	[flat|nested] 31+ messages in thread

end of thread, other threads:[~2012-10-05 22:58 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2012-10-02 14:03       ` Drew Adams

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).