Elgrep allows you to grep files in a directory and recursively in its sub-directories.
It lists the found matches in an *elgrep*
buffer (much like occur).
New users should input the search data in the *elgrep-menu*
buffer opened by the command M-x elgrep-menu
RET.
The minor mode elgrep-edit-mode
can be toggled on through the menu item Elgrep -> Elgrep-edit
in the *elgrep*
buffer it is also bound to the key sequence C-c C-e. The user experience in editing the *elgrep*
buffer is a bit different from that one editing the *occur*
buffer.The edits are not performed instantaneous in the corresponding file buffer but you save the edits in the *elgrep*
buffer with save-buffer
(normally bound to C-x C-s) when you are done.
The edits in the *elgrep*
buffer are applied to the files with the matches on save-buffer
.
Remarks:
- You can install elgrep via melpa. If you have registered correctly
melpa
in package-archives
you just call M-x package-install
RET elgrep
RET.
- You can use the option
Run asynchronously
in the *elgrep-menu*
buffer even if that one is marked as experimentally
. I use it for years now and it is rock-solid. The only drawback is the weak feedback if no matches are found. It just prints a message No matches found
in the echo area.
- If you save the edits from the
*elgrep*
buffer elgrep checks whether it finds the old matches in the listed files. It does not apply the edit for a match if it does not find the old match. This is a measure of caution. It has the drawback that you can/should not edit and save matches multiple times without a new run of elgrep
.
- You can edit the matched texts in the
*elgrep*
buffer but you cannot edit the file names or the line numbers for the matches. They are protected with the read-only
text property.
multi-occur-in-matching-buffers
.