question re acme and plumber

"James A. Robinson" <[email protected]>
Newsgroups gmane.os.plan9.general
Message-ID <CAPd04b6BqFbuhKdLwXj5+e+bqFx9zyk3=1JxU3XE7kqRrR1F5A@mail.gmail.com>
If I add a plumber rule for javac output:

type is text
data matches '\[ERROR\] ([.a-zA-Z¡-�0-9_/\-]+\.java):\[([0-9]+),[0-9]+\] .*'
arg isfile $1
data set $file
attr add addr=$2
plumb to edit
plumb client $editor

I can sweep a line (short of its trailing newline):

[ERROR] /Users/jimr/proj/github/src/github.com/.../Cpio.java:[151,31]
';' expected

in acme using button 3 and open up Cpio.java:151.  Is there any way
for me to just button 3 click within the text of the filename to get
the same behavior?

Also I had hoped I could do something like

attr add addr=$2'-+#'$3

(assuming I captured the 2nd number in the data matches line), but it
turns out Java is producing a 'column number', which means a tab is +8
column positions.  My only thought upon discovering that was that I'd
have to write some custom program to pick out the $1:$2 and evaluate
it to determine what the actual character count was.  Anyone have a
better suggestion?  The sam(1) addressing appeared to, very sensibly
imo, limit itself to talking about lines, character counts, and
regular expressions...

Jim
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.