Take the 2-minute tour ×

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

share|improve this question

3 Answers 3

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

(from http://www.gnu.org/software/emacs/NEWS.24.1)

share|improve this answer

Your Answer


