9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Rob Pike <rob@mightycheese.com>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] page as a presentation tool
Date: Wed,  5 Nov 2003 13:44:19 -0800	[thread overview]
Message-ID: <36000D8C-0FD9-11D8-A204-000A95B984D8@mightycheese.com> (raw)
In-Reply-To: <200311052136.hA5LaXoY023369@localhost.localdomain>

> Thanks.  That solves the problem with 'u'.  The problem with 'x',
> I fear, is my own misunderstanding of sam's syntax.  sam doesn't
> allow a space between 'x' and its regular expression argument, though
> it is quite happy to allow one between 'c' and its regular expression
> argument.  Since this first bit me on the UNIX version I assumed it
> was a problem with the UNIX version.

'c' doesn't have a regular expression argument.  but anyway, i know
what you're talking about.

there's a notational shorthand that may be the source of your confusion.

x/foo/ command

looks for foo and runs the command.  one useful value of foo is lines:

x/.*\n?/ command

this is so common that it's given a shorthand: an absent pattern:

x command

thus one may write

x g/bar/  command

to run the command on every line containing bar.  but,

x /foo/ command

means for every line, run

	/foo/ command

which isn't what you want at all.  obviously, this is a huge semantic
swing for the measly addition of a space. mea culpa.

-rob



  reply	other threads:[~2003-11-05 21:44 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-05  5:27 John Stalker
2003-11-05  0:08 ` Russ Cox
2003-11-05  7:45   ` Fco.J.Ballesteros
2003-11-05 21:55     ` jpc
2003-11-05  6:16 ` Scott Schwartz
2003-11-05 16:25   ` John Stalker
2003-11-05 10:28     ` Russ Cox
2003-11-05 21:36       ` John Stalker
2003-11-05 21:44         ` Rob Pike [this message]
2003-11-06  1:29           ` John Stalker
2003-11-07  7:03 ` okamoto

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=36000D8C-0FD9-11D8-A204-000A95B984D8@mightycheese.com \
    --to=rob@mightycheese.com \
    --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).