Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In Emacs why can I not paste text C-y into a C-s search box?

share|improve this question
up vote 8 down vote accepted

Follow this pattern:

  1. Esc-W // To copy of the selected text into buffer

  2. Ctrl-s Then press return.

  3. Ctrl-y Then press return. // To paste selected text

Then repeat Ctrl-s for incremental search. Similarly for decremental search, use Ctrl-r.

share|improve this answer
Small correction: Esc-W is actually M-w (where Meta can be done with pressing ESC followed by the command key, or by pressing Alt together with the command key; all depending on configuration (and keyboard, if you happen to have a Meta key ;-))) – Jürgen A. Erhard Jan 14 '11 at 18:43
Interesting trick, didn't know about pressing return when in i-search :·) – Nikana Reklawyks Nov 18 '12 at 20:15
I'd underline the fact it is needed to press RET just after C-s. I missed it, and wondered why the paste didn't worked. – Hi-Angel Nov 11 '14 at 5:56

The command you are looking for is isearch-yank-kill which is bound to M-y when in isearch

M-y runs the command isearch-yank-kill, which is an interactive compiled Lisp function in `isearch.el'.


Pull string from kill ring into search string.

share|improve this answer

Since Emacs 24.1, you can.

C-y in Isearch is now bound to isearch-yank-kill, instead of isearch-yank-line.


share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .