Mark
of
the Unicorn MinceUser's
GuideSection
I:
Overview andIntroduction
1
. 1 What
is
Mince?Mince
i
3 adisplay-screen
or lentecí te xt
editor
,orig
inally
optimized for
use an small computer systems.It
i
3°
patterned
after
an editor
called
"Emacs" , atext editor
heretofore
foundgenerally
at
ver ylarg
eresearch
computerinstallations.
1 .2 Mince
for
TextEntry
Mince tex
t
entry
has been made as easy aspossible far
the
terminal
operator
. Toenter text
into
a document, merelytype
it.
No cjompiicated commands are neededfor this
inherently
simple operation.
There are no"input"
or"edit"
modes, as in sometext editors.
Text whichis
entered 13displayed
asit
is
t
yped in . The screendisplay
always showstext exactly
asit
will
appear in the eoinputerfile
and uponoutput;
what you seeis
what youget.
1
. 3 Mince
for Editing
TextEditing
with
Minceis easily
andquickly
learned.
Ingeneral,
Mince commands are mnemonically assigned to keys. Forexample, the
editor
commands which move forward in thetext
areassociated with
the "F" key and commands which move backward in'
t
he text
areassociated
with
the " B" ke y . Mincje has anextremely powerful
commandset,
butwith
the knowledge of'only
a small subsetof
Uio3c commands, most 3tandardediting
taskscan be accomplished
wjth
ease . Each key performs a command, andthe
result
of
the command happensimmediately.
Thereis
no needto
typeQarriage-returns
to enter
theediting
commands . Thescreen
display
refleots
theresult
of
these commands asthey
are typed . Th
i
s mnemon iQ command-naming an d continuousinteraction
with
thetext rather
than using a struc:tured set of
"editing
requests"
make Mince easyfor
the noviee tolearn
yet
efficient
for
experienced user s to operate . Th econtinuously-updated
display
helpsall
classes of
users ke e ptrack of exactly
what they are doing to thetext.
1 .
u
Mince
for Editing
ProgramsProgrammers a s a
cl
assappreciate superior
speed andpower from
their
editors.
Mincesupplies both.
Several programsmay be
edited
at once, and manyof
thetextual
editing
features
regarding
sentences, words, and paragraphs areeasily
usedwith
structured
languages where such conceptstranslate
totokens,
Mark
of
the Unioorn MinceUser's
Guidestatements,
and black: s.1 .5 Mince and the Future
Mince
i
s aneditor
whichwill
not becomeobsolete with
changes in hardware;it
easily
adapts todifferent
terminal
t
ypeswithout extra
(andexpensive!)
software.
Furthermore,
Mince
i
s written
in ahigh-level
language who setransportability will
accompany the program development cycle
f
orseveral
years to come. The time spentlearning
Mincewill
not
be wasted when 8080/Z80 systems have beenreplaced
by oewer hardware.~ ~r
People who have ii o
t
re ad
either
the Programmer'sIntroduction
to Mince or the Mince Le ssoas should sto p hererather
thancontinuing
with
this
user's guide.
New users arebest advised to take one
of
theintroductory
sets
of
lessons,
sit
downat
aterminal,
andget started.
Minceis easiest to
explain
andlearn
by usingit!
1 .6 A Mince
Glossary
The
following
symOols or terms are used in the commanddescriptions
presented below.Familiarity
with
these itemsis
aprerequisite
for
completeunderstanding
Cit the Mince commands. Po int
-
Thisis
theposition
in thetext
whereediting
occurs.
All text
whichis
typedinto
the documenti
s enteredat
the Point
andall
text
whichis deleted is
removedthere
as
well.
Eachtext buffer
hasits
ownPoint.
ThePoint is
always BETWEEN any two
characters.
Thecursor is
always onthe second
of
those two; hence the-Point
13just
before
the
character that
thecursor is
on . Thus , man y Mincecommands do
nothing
but move thecursor
to theright
place
orí the screen (and thus move thePoint to
theright
placein
thetext)
to perform thenext editing
operation.
It i
sperfectly
easyto think of editing
in termsof
thecursor,
but
certain
text entry
anddeletion
operations
canonly
beexplained
properly
b ythinking
of this
Point
as betweentwo
characters.
Newline
-
This itemis
thecharacter
which
causes PIince' sdisplay
to
move thecursor
on the screen to thebeginning
of
thenext
line.
Newlines are always typed byhitting
thecarriage-return
key on theterminal
keyboard. Newlines aretranslated
to theearriage-return/linefeed
combination dur ing text
output,
but the y aretreated
assingle
charaoters for
the purposesof text
entr
y anddeletion.
Dur ing
str
ing in putfor
commands which asktor string
Mark ¿jf the Unicorn Mince
User's
Guidearguments , the Newline
will
display
as <ML>, inorder
todefinitely
indicate
that
a Newlineis part of
thestring
to be passed to the command . move
-
This verb always means "move the Pc) int"
or "move thecursor"
.All
Minceediting
operations
are done by "movingto"
theappropriate
place in a document ( and on thescreen) and making whatever
textual
changes are nec!essaryther
e .word
-
Aword , as
defined for
the word movement anddeletion
commands, begins
at
thefirst
alphanumericcharacter
foundand extends
until
a non-alphanumer icccharacter
.sentencie - A sentence, as
defined for
the sentence movement anddeletion
commands, begins
at
thefirst
word found andextends
until
apunctuation
markis
found.paragraph
-
A paragraph, asdefined tor
the paragraph movementor
filling
Qotñmanci s , extendsuntil
either
a blankline
(two Newline
characters in
arow),
aline
beginningwith
atab (a Newline
followed
by a tabcharacter)
, c)r al
in ebeginning with
anat-sign
("@") orperiod
(".")
(used by sometext
formatters
to begin commands) .Mark
-
Thisis
aninvisible
indicator
in thetext
buffer
.It
may be se
t
at
aparticular
position
by using the "SetMark" command
.
Li
ke thePoint,
i
t
rests
between twocharacters.
Al solike
thePoint,
there is
cine Markfor
each
text buffer.
"C-" - This is
theprefix
which wewill
use in the text
to refer
toControl
command s. These are formed byholding
down the key marked "CONTROL", "CNTRL", "CTRL", or the
l
ike on the termin al keyboardwhile
typ ing another
character
,usually
alphabetic.
Control
characters
ar edisplayed
on the screen as acaret
or uparrow(^) followed
by
that character.
"M-"
-
Thisi
s theprefix
which wewill
use in thetext to
refer
to Meta-commands. These are formed bytyping
the key marked "ESCAPE", "ESC" , "ALT" , or " ALT MODE" on theterminal,
thentyping
anothercharaoter.
"M-C-"
- This
prefix
is for
the Meta-Control-commands.It
is
formed b ytyping
the ESCAPE ke y, thentyping
theappropriate
Control-cíommand .<CR>
-
A symbol used torefer
toeither
theccarriage-return
key(labelled
"RETURN", "CR", or "ÍNTER" on the keyboard) .This key sends ASCII "M, decimal 13.
<LF>
-
A symbol used torefer
toeither
thelinefeed
key(labelled
"LINEFEED" or "LE" on the keyboard,i f
it
is
e
Mark
of
the'jnicorn
MinceUser's
Guidepresent at
all).
This key sends ASCII ^J, decimal 10,<DEL>
-
A symbol used torefer
toeither
thedelete
key(labelled
"DELETE", "DEL", or "RUBOUT" on the keyboard) .This key sends ASCII
"?,
decimal 127.<ESC>
-
A symbol U3écj torefer
toeither
the escape key(labelled
"ESC", "ALT", "ESCAPE", or "ALTM0D£" on thekeyboard) . This key sends ASCII
^[,
decimal 27.<TAB>
-
A symbol used torefer
to the tab key. This key sendsASCII
"I,
deeimal 9.<i3S>
-
A symbol used torefer
to the backspace ke y (sometimeslabelled
"ES" on the keyboard) . This key sends ASCII ^6!,decimal 8.
Mark
of
the Unicorn MinceUser's
GuideSection 2: The
Display
The Mince screen
display
is divided
into three areas.
Themajor
portion
is
the "window" , wher'e thetext to
beedited
is
displayed
. Twosmaller portions,
the "modeline"
and the "echoline",
appearat
the bottomof
the screen, beneath the window.2
. 1 The Window
The window occupies the
upper
portion of
the screen . Thisarea
is
whereall
text
whichis
typed andall
text
whic hi
sabout to be
modified is
dhsplayed . The windowdisplays
abouttwenty
or sqconseoutive lines
of
the document whichi
s beingedited
. You maythink of this
as a window onto alarger
entity
of
text,
theentire
document. The purposeof this
windowis
toalways show what the
portion
cjf the document contained init
looks
like
.Therefore,
astext
is inserted
ordeleted
,t
hescreen updates
immediately.
A fundamentalprinciple
of
Mince 13that
what yo u see on the screenis
what youactually
have inyour
text.
2
. 1 . 1 The
cursor
The screen
display
always has theterminal's
cursor
atsome
point
init,
and as youwill
see,while
thecursor is
inthe window,
it
is at
theposition
where Mince commandswill
affect
the text
. Thecursor is
alwayspositioned
to theright
of
thePoint
in the document. (You maythink of
this
as thePo in
t
be ing attached to theleft
edgeof
thecursor instead.)
This property
makes thecursor
a veryimportant object
in theMince
display.
Man y Mince commands donothing
but move thecursor
to theright
place on the screen ( and thus mov e the Point
to
the right
place in thetext)
to perform thenext
editing
operation.
2
. 1 .2
Redisplaying
the windowSince the window
is
aÍways supposed tolook exactly
l i
kci
ts
twenty-line
portion
of
thetext,
any changes in thetext
must cause changes to the windowdisplay.
Terminals haveonly
o ne
cursor
, and screen updates are always performedat
thecursor
,since
the text
upd ate s ar eal
so per formedthere
.(Remember , the
Point is
attached to thecursor while
thecursor
is
in the window.) Becauseof
this,
during
screen update thecursor
may move agreat
deal andthere is
no way totell
wheret
he our sori
s "supposed to be" , (and thus where thePoint
actually
is
in thetext)
except by memory or d ead reckon ing .Fortunately,
this
update occursvery rapidly,
and thecursor
always
returns
in the windowto
where the Pointis
in thetext.
P
Mark
of
the Unicorn MinceUser's
GuideIt
is possible
to typevery very quickly
or to execute so manyeditor
commands which have suchlarge effects
on the text
that
the screen updatewill
not be able to keep up. Inthis
case, Mince a3sumes
that
you know what you are doing an dar e
not relying
upon the screenredisplay.
In these cases,it
keepstrying
to update thedisplay
to
reflect
thetext
in thebuffer
and the
cursor's
position
init
, buti
t
alwa ys processestyped-in
characters before
doing anyother
work. Thispriority
can cause the screen tolag
yourtyping
somewhat. When yo uf irtally
stoptyping
atfull
tilt,
Mincewill
then update thescreen to
reflect
thefinal'
state of
thetext in
the window.2 . 1
. 3
Special characters in
the windowSpeccial
characters
in the ÁSCiícharacter
set
which ar enormally
non-printing
aredisplayed
in Mince's window. Thi
sallows
youto edit
any typeof
file
at
all,
with
no worr le 3about whether or
not
anyinformation
is
missing from the screendisplays
.All
thenonprinting
characters
can berepresented
bythe ASCII
control
characters.
The way Mincedisplays
control
characters
on thedisplay
screenis
byprinting
acaret
oruparrow
(""")
followed
by thecharacter
whichrepresents
t
hecontrol
code in the ASCIIcollating
sequence. (For example,ASCII
Control
E, deoimal 5(also
known as ASCII "ENQ") ,will
bedisplayed
as "^ E?' .)All
commandstreat
the :3é assingle
characters,
except the screen di3p1ay whichtranslates
themfor
output.
The Minee commandsact
on the"text" itself,
not
on theprinted
representation
of
it.
Mince
displays
the tabcharacter
(ASCII"I,
decimal 9) as mov ing thetext
whiohfollows
it
on theline
over to thenext
tab
stop,
rather
than as a"^r'
.It
displays
a Newline a slñOV ing
text
whichfollows
it
to
thebeginning of
thenext
line
of
the screen.Occasionally,
Mincewill
display
a Newline wherethere is not
really
one in thetext.
Thisis
theonly exception
to
therule that
whatis
on the screenis identical
to whati
sin
thetext.
If
thetext to
bedisplayed
would have runoff
the right-hand
edgeof
thescreen,
Mincewill
display
therest of
theline
on thenext line
of
the screen.It
i
susually
easyenough
to
identify
this
condition
, as thelast
word on thetoo-long
line
will
frequently
becut
inhalt.
2 .2 The Mode Line 7'he second
screen area
of
major importancei
st
hel
in ej
ust below thetext
window.It
is called
the "modeline"
andshould
look
somethinglike:
Mince Version 2.5 (Normal)
buf1:
X:FIRSTNAM.LST -23%- *+ Thiooline
tells
youseveral things,
namely:(
I)
You aretalking
to Mincerather
than theoperating
system.¥ark
of
the Unicorn MinceUser's
Guide(2) You are
typing
in a modecalled
"Normal".
Inthis
mode,all
commands typed are
treated just
as they ar eexplained
int
he Minee CommandList.
There areother
modesavailable,
for
example"Fill"
mode or "Page" mode , eaeh c)f
whichchanges the Mince command s:
et
slightly.
(See Section 6 .)(3) You are
editing
text
in abuffer
named"buf1".
This nameis
used when
switching
frombuffer
tobuffer
.(Buffers
areexplained
in Section 5 .) ( Lj ) Youare
editing
afile
called
"X: FIRSTNAM.LST". This nameis
used whenreading
andwriting
files
from thetext buffer
and thefile
system. (See Sections 4 and 5 .)(5)
ThePoint is approximately
23%of
the way through thefile.
(Since
the measureis only
approximate, you may never see 100%, evenif
you areat
the endof
afile.
For an ex act measure of
t
hecursor's
position,
try
the "Where AmI"
command, "C-X
=".)
( 6 ) The
buffer
has beenmodified since
it
waslast
written
outto
thefile.
(This
is indicated
by theasterisk
at
theright
edgeof
the mQdeline.)
(7)
Thenext text deletion
command whichstores deleted text
inthe
kill
buffer
will
append whatit
deletes
to whateveris
already
contained
in the"kill
buffer"
(see Section5).
(This
is"indicated
by the plus sign at the right
edge of
the mode
line.)
2 .3 The Echo Line
'l'he
third
important
sereen area
is
the oneline
of
the screenleft
below the modeline.
This areais called
the e c holine
,for
three
reasons.First,
it
will
echo anyprefix
ciharacters (the
first
keystroke of
an y of
thetwo-keystroke
commands) typed .If
anyof
theseis
typed and aparticularly
long amount
of
time (between .5 and 1 seoond)passes b,efore the
following
charaeter is
typed ,t
heprefix
character
will
beindicated
in the echoline.
For example,if
the Escape keyis
typed,
the phrase "Meta :" will
appear sothat
you knowthat
youhave indeed typed the
prefix
character
.If
not
much time passesbetween the two
keystrokes,
this
display
is not
performed . Thisbehavior is
designed togive confident
users optimum responsewithout
the screen alwaysflashing
messages,yet give
nervous usersinformation
on whatthey
aredoing.
Secondly,t
he ec hoI
ineis
usedfor reading
anddisplaying
the argumentsfor
somecommands which
require
strings
a sinput
( e .g.
t
he ForwardStr
ing Search command) . (See Section3.4.2.)
During thesestring-argument-read
operations,
thecursor
will
not be in thewindow in
its
usual spot attached to thePoint.
Finally,
error
messages from commandswill
appearat
thefar
right
edgeof
theecho
line,
as doinformative
messages which may bedisplayed
while
some ccmmands areexecuting.
Error
messagesdisplayed
inthe echo
line
are accompanied by abell
indicator,
toalert
theuser
of
theerror condition.
Hark
of
the Unicorn ,YinoeUser's
GuideSection 3: The Commands
3
. 1 Text
Insertion
CommandsTo Mince, ever
ything
yo ut
ypei
s a command. Ye s ,
everything.
Evenordinary
letters,
numbers, andpunctuation
which you type are commands. They are ver y simple commands, though;
t
he y merelyinstruct
Mince toinsert
themselvesinto
the text.
Because .ofthis
arrangement, Mince has n o"insert
mode" and
"edit
mode" which determine whethercharacters
typedare commands or
text
to beinserted.
3
. 1 . 1
Ordinary text
All printing
characters:
a-z , A-Z , O-9 , space, and1"//$%&'()*+,-./:
;<=>?@[]"
{j}"" self-insert.
Thecharacters
areinserted
at
thePoint, that
is,
they areinserted just
in front
of
where thecursor is
on thescreen.
ThePoint is
t
henleft
after
the n e wcharacter
which wasinserted
. This
definition
means
that
on the screen ,t
hecursor
will
mov e ov er on echaracter position.
Simplystated,
text
typed on ablank line
moves the
cursor just
as atypewriter
carriage
would moveafter
each
character.
Sinceeharaoters
areinserted
at
thePaint,
if
thePoint
happensto
be in the middleof
someline
of
text,
therest of
theline
is
moved over to make roomfor
the newtext.
3 .1 .2 The <TAI3> key
This command,
while nominally
self-inserting
(It
inserts
an ASCII
"I,
decimal9.)
has acharacteristic
whichaffects
thetext
screendisplay.
When the tabcharacter is displayed,
thecursor is
moved over to thenext
tab stop on thedisplay
screenbefore continuing
todisplay
text.
Thisis not unusual,
butis
mentioned here becauseit
is
oneof
thecharacters
which, wheninserted
in the text
, takes up more than one column on thedisplay
screen.,
3 .1 .3 The <CR> key
'l'he
carriage-return
keyinserts
acharacter,
the Newline,whicM causes the
cursor
to go the beginningof
thenext line
onthe screen .
If
a <CR>is
typed when thePoint is in
themiddle
o
f
aline,
theline
is
split
in two,with
theportion
of
theline
after
thePoint
being moved down and turnedinto
the next
1 in
e . This
is
alittle
eounterintuitive
if
youhaven't
used aneditor
before,
buti f
youconsider
the Newline to be acharacter
j
ust 1 ike theother self-inserting
ones,it
makesMark
of
the Unicorn Mince User' s Guidesense: <CR>
inserts
a Xewlineoharacter
at thePoint,
and innovesthe
Point
past thecharacter.
'w'hat
this
looksl
ike to theoperating
system, when thefile
is stared
in thefile
system,is
aearriage-return/linefeed
combination (ASCII ^ Ml "j
or d ecimal13/10).
Infact
,
this
is
whatusually
causes thedisplay
screenaction of
going to the beginning of
the next
line.
Butit's
easier
toconsider
the Newlinecharacter
to be asingle
one,for text insertion
anddeletion
purposes.(It
is
possible
toenter just
acarriage-return
(^M) or a 1 inefeed ( ^J ) bymeans c)
f
the C-Q command , buttyping
thecarriage-return
key causes the Newlinecharacter
to be en tercelinto
thetext.)
3
. 1 .Lj The <DEL> key
8h
lle
this
charaoter
i
snot
aninsertion
command,it
is
sointimately
tied
to themthat
it
must be mentioned her e. The
<DEL> ke y
is
usedfor correcting
typing mistakes;
it
deletes
the
last character
typed.
Since a Newlinei
streated
as anordinary
character,
a <DEL> candelete
<CR>'S typedjust
like
any
other character.
Amore complete
description
may be foundin
the CommandList.
3 .2 The
Simplest Editing
Commands Ho w ar e"true"
editing
commandsdifferentiated
frornactual text?
By the useof
theterminal's
CONTROL key. The mostfrequently
usedediting
commands are onecharacter
long , an dthat
character
i
s acontrol
oharacter.
For example, a C-Fcauses the
cursor
on a videodisplay
screen to be moved forward acharacter,
an d C-El causesi
t
to be mov ed backward acharacter.
Thecontrol
characters
are generated byholding
downthe
control
kcy (just
l
ike theShift
key) andtyping
thecharacter
. The easeof
aletter
makes nodifference
to Mincecommand
characters;
"C-f"
is
the same as "C-F" .The command s are mnemonically named.
Oeeasionally
themnemonics are
stretched
alittle,
but by andlarge
the commandshave ssome
relation
to theletter
upon which the y ar e placed .This makes
it
possible
to remember in anatural
mannerall
theoommands whidti
manipulate
thetext.
Thespecial function
ke ys on theterminal
keyboard ar e not
usually
usedfor
anotherreason:
it
is not possible
to use these keyswithout
having thetypist's
hands leave the standard keyboardposition.
Thi
sehoice means
that ic
takes alittle
longer
tolearn
the commandset,
but the time made uplater
by commandtouch-typing
is well
worth
theeffort.
In most
editors,
Unce there is
adifferentiation
betweentex
t
insertion
mode andediting
mode,it
is
easyto
type thecharacters
wtiioh make up theeditor
commandset into
the text
.Sinee Mince commands are
all
control
characters
it
is unlikely
that
youwill
wantto
type theminto
your text
.If
you do ,Mark
of
the Unicorn MinceUser's
Guidehowever ,
there is
a command to"quote"
thenext character
andinsert
it
into
thetext
directly
rather
thaninterpreting
it
as a command. (See C-Qin
the CommandList.)
3 .3 The Two-keystroke
Editing
Commands Asyou
will
see,there is
aprogression
in commandnames.
The
simplest
and most-used commands are theeasiest
to
type.
Tex
t
itself,
for
example,i
s v er y easy to type . Tho seone-character
commands whioh aretextual
characters
self-insert
into
the document you areediting.
Commands used toedit
single
'characters
orlines
arequite frequently
used, and are placed on the simplecontrol
characters.
The merecomplicated
andlesser-used
commands areslightly
harder to type andrequire
two
keystrokes.
3
. 3 . 1 Meta-commands
Some oIt'
two-char
acter
commands ar ecalled
"meta-ecmmand s" . These are generated by
typing
the ESCAPE key,then
typing
acharacter
. Typing the escape key oauses the
following
character
to betreated
as a Meta-command.
If
sufficient
t
ime elapses after
typ ing the <ESC> and thefollowing
character
, the message "Meta:"
Ñijñ
appear in the e cho area toindicate
that
Minceis waiting
for
acharacter
tomake up one
of
the Meta-commands. A C-Gwill
cancel the Me taprefix
and leave thetext
unchanged. Again, ease make3 no
difference;
the seoondcharacter
typed may beeither
upper orLower ease. For example,
typing
ESCAPE F (M-F) moves thecursor
forward a word , and ESCAPE
E3 (M-B)
moves backward a word.
Commands which operate on wot"doo,
paragraphs,
or thelike
ar eusually
two-keystroke
meta-commands:.
3
-3 .2 Meta-control-commands
there
is
anotherset of two-keystroke
commands, whichis
a combination
of
thecontrol
commands an d the meta-commands.The se ar e the
"meta-control-commands",
whic h are given bytyping
an ESCAPE, then theappropriate
control
character
.3
· 3 · 3
Control
X commandsYet another
(but
thelast!)
setof two-keystroke
commandsis
theset of "Control
X commands." Theseare
nothing
tporé thanan
ordinary one-keystroke
commandprefixed
by theone-keystroke
C-X command .Similarly
to the Metaprefix
character
(<E3C>),typing
the C-Xwill
display
"Control
X:"
in the echo areawhile
waiting
for
the secondcharacter
in the sequence, andtyping
C-Gwill
cancel the C-Xprefix.
3
. 3 .Lj
Relation
between simple andtwo-keystroke
commandsThere
is
arelation
between thecontrol
commands ,t
heMark
of
the Unicorn MinceUser's
Guidemeta-commands, and the meta-control-commands.
Usually,
t
hecharacter
upon which the commañcÍ3is
based hassimilar
effecU
in
both thecontrol
and meta-commands. For example, C-A movesto the
beginning of
aline
and C-E movesto
the end. M-A and M-E move to thebeginning
and end,respectively,
of
sentences.Occasionally,
thecontrol
an d meta-commands m a y be direct
opposites
instead
. For example, C-V views thenext
screenof
tex
t
, whereas M-V views theprevious screenful.
In almostall
eases, though,
they
arerelated
in some way.3 .
u Arguments
to
Commands Idooot t4tnce commandsare
self-contained.
Someof
them, however , need parameters,or
arguments, to accomplishtheir
task.
For example, thestring
search command needs to know whatstring
to searchfor.
The command which sets tab spacing needsto
know what column incrementto
use. Or perhaps Mince wants to knowif
it
shoulddestroy
abuffer
of text
to read in a n ewf
lle
. These argumentsgive
the commands anyextra information
they
need to performproperly.
Inparticular
, numeric argumentsare
useful,
a 3t
he yallow
repetition
of
the other
Mince commands.
3 .
a
. 1 Numeric arguments
(repeat
counts)Command3 m a y be given numeric parameters as arguments.
These arguments
usually
are used asrepeat counts.
For example,an argument
of
100to
the C-F command would cause thecursor
to move forward 100 characíters forwardrather
than the us ual 1character
.Occasionally,
arguments are useddifferently;
fe' rexample, an argument to the command which sets the
right
marginspecifies
the column number to seti t
at
,rather
th an thenumber
of
times toreset
theright
margin! Sinceall
ordinary
textual
characters
areactually
commands tejo, they can be givenarguments
in order
toinsert
several of
themselvesat
once. For example, an argumentof
20to
"*" will
insert
twenty stars into
the
text at
thePoint.
Qf course
, the manner o
f
g iv ing command s numeric
arguments
i
sits:
elf
a command! The C-U commandspecifies
thenumeric argument
for
the command whichfollows
it.
For example,if'
we wished togive
the argumentof
100to
the C-F command, wewould type the C-U, then the number 100, then the C-F command. The number typed
will
bedisplayed
in the echoline
asit
is
being entered . Only
positive
numbers or zero may b eentered;
negative
arguments donot
exist.
3 .u .2
String
ArgumentsSome commands
will explicitly
asktor character strings
to
be usedas parameters
for their
execjution. Examplesof
these are thestring
search commands and thefile
reading
grwriting
commands .
If
such astring
is
needed a promptwill
appear atMark
of
the Unicorn MinceUser's
Guidethe bottom
of
the screen, in the ccho ar e a. The
character
str
ing to besupplied
to the eommand z:s an argument should betyped in .
Part
of
theecho-line
display
will
be the promptitself,
whieh
will
describe
what thestring
to be given to the commandwill
be usedfor.
Following
this
promptwill
be astr
trigspecifying
thetermination
character
,either
a <CR> or <ESC>.This
character,
when typed ,will
signal
the endof
thestring
argument and
allow
the command to processit.
If
anytyping
mistakes occurwhile entering
this
string,
the <DEL> key
will
erase them, asit
does inordinary
text.
However , therest
of
theediting
commandswill
just
insert
themselves
into
thestring
argument,rather
thanediting
i
t
.This mean s
that
the command whiohusually
quotes the commandcharaciters
toinsert
theminto
thetext (the
C-Q command)is
almost never necessary whe n
entering
astr
ing argument.
However,
if
thetermination
character
is to
be inserted
in tcjthe
string
argument,iUmust
be quoted.The C-G command
will
abort execution of
the command whichi
s askingfor
thestring
argument.
Naturally,
it
will
thusterminate
thestring
entry
aswell.
If
a C-G must be entered
into
thestring
argument,it
too can be quoted asnormal.
The <CR> key has adifferent
effect
than usual when typedas
part of
astring
argument.It will
dis:play
as "<NL>"rather
than going to a new
line.
This both assures youthat
you haveindeed
inserted
a Newlineinto
yourstring
(for
example,to
search
for
the end cjf aline
followed
by a word) andprevents
the
cursor
from goingoff
thescreen.
Typing the
termination
character
without
typing
anystring
first
(called enter
ing a"null
str ing"
in the CommandList)
causes the command to use anappropriate default
for
thecharacter
string
. For example, thestring
search commandswill
u se whatever
string
wa sl
ast
searchedfor
, thefile
I/Ocommands
will
use whateverfile
name wá3last
used in the te xt
buffer,
and thebuffer
commandswill
use whateverbuffer
name waslast
sswítched from.3 .u .3 Yes/No arguments
Some commands
will
as k YeSINc)questions
to g et
information.
Thesequestions,
like
the prompt sfor
str
ingarguments,
will
appear in the echoline,
butthey
will
not
have anystring
termination
character
specified.
Typing a "Y" or"y"
or a space
will
answer yes to thequestion,
andtyping
"N" or"n"
or the <DEL> keywill
answer no. Typing C-Gwill
abort
the 'command which asking the
question;
this
is equivalent
to
the noanswer to the
question.
The yes/noquestions
areusually
askedif it
is possible that
some user commandis
aboutto destroy
anentire
buffer
of
text
or m akeother
large,
irreversible
u
Mark
of
the Unicorn MinceUser's
GuideSection U:
Input/Output
u
. 1 Terminal
I/O
Terminal
input/output
is
fairly
straightforward.
Minceha s Sever
al
parameters whie htell it
how to doappropriate
cur3or positioning
,character
insertion,
andline erasing
onmost standard
terminals.
Theconfiguration
program sets these upduring
your systemímstallation.
Character-at-a-time
in puti
s done from the keyboard; typeahead 13automatically
available,
evenduring
screenredisplay.
Notethat
typeaheadDOE3 NOT work
during
theother
two formsof 1/0.
Thisis
due tousing the
particular
small computer (8080/Z80) andoperating
system which Mince
i
sr
unn ing an . Versions of
Mincefor
slightly
larger
machines ( e .g. PO P-1 1 or VAX) or
other
operating
systems(e.g.
UNIXor
its
look-alikes)
do ñcjt hav ethis restriction.
Lj
.2 Text
Buffer
1/0Text
butter
I/Q occurs because Mince implements avirtual
memory system
for storing
text.
Textfiles
which are many timeslarger
thanavailable
free
memory space may beedited.
Mincemaintains
a page-swappingfile
(ealled
"MINCE.SWP") whichi
t
u se s to pag e
sections of text
in and outof
main memory on aleast-recently-used
basis.
This pagingaffects
the user inthree
ways :(I)
Typing on theterminal
keyboardis
ignoredduring paging.
( 2) Screen
redisplay
ma yoccasionally
beinterrupted
for
ashort period
if
a pagenot in
main memoryis referenced.
(3)
If
the keyboard remainsidle
for
acertain
length
of
time(settable
in theconfiguration
program) Mincewill
write
pages which have been mcxiified in main memory backto
thed
ise
swapfile,
in order
to make swapping alittle
faster
when the
terminal
keyboardis
in use again . Typingat
thekeyboard eauses
this
"housecleaning" operation
to cease . A warningmessage
tells
youthat
atext buffer
1/0interruption
is
about tooccur.
The message "Swapping..."
will
appear in the
error
message areaof
the echoline.
It
is possible
toget
theerror
message "SwapFile
Full"
to
appear on the modeline
during
file
readoperations,
larg
eLex
t
deletions,
or dur ingtext entry (although
thelast
is
highly
unlikely).
This meansthat
thetotal
of
all
the text
which Minceis storing
is larger
than the swappingfile
size
,and
that
thefile
read or text
entr
yoperation
did not
Mark
of
the Unicorn MinceUser's
Guidesuccessfully
complete becauseit
was unable tofind
more roomto create
new pagesfor text storage.
Thi
scondition
i
s n ot
fatal;
editing
maystill
becontinued,
although
theoperation
which caused the swap
file
overflow
almostcertainly
d id not
complete
properly.
There are twosolutions
for this
condition:
either
remove some of
the text
buffers
(via
the " C-X K"command) wh
ic
h Mincei
s using and are nolonger
needed(if
there is
more than one) (you can,of course,
write
them outs irice the ed
itor
will
still
operate)
orexit
theeditor
andincrease
the swapfile
size
using theconfigur ation
program .(It
is,
of
course,possible
to gain space in the swapfile
bydeleting
someof
thetext
in oneof
thebuffer3
rather
than removing thebuffer
entirely,
butthis
alternative
is rarely
u sed . )
u .3
File
SystemI/O
Elle
system l/Cl occursonly
whenit
is requested.
Aswith
buffer
I/O,
terminal
keyboardinput
i
s ignored dur ing disc
access . As
this
i
s not
unexpectedI/O,
asis buffer
pageswapping,
this
limitation
is not very important.
File
systemríarnes
for
the CP/Mversions of
Mince areof
thefollowing
fbrm:
X:FIRSTNAM.L3T
"X:
"
is
theoptional
disc
dr iv e n arríe. "FIRSTNAM"
is
theone-through-eight
character
first
componentof
thefile
n ame ." . LST"
i
s theoptional
one-through-three
character
secondcomponent
of
thefile
name.(This
second name must be preceded b y a per iodif
i
t
is
used .)It
is probably wisest
to use alphanumeriefilenames,
asdifferent
conventÁQñ3 are used when .different
operating
systemversions
and programstry
to parsethese names
later.
When afile
nameis not
specified
to thefile
I/Q commands, thefile
uauíe which was associatedwith
thetext buffer
in which thefile
read command was given (as shownat
theright
edgeof
the modeLine) is
used.Mark
of
the Unieorn MinceUser's
GuideSection 5: Text
Buffers
5 .1 h'hat
is
aBuffer?
hínce does no
t
edit
text
dire^ti'/
on thefiles
in
thefile
system.Instead,
it
eQpie3 thetext
from whateverfile
you wish toedit into
a"buffer"
of
text.
Changes are made tothis
buffer,
and are then saved baekinto
thefile
if
you askfor
it,
bygiving
the"write
file"
command.5 .2 Why Use
Buffers?
Thiuu method has
quite
a few advantages.First,
i f
yo udec.id e
that
the changes you have been making arenot quite
theright
thing
to do, you can exit
the editor
without
hav ingdamaged your
original
file.
Secondly,if
the computer crasheswhile
you areediting,
yourfile
will
not
bele
ft
c)penwith
inoorrect
information
in themiddle of
it.
Thirdly,
you cíanread data from one
file
andwrite
it
out to adifferent
one,leav ing the
original
text
file
intact.
Finally,
you can haveseveral buffers of text active at
oncewhile
running
Mince ,This
capability
allows
yo u toedit
eme document based uponinformation
contained
in anotherwithout
constantly
entering
and
exiting
theeditor.
Additionally,
with
the useof
thekill
buffer
(explained
in Section5.ü
below) ,text
may be moved fromone document
to
another aswell.
There are commands which
allow
youto switeh
frambuffer
to
buffer
,automatically
create
newbuffers
andselect
namesfor
themwhile reading
in newtiles.
Thereis
also a command todelete buffers,
if
necessary.
Finally,
there is
a command tol
1stall
thebuffers
whichcurrently
exist,
should youforget
what
tiles
you have and havenot
read in to beedited.
5
. 3 What Other
Information
theBuffer
ContainsIn
addition
to thetext in
eachbutter
, several
other
piecesof information
arestored with
thebuffer
.A
file
nameis associated with
eachbuffer.
It
is
the rj ame of
thefile
wh
ich
ha slast
been read from orwritten
towhile
inthis
buffer.
Thedefault
for this
name(for
example,if
newtext
is
t
yped in to abuffer
in which no read orwrite
file
commands have been issued)is
"DELETE.ME" .A
Point
and a Mark are alsoa3sociated
with
e ac hbuffer
. This meansthat
whenswitching
back and
forth
betweenbuffers,
the Mark and thePoint
inthat
buffer
will
-not have moved,regardless of
where you have moved anyother buffers'
Points
or Marks, andthat
thedisplay
will
.Yark
of
the Unicorn Mincetjser's
Guidereappear in the same
state
it
was when youleft
thebuffer.
Each
buffer
also has a "mode" associatedwith
it.
Usually this
mod e
is
"Normal" mod e, but
i
t
can be changed. Modes aredescribed
in Section 6.5 .u The
Kill
Buffer
'I'here
is
onespecial buffer,
called
the"kill
buffer"
.Th
is
buffer
is
used to save anydeleted text
whichis deleted
in
clumpsof
more than onecharacter at
atime.
For example,if
you
delete
aline
or two,they
will
be saved inthi
skill
buffer
. Ther eis
a command toretrieve
whatis
saved in thekill
buffer,
so that
i f
yo u inake an ylarg
e mistakes indeleting,
you can undo what you have done. Thisfeature
is
also used to movetext
from one plaee to another , asit
acts as atemporary
storage buffer.
The
kill
buffer
stores
only
text
deleted
by commandswhich
delete
words, sentences,lines,
orregions.
The commandswhich
delete characters
arenot
considered "dangerous" enoughto
make mistakeswith,
nor goodvehicles
for deleting
large
quantities
of
text.
Also , thekill
buffer
tries
tostore text
in
the properorder
whendeletions
occur.
Thus,deleting
wordsbackwards and
deleting
wordsforwards
will
appendtext
to theeorreot
endof
thekill
buffer,
suchthat,
if
thetext is
yanked back outoí
thekill
buffer
again,
all
the wordswill
bein
the properorder
.The
kill
buffer
will
store
and mergetogether consecutive
text deletions.
This meansthat
if
several
line-kills
are donein
a row,they
areall
mergedtogether.
(You may havenoticed
that this deletion-merging
wasimplied
above by thediscussion
of
worddeletion
order .) Onekill
buffer
retrieval
commandwill
yank
all
thetext
whichis
in thekill
buffer
backat
once. Thekill
buffer
will
only
store
one setof deletions
at
once, however . Thefirst
kill-buffer-saving
text deletion
whichi
s done "open s up" the
kill
buffer
.Thereafter,
any successivetext deletion
commands given which save thedeleted text
in thekill
buffer
will
mergeit
with
whateveris
already
in thebuffer
.If
anynon-deletion
commands are giventhereafter,
thekill
buffer
is "closed
Ot'f'ñ,Following
kill-buffer-sav
ing text
deletion
commandswill
throw away whatevertext is
then in thekill
buffer
and open up a newset of
killed
text
in thekill
buffer
. Thisbehavior is reflected
on the screendisplay.
Theplus-sign
on theright
side of
the modeline
indicates
whether
or no
t
an y text
to bekilled will
be merged onto thekill
buffer
ornot.
If
the plusis
turned orí, thetext deleted
will
be added to what
is already in
thekill
buffer.
If
it
is
off,
the new
deleted text
will start
a newkill
buffer
(andturn
theplus-sign
on againuntil
anon-deletion
commandi
sgiven)
.The re
i
s a command which doesnothing
but"turn
on the plussign",
sothat text
may,if
desired,
bedeleted
fromseveral
places
and yet
still
mergedtogether
onto thekill
buffer
sothat
asingle
kill-buffer-retrieval
commandwill
yan ki
t
all
Mark
of
the Unieorn MinceUser's
Guideback.
The
kill
buffer
is
the mechanism used to Qopyor
movetext
from onepart of
a document toanother.
Aregion of
text
is deleted
(which savesit
in thekill
buffer)
.If
it
is to
becopied,
it
is
yanked back outof
thekill
buffer
again, at
thesame
spot,
sqthat
thetext
hasnot
"really"
beendeleted.
Thecopy
of
thedeleted text is
still
stored
in thekill
buffer
,howev er . Th us , to m ake another copy
of
it,
theretrieval
command can be used to yank
it
out
again andagain,
Thus,
i
t
e an be copied at an yother
place in theVuffer
, merely by
issuing
the command again .If
thetext is
to be mov edrather
than
copied,
thetext is
merelynot
yanked back thefirst
timeat
its
original
position,
butonly at
thedesired
newposition
in
the document. Thekill
buffer
i
sconstant
acrossall
buffers.
Text whichis deleted
and saved in thekill
buffer
while
editing
onebuffer
can be yanked backinto
adifferent
buffer
. Thus,pieces of text
can be moved fromfile
tofile
byusing
multiple
buffers,
one to hold eachfile
used in the moveor copying
operation,
and by using thekill-buffer-saving
text
deletion
commands and thebuffer-retrieval
yanking command.
-.
Mark
of
the Unicorn MinceUser's
GuideSection 6: Mince Modes
Mince' s " modes" ar e us ed to implement
fundamentally
differing
strategies
for interaction
with text
in thebuffer
.In
general
,if
alarge
groupof
commandsis
to be ohanged insome
consistent
fashion
orif
entering
text is to
have a n e\nmeaning, the changes are combined
into
a mode.6
. 1 Normal Mode
Mi.nee begins
execution
in ,Norrnal Mode. This mode causesall
ordinary
textual
characters
typed to beinserted
in to thebuffer
at thePoint.
Othertext in
thebuffer
is
oohiftéd overto
make roomfor
the newcharacters
entered . Normal Modeis
the"starting
point"
for
the Minee commandset:
Other modes may beadded ( on a
per-buffer
basis)
, but tho se modes
only
addfunctions
orrebind
commandsto
keys; unless the documentationfor
a m od especifically
mentions Normal Mode commands whichhave been
deleted,
all
commands which havenot
b een assignednew
furictioas
areleft
with
their
Normal Mode meaning.6
.2
Fill
ModeFill
mode was designed toincrementally
fill
paragraphs.The
auto-filling
action
makestext entry
neater and prevent3having to
look at
thedisplay
to keep tracíkof margins.
InFill
Mode
, the space
key's
command checksto
seeif
theprevious
word typed extends past the prese
t
"fill
column" ( the samecolumn used b y the
"Fill
Paragraph" command), and
if
so,automatically
inserts
a Newlinebefore
the word. Then a spacei
s enteredinto
thetext,
as usual . Thisbehavior
meansthat
typis.ts
needonly
hit
thecarriage-return
key when they mean toenter blank lines or
intentionally
breaktext
to begin on a newl
in e . Inorder
toinsert
a spaee past thefill
eolumnsetting,
the space command must be quoted (by using the C-Q command).
All
other
Normal Mode ciommands remain unchanged byFill
Mod e . In
particular,
theFill
Paragraph commandstill
works ,and
text entry
anddeletion
is
the same asusual.
Thus ,while
the space command performs the
auto-fill
once,it
doesnot
keep the paragraphfilled.
Going. back andinserting
ordeleting
text
can make the
right
margin more raggedagain.
Note
that this
mode,like
theFill
Paragraph command,
does
not
justify
theright
margin byinserting
spaces in theline.
TTieaves
theright
margin ragged, butfits
as many wordsMark
of
the UniQorn MineeUser's
Guideas
possible
on aline,
thenautomatically
inserts
a Newline.6
.3 Page Mode
Page µ.ode was implemented in Mince
primarily
a s an a idfor
those who have hadprevious experience with other
typesoí
screen-oriented
editors.
In Page Mode, tex
t
insertion
an d lñOV ement
commandstr
eatt
he text
buffer
asi f
it
were atwo-dimensional grid of characters
thewidth
of
theterminal
screen (a "page"
of
text).
Thisdiffers
from Normal Mode, in whichtext
is treated
as aone-dimensional string
of chzraeters
in
which the Newlinecharacters
define
l
in es of
differ
inglengths.
·6
.3 .1 Page Mode
text entry
Uní ike Normal Moae
,
text
insertion
while
in Page Modeoverwrites
previously
existing
te xt
. Inorder
toactually
insert
charaeter3 without overwriting
thecharacter
in the 3áUléposi