[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[sr #105945] Add C compiler like output to grep so that emacs 'next-erro
[sr #105945] Add C compiler like output to grep so that emacs 'next-error function works on grep output
Thu, 19 Jul 2007 23:10:08 +0000
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:18.104.22.168) Gecko/20070713 Firefox/22.214.171.124
Summary: Add C compiler like output to grep so that emacs
'next-error function works on grep output
Submitted by: None
Submitted on: Thursday 07/19/2007 at 23:10 UTC
Priority: 5 - Normal
Severity: 1 - Wish
Assigned to: None
Originator Email: address@hidden
Discussion Lock: Any
Operating System: None
Suggested functionality: output the grep|fgrep|egrep output in a format
similar to warnings or error messages from the C compiler so that emacs can
This lets you do fun stuff like:
find . -type -f -print | xargs grep --EMACSOUT PATTERN
Such a grep would show all the file and the corresponding lines
that match PATTERN. (You would obviously want a better switch name.) I'm
betting this is reasonably simple modification.
If you run this from the 'compile command under emacs, you can then use the
'next-error function to hop from pattern match to pattern match. Emacs loads
the files and jumps to each line as required. Combined with keyboard macros,
you can do powerful, interactive edits quickly. Great for essentially any
kind of text grep'ing and editing.
I built a shell wrapper to do this about 20 years ago (and I still use it).
Exceedingly useful for emacs users.
Reply to this item at:
Message sent via/by Savannah
- [sr #105945] Add C compiler like output to grep so that emacs 'next-error function works on grep output,