? M-x igrep-find igrep.el.
By default, it searches for all occurrences of the template, but you can change the behavior to just find the first such event with:
(setq igrep-options "-i -m 1") ;; I like -i for case-insensitivity
This will create a compilation style buffer (with a name *igrep*) with one line for each file, and when you click on a line (or do C-x `), you will automatically put on a line that has a match. In addition, you can see the corresponding line in the buffer *igrep*.
Obviously, if you want to see more than one match in a file, change the number after -mor completely omit this part.
source
share