Emacs搜索并打开多个文件并搜索所有缓冲区

Ste*_*anE 8 emacs elisp

我目前正处于转换过程的开始,转发Emacs.但是我有两个基本问题.

  1. How do I search for multiple files recursively from a specific path? I assume I have to use find/grep/dired but I'm not sure. For instance I would like to find all *.scala files at path C:/src/xxx.When these files are found I would also like to open them all in the buffer at once. The only way I'm currently familiar with is C-xC-f.

  2. When all these files are in the buffer how do I then search across all the buffers, and get some kind of list of the result and/or perhaps able to navigate from result to result? Saying I would like to find all places with the text case Int => occur.

phi*_*ils 9

我同意phimuemue的回答,但我也会指出M-x rgrep,它将运行必要的find/grep,以便在不实际打开文件的情况下呈现所有匹配.选择匹配然后打开该行号的相关文件.在某些情况下,这可能比打开所有这些文件更可取.

另见这些: