9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: erik quanstrom <quanstro@quanstro.net>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] plumber rule for WikiWords
Date: Sun, 13 Jan 2008 13:19:33 -0500	[thread overview]
Message-ID: <47dd21df91f37b7a9fc370e3d0eca85f@quanstro.net> (raw)
In-Reply-To: <0801131802120.20246@cab.mteege.de>

> I use the following plumbing rule to "emulate" wiki like functions in 
> acme:
> 
> type is text
> data matches '([A-Z]+[a-z]+[A-Z]+[a-z]+)*$'
> data set wiki/$0.txt
> plumb to edit
> 
> Most of the time it works but if I use a LongWikiWord it opens
> WikiWord.txt instead of LongWikiWord.txt. It depends on where I click
> on the word. If I click on Long nothing happens and if I click on Wiki
> it opens WikiWord.
> 
> Is this a problem of the rule or a "feature"? I use acme  from Plan 9 
> ports.

i don't think your rule matches LongWikiWord because the rule
will only match words with an even number of studly caps.

assuming that you want >= 2 studly caps, i think the rule
you'd rather is

data matches '[A-Z]+[a-z]+([A-Z]+[a-z]+)+'

- erik


  reply	other threads:[~2008-01-13 18:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-13 18:04 Matthias Teege
2008-01-13 18:19 ` erik quanstrom [this message]
2008-01-14  2:12   ` Yaroslav
2008-01-14  2:19     ` erik quanstrom

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=47dd21df91f37b7a9fc370e3d0eca85f@quanstro.net \
    --to=quanstro@quanstro.net \
    --cc=9fans@cse.psu.edu \
    /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).