From: "James A. Robinson" <jim.robinson@gmail.com>
To: 9fans@9fans.net
Subject: [9fans] question re acme and plumber
Date: Wed, 10 Jul 2019 11:44:37 -0700 [thread overview]
Message-ID: <CAPd04b6BqFbuhKdLwXj5+e+bqFx9zyk3=1JxU3XE7kqRrR1F5A@mail.gmail.com> (raw)
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
next reply other threads:[~2019-07-10 18:44 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-10 18:44 James A. Robinson [this message]
2019-07-11 6:25 ` Martin Kühl
2019-07-11 19:57 ` James A. Robinson
2019-07-11 21:28 ` James A. Robinson
2019-07-24 21:18 ` Ole-Hjalmar Kristensen
2019-07-25 20:54 ` James A. Robinson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAPd04b6BqFbuhKdLwXj5+e+bqFx9zyk3=1JxU3XE7kqRrR1F5A@mail.gmail.com' \
--to=jim.robinson@gmail.com \
--cc=9fans@9fans.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).