sam-fans - fans of the sam editor
 help / color / mirror / Atom feed
From: "kim kubik" <chaotrope@jps.net>
To: <jim.robinson@stanford.edu>,
	"sam Fans" <sam-fans@hawkwind.utcs.toronto.edu>
Subject: Re: the obvious. =) (to everyone but kim)
Date: Mon, 27 Mar 2000 17:39:41 -0500	[thread overview]
Message-ID: <01bf983d$578f4f60$1ec5efd1@pkwksj.sjna.corp.dom> (raw)


-----Original Message-----
From: James A. Robinson <jim.robinson@stanford.edu>
To: sam Fans <sam-fans@hawkwind.utcs.toronto.edu>
Date: Sunday, March 26, 2000 9:45 PM
Subject: Re: the obvious. =)

J.A.R. wrote:
>one of the things I thought about doing was writing a set of guide
>files for sam.  It's really too bad one can't have a real acme clone
>(with the same neat file handling) with a sam command window! =)
>
that's sort of what gave me the idea of these sam "macro" files,
the acme/wily guide files. I just put the oft-used command sequences
in a little window about the shape of a vertical Hershey candy bar
off to the right and then snarf what I need.

>> # BOLD FACE DOT:
>> [s/./<b>&/
>>  a/<\/b>/ ]

>Since you have dot selected, why not just [s/.+/<b>&<\/b>/]?
>
I *think* that the above will work on text in one line ONLY.
My memory is that I tried a number of convoluted SREs (well, the
number I could come up with is still a small integer) and finally
had to settle on the a/<\/b> as being necessary if I wanted to
backhilite any arbitrary section of possibly multi-line text
which could possibly include multi \n\n+ 's.

>Is there any vi influance here (zz)? =)  I'm wondering if you really
>enter most of your text via the command window? I'd find it hard to go
>back and hunt down previous commands from the scroll-back.

Like I said originally, old habits die hard; I still shove the mouse
cursor into the text window, click and start typing, but I really really
try to do it in the sam window. And yes, every once in a while I
need to telnet to a Unix system and so have to remember some vi, but
the zz idea actually came from a much older editor, called creatively
EDIT, described in Software-P&E (1971)v1, p73-81, the author being a
guy at Cambridge (UK) name of S.R. Bourne, before he came across the
pond to play with that other OS.

EDIT used a lone z to get out of text entry mode and enter command
mode and had a cute way of walking thru the whole file, executing
commands if you prefaced the command sequence with a 0 (similar to
sam's , ). Being almost thirty years ago, one had to give a small
line number range at startup which would be kept in core and edited;
the rest of the file remained unaltered on disc. Over the years the
editor got altered by various people including maybe Chris Fraser.


While EDIT did't have re's, Marting Richards did publish an algorithm
"strongly influenced by ... Thompson" (S-P&E (1979)v9,p527-534) later
on (a student onced described Richards as the dullest lecturer he had
in his whole time at Cambridge).

Anyhow, I hope some of this helps someone.

 - kim

PS: Jim I also have a number of SREs that walk through a file and
    delete those little copywrite notices and things like that which
    you Elsevier people seem to be so keen on including.        :-)



             reply	other threads:[~2000-03-27 22:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-03-27 22:39 kim kubik [this message]
2000-03-31  1:12 kim kubik

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='01bf983d$578f4f60$1ec5efd1@pkwksj.sjna.corp.dom' \
    --to=chaotrope@jps.net \
    --cc=jim.robinson@stanford.edu \
    --cc=sam-fans@hawkwind.utcs.toronto.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).