wgrep
works well for every line in context search like grep -C 2
. It also works for grepmail, special grep-like program for mailboxes. You can edit each line of output.
How to force pcregrep
with multiline request like ^[ \t]+-.*\n +CLOCK
to cooperate with wgrep
correctly (with ability to edit each line, not only the first)?