[Top][All Lists]
[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
From: |
anonymous |
Subject: |
[sr #105945] Add C compiler like output to grep so that emacs 'next-error function works on grep output |
Date: |
Thu, 19 Jul 2007 23:10:08 +0000 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.5) Gecko/20070713 Firefox/2.0.0.5 |
URL:
<http://savannah.gnu.org/support/?105945>
Summary: Add C compiler like output to grep so that emacs
'next-error function works on grep output
Project: grep
Submitted by: None
Submitted on: Thursday 07/19/2007 at 23:10 UTC
Category: None
Priority: 5 - Normal
Severity: 1 - Wish
Status: None
Privacy: Public
Assigned to: None
Originator Email: address@hidden
Open/Closed: Open
Discussion Lock: Any
Operating System: None
_______________________________________________________
Details:
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
parse.
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.
-Scott
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/support/?105945>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [sr #105945] Add C compiler like output to grep so that emacs 'next-error function works on grep output,
anonymous <=