Emacs 26.1, Ido , smex,

Open scratch buffer.

C-s to find text file Here result: enter image description here


Now I want to find another text: text

Here result: enter image description here

Nice. It's work fine. But now I want to backward in search history. So I need again to search text (in minibuffer): file

How I can do this?

1 Answer 1


You can search backwards with C-r, and you can go backward and forward through search history with M-p and M-n respectively.

  • 1
    You might want to emphasize the last part - it's the answer to the question. I don't think OP is also asking about search direction.
    – Drew
    Oct 23, 2018 at 18:10
  • When I press "M-p" or "M-n" I get message in "M-p/M-n is underfined". If I input command "previous-history-element" I get another error: "Wrong type argument: number-or-marker-p, nil" Oct 24, 2018 at 7:45
  • Does the problem persist when you run emacs -q?
    – user12563
    Oct 24, 2018 at 8:02
  • Yes. With "emacs -Q" I also get this error. I use Emacs 26.1 on Windows 10 (64 bit) Oct 24, 2018 at 10:37
  • Are you typing these commands in the minibuffer for isearch?
    – user12563
    Oct 24, 2018 at 16:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.