0

I'm an emacs newbie . I use C-s "text" to search for a text. How do I select from a previous search buffer to research an entry instead of typing it allover again . For instance C-S "text1" C-S "text2" Is there a shortcut to remeber text1 so I dont have to type it again while I search for it ?

nogeek001
  • 713
  • 1
  • 7
  • 14

1 Answers1

0

If you press C-s C-s you will search for whatever you searched for the last time.

Using M-p you can walk up in the search history and also edit the search string. Press RET to continue searching.

Lindydancer
  • 25,428
  • 4
  • 49
  • 68
  • M-p however does nothing for me . I'm able to get M-x but M-p just shows up as Esc-p or Alt-p . What can I do to fix this? – nogeek001 Mar 16 '15 at 20:47
  • You can just use `ESC p` instead of `Alt-p` (`M-p`). E.g., `C-s ESC p`. – Drew Mar 17 '15 at 14:56
  • 2
    And BTW, since it might be related in use: You can search for any text that you select, including from another application than Emacs, by (a) copying it and then (b) using `M-y` within Isearch. E.g., copy the text `foobar` from some application, then `C-s M-y` yanks `foobar` onto the end of the current search string (which is empty, to start with). – Drew Mar 17 '15 at 14:59