9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: dexen deVries <dexen.devries@gmail.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] Acme Edit scriptlets
Date: Fri, 29 Mar 2013 09:48:06 +0100	[thread overview]
Message-ID: <2449539.RSB6coPKl3@coil> (raw)
In-Reply-To: <CAM6ozu6pFZxgJpFsu3Hsq8jJea_d=PrQ+cCBF+BvZT9sJRgPCw@mail.gmail.com>

On Friday 29 of March 2013 09:25:47 Peter A. Cejchan wrote:
> Also, could you share the plumbing rules you use (for my
> inspiration/learning)?


1) re-format PHP's strange error mesages into standard 
FILE_PATHNAME:LINE_NUMBER


# ... called in FILE_PATHNAME on line LINE_NUMBER and defined in FILE_PATHNAME 
on line LINE_NUMBER

data matchesmultiline '.*rror.*called in ([^ ]+) on line ([0-9]+) and defined 
in ([^ ]+) on line ([0-9]+).*'
arg isfile $1
data set $file
attr add addr=$2
type is text
plumb to edit


#file / line in PHP format
data matchesmultiline '(.+) on line ([0-9]+).*'
arg isfile $1
data set $file
attr add addr=$2
type is text
plumb to edit


2) display php's function prototypes on right-click on a function name with an 
opening parenthesis. the `W' script greps a flat text file list of functions 
(with arguments and return types) and outputs to +Errors window.


type is text
data matches '[a-zA-Z_][a-zA-Z_0-9]*[(]'
plumb start W --wdir $wdir $data


* * *

a half-hearted support for displaying SQL table schema; again, `Wtable' is a 
script outputting definition of indicated table.

type is text
data matches '.*(FROM|JOIN)[ ]+([^ ]+).*'
data set $2
plumb start Wtable --wdir $wdir $data

-- 
dexen deVries

[[[↓][→]]]




  reply	other threads:[~2013-03-29  8:48 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-29  0:38 Bence Fábián
2013-03-29  1:19 ` phineas.pett
2013-03-29  8:22   ` Peter A. Cejchan
2013-03-29  8:20 ` dexen deVries
2013-03-29  8:25   ` Peter A. Cejchan
2013-03-29  8:48     ` dexen deVries [this message]
2013-03-29  9:50   ` Richard Miller
2013-03-29 16:20     ` Skip Tavakkolian
2013-04-04 10:19 ` Mark van Atten
2013-04-04 12:08   ` dexen deVries
2013-04-04 12:16   ` Bence Fábián
2013-04-04 12:28     ` erik quanstrom
2013-04-04 13:01       ` Bence Fábián
2013-04-04 13:04         ` [9fans] Acme script request (was: Acme Edit scriptlets) dexen deVries
2013-04-04 13:17           ` Bence Fábián
2013-04-05 12:35             ` Martin Kühl
2013-04-05 12:50               ` dexen deVries
2013-04-05 12:32         ` [9fans] Acme Edit scriptlets David Arroyo

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=2449539.RSB6coPKl3@coil \
    --to=dexen.devries@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).