1

This is in accordance to question Using Emacs to recursively find and replace in text files not already open. I already tried using find-name-dired and also package findr.el. It did open a file where the matching text found, but... how can I go to another file, not this automatically opened file????

Thank you!

Community
  • 1
  • 1
swdev
  • 4,997
  • 8
  • 64
  • 106

1 Answers1

3

This seems like more than one question.

find-name-dired will create a results buffer listing all the files with matching filenames. Use C-h m to see dired-mode's help, and all its key-bindings. RET will open the file at point, o will open the file at point in another window, and C-o will do the same, but leaves you in the Find window (which is convenient if you want to quickly visit several of those files).

findr-search (which is what it sounds like you're using) appears to work more like a tags mechanism. C-h f findr-search RET says that you can navigate to the next match with M-,. This will cycle through the matches in the current file, and then on to the next file as necessary.

phils
  • 71,335
  • 11
  • 153
  • 198
  • 1
    Yes! Yes! What I need is M-, That's soo helpful! I use package findr.el from http://www.emacswiki.org/emacs/FindrPackage and I can go to subsequent match using M-, Thanks you so much phils! – swdev Jan 26 '11 at 07:17
  • excuse me, but how can I go back to the previous match? that is the reverse of M-,? thanks :) – swdev Jan 26 '11 at 08:07
  • 1
    It looks like findr sets the mark for each match you move to, so you could cycle backwards through the local marks set in the current buffer with `C-u C-SPC`, and you can cycle back through the global mark ring with `C-x C-SPC` to get to each previous file in turn (whereupon you can again use `C-u C-SPC` to visit that buffer's local marks). – phils Jan 26 '11 at 08:55
  • 1
    Note that if you're using cua-mode or cua-selection-mode, then after an initial `C-u C-SPC` you can repeat the pop-to-mark as many times as required by typing just `C-SPC`. I often find this quite convenient. See `cua-set-mark` for details. – phils Jan 26 '11 at 09:01
  • 1
    Funny is, I haven't use emacs for a while, and I want to know exactly the thing in this question. I was helped by my own question ;) Thanks @phils – swdev Apr 08 '13 at 04:52