Article View: gnu.emacs.bug
Article #100065Re: Using grep and next-error...
From: Darren Swartzendruber
Date: Thu, 15 Feb 1990 18:11
Date: Thu, 15 Feb 1990 18:11
43 lines
2476 bytes
2476 bytes
Some further info about my problem...
With some help, I have determined the problem is not the length of the
file (sorry for the scare!), but the regexp being used to parse the
information in the compilation buffer.
The variable compilation-error-regexp is set to (taken from compile.el):
(defvar compilation-error-regexp
"\\([^ :\n]+\\(: *\\|, line \\|(\\)[0-9]+\\)\\|\\([0-9]+ *of *[^ \n]+\\)"
"Regular expression for filename/linenumber in error in compilation log.")
When I am grepping and get lines like the following:
cd /tmp/
grep -n -i this /tmp/dls /dev/null
/tmp/dls:4:1. this is a test
/tmp/dls:5:this is a test
/tmp/dls:6:2. this is a test
/tmp/dls:7:this is a test
grep finished at Thu Feb 15 13:02:38
using next-error to get from line to line in the file does not work
correctly.
For the 1st match above, next-error thinks the line number (the mark)
is 1 instead of 4. And for the 3rd match, it thinks the mark is 2
instead of 6. On the 2nd and 4th match, next-error gets the correct
mark.
I am not too great with complex regexp as above, so while I'm trying
to figure out a way to patch the regexp, I thought I'd ask you all
to do the same. And if you do, please explain how the regexp works.
--
Darren Swartzendruber CCCCCCCCCCC CCCCCCCCCCC IIIIIIIIII
CC CC CC CC II II COMPUTER
dls@cci632.UUCP CC CCC CC CC CCC CC IIII IIII CONSOLES,
rochester!rit!cci632!dls CC CCCCCCC CC CCCCCCC IIII IIII INCORPORATED
uunet!ccicpg!cci632!dls CC CCC CC CC CCC CC IIII IIII
uunet!rlgvax!cci632!dls CC CC CC CC II II An STC Company
rayssd!cci632!dls CCCCCCCCCCC CCCCCCCCCCC IIIIIIIIII
Technical Details
Message-ID:
<DLS.90Feb15131134@ccird1.uucp>Path:
arc1-ca.pugleaf.net!gmdzi!unido!mcsun!sunic!uupsi!rpi!uwm.edu!cs.utexas.edu!samsung!uakari.primate.wisc.edu!caesar.cs.montana.edu!bridge2!jarthur!elroy.jpl.nasa.gov!peregrine!ccicpg!cci632!ccird1!dlsShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fb2f1,a1dec82ed71246c1,start X-Google-Attributes: gidfb2f1,public X-Google-ArrivalTime: 1990-02-15 10:11:34 PST Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!sunic!uupsi!rpi!uwm.edu!cs.utexas.edu!samsung!uakari.primate.wisc.edu!caesar.cs.montana.edu!bridge2!jarthur!elroy.jpl.nasa.gov!peregrine!ccicpg!cci632!ccird1!dls From: dls@ccird1.uucp (Darren Swartzendruber) Newsgroups: gnu.emacs.bug Subject: Re: Using grep and next-error... Message-ID: <DLS.90Feb15131134@ccird1.uucp> Date: 15 Feb 90 18:11:34 GMT Sender: news@cci632.UUCP Distribution: gnu Organization: Computer Consoles Inc. an STC Company, Rochester, NY Lines: 43 Posted: Thu Feb 15 19:11:34 1990