The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: John Cowan <cowan@ccil.org>
To: Norman Wilson <norman@oclsc.org>
Cc: The Eunuchs Hysterical Society <tuhs@tuhs.org>
Subject: Re: [TUHS] Remember the ed thread?
Date: Mon, 29 Mar 2021 20:11:21 -0400	[thread overview]
Message-ID: <CAD2gp_R5ax-QascETL8qYO81pO_GuRnhYK-NEYGmuu15_-kXcg@mail.gmail.com> (raw)
In-Reply-To: <20210329155812.C66DF640CB6@lignose.oclsc.org>

[-- Attachment #1: Type: text/plain, Size: 2261 bytes --]

On Mon, Mar 29, 2021 at 11:59 AM Norman Wilson <norman@oclsc.org> wrote:


> The b command (stands for browse) came from late-1970s
> U of T; rob probably brought it to 1127.


It's little things like this that make me use ex rather than ed, though it
is spelled z there.  Linux ed has z as an extension.

> There were a
> handful of other syntactic conveniences, like being
> allowed to leave off the final delimeter of an s command,
> and declaring that a missing address means 1 before the
> comma or semicolon and $ after, so
>         3,s/fish/&head
> works over all lines from 3 to the last, and , standing
> alone addresses the whole buffer.
>

Those things are in Posix now.  Linux ed is a superset of Posix; *BSD ed is
rather lacking, being based on an old SVID.

> Also the idea that s followed by a digit N means start
> with the Nth instance of the pattern:
>         s3/fish/&head/
> affects only the third fish, and
>         s3/fish/&head/g
> every fish after the second.
>

That's neither Posix ed nor ex, and very annoying it is to lack it.

> b.  The > < | commands, [...] make qed into a kind of workbench,
> both for massaging data and for constructing a list
> of commands to send to the shell.
>
> I gather current Linux/BSD eds have > and <, spelled
> r ! and w !, but without | it just ain't the same,
> rather like the way | revolutionized the shell.
>

Ex extends the ! command to accept numeric arguments and has the same
semantics.  Unfortunately, although "r !" and "w !" are in both Posix ed
and ex, in ex "w !foo" means "output to the foo command" whereas "w! foo"
means "write to foo, ignoring the internal 'don't overwrite' bit that you
can set."

I wrote two specs that may be of interest to someone:

<https://github.com/johnwcowan/exx/blob/master/exx/exx-features.txt> was my
attempt to describe "ex extended" that could still be a lightweight editor
by not needing the vi bag on the side.

<https://github.com/johnwcowan/exx/blob/master/sam/sam-extensions.txt> is a
list of things that make me not want to use sam -d editing until they are
provided in some form.



John Cowan          http://vrici.lojban.org/~cowan        cowan@ccil.org
On the Semantic Web, it's too hard to prove you're not a dog.
        --Bill de hOra

[-- Attachment #2: Type: text/html, Size: 6322 bytes --]

  reply	other threads:[~2021-03-30  0:12 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-29 15:58 Norman Wilson
2021-03-30  0:11 ` John Cowan [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-03-31  0:54 Norman Wilson
2021-03-31  1:29 ` John Cowan
     [not found] <CAKH6PiXmR6Jv0bkyOtHuk1ZLV64aeW7bnQkUnzV9-G_JaUVDAA@mail.gmail.com>
2021-03-30 23:38 ` John Cowan
2021-03-31  2:34   ` Bakul Shah
2021-03-29 23:21 M Douglas McIlroy
2021-03-30  3:39 ` Rich Morin
2021-03-29 14:34 Larry McVoy
2021-03-29 15:09 ` Anders Damsgaard
2021-03-29 15:26   ` Brantley Coile
2021-03-29 15:36     ` Mark van Atten
2021-03-29 15:43       ` Brantley Coile
2021-03-29 15:52         ` Mark van Atten
2021-03-29 15:45     ` Andy Kosela
2021-03-29 15:51       ` Clem Cole
2021-03-29 17:22       ` arnold
     [not found]         ` <CALMnNGgWrFRjXk5N4PgTj0_Yw3W5nCR2=CYSASM6dnqTooy8Dw@mail.gmail.com>
2021-03-30  8:53           ` arnold
2021-03-29 15:37   ` Clem Cole
2021-03-29 15:42     ` Anders Damsgaard
2021-03-29 15:49     ` Larry McVoy
2021-03-29 16:01     ` Andy Kosela
2021-03-29 18:12     ` Tom Ivar Helbekkmo via TUHS
2021-03-29 16:20 ` Steve Nickolas
2021-03-29 19:50 ` Rob Pike
2021-03-29 20:50   ` Michael Usher via TUHS
2021-03-29 20:55     ` Larry McVoy
2021-03-29 21:10       ` Erik E. Fair
2021-03-29 21:14         ` Larry McVoy
2021-03-29 21:53         ` Clem Cole
2021-03-29 22:29           ` John P. Linderman
2021-03-30  4:30             ` Rob Pike
2021-03-30  7:37             ` Harald Arnesen
2021-03-30 15:00         ` Kenneth Goodwin

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=CAD2gp_R5ax-QascETL8qYO81pO_GuRnhYK-NEYGmuu15_-kXcg@mail.gmail.com \
    --to=cowan@ccil.org \
    --cc=norman@oclsc.org \
    --cc=tuhs@tuhs.org \
    /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).