9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Ruben Schuller <ruben@orgizm.net>
To: 9fans@9fans.net
Subject: Re: [9fans] Acme, Edit, code and newline
Date: Mon, 31 Mar 2014 18:23:33 +0200	[thread overview]
Message-ID: <20140331182333.76231c1d@kiwi.kuchen> (raw)
In-Reply-To: <CA+yaQw8LEvXsPR_PxnUpsAsXyrz9aVfayhZ-Ftmz410eDqsQkg@mail.gmail.com>

Hi,

2014-03-31 17:54 Daniel Peyrolon <tuchalia@gmail.com>:

> > Edit , x/^[^ ]+[ ]*[^(]*\([^)]*\)[ ]*\{[ ]*\n/ s/[ ]*\{[ ]*\n/\n\{/g
>
> So, it was simply a matter of changing "$" for "\n" at the x command!
> How come my command didn't work?
> It really should work with the "$", shouldn't it?
>
> Or even without the \n or the $, since the regexp already matched
> until the '{',
> so the substitution should have worked.

I'm not really that proficient in acme/sam but, from the sam
manpage:

       $      The null string at the end of the file.

I'd also recommend reading
http://doc.cat-v.org/bell_labs/sam_lang_tutorial/ .
It helped me a lot getting a better undestanding of the command
language.

Take care,
Ruben



  reply	other threads:[~2014-03-31 16:23 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-31 15:20 Daniel Peyrolon
2014-03-31 15:36 ` Mark van Atten
2014-03-31 15:39   ` erik quanstrom
2014-03-31 15:44     ` Mark van Atten
2014-03-31 15:46       ` erik quanstrom
2014-03-31 15:54   ` Daniel Peyrolon
2014-03-31 16:23     ` Ruben Schuller [this message]
2014-04-01  7:24     ` Mark van Atten
2014-04-01  8:23       ` Daniel Peyrolon

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=20140331182333.76231c1d@kiwi.kuchen \
    --to=ruben@orgizm.net \
    --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).