Dec 152017
MicroEMACS - 4 of 5 - script files.
File UE311CMD.ZIP from The Programmer’s Corner in
Category C Source Code
MicroEMACS – 4 of 5 – script files.
File Name File Size Zip Size Zip Type
BPAGE.CMD 12363 2805 deflated
BUFDEL.CMD 1014 424 deflated
CAL1.CMD 2190 888 deflated
CAL3.CMD 1603 753 deflated
CALUTIL.CMD 4521 1556 deflated
CPAGE.CMD 8105 2055 deflated
EDT.CMD 3726 1219 deflated
EHELP.CMD 9496 2224 deflated
EHELP1.TXT 38168 11993 deflated
EHELP2.TXT 16707 4917 deflated
EMACS.RC 5037 1785 deflated
ENCODE.CMD 768 399 deflated
EPAGE.CMD 3606 1108 deflated
ERROR.CMD 2769 1042 deflated
FUNC.CMD 630 350 deflated
IWRAP.CMD 264 203 deflated
LPAGE.CMD 5126 1548 deflated
NEWPAGE.CMD 2897 994 deflated
OPAGE.CMD 5904 1696 deflated
PLATIN.CMD 749 377 deflated
POS.CMD 597 306 deflated
PPAGE.CMD 8294 1706 deflated
SCAN.CMD 8393 2233 deflated
SENTENCE.CMD 2383 637 deflated
SHELL.CMD 2351 778 deflated
SMOOTH.CMD 976 421 deflated
TABLE.CMD 219 129 deflated
WPAGE.CMD 4221 1418 deflated

Download File UE311CMD.ZIP Here

Contents of the EHELP1.TXT file

[ENTER]Picks a topic [PG UP] Last ScreenCursor keys
[F10]Exit Help[PG DOWN] Next Screenare active
[F6]Index [HOME] Main Menu
< >
[ENTER]Picks a topic [PG UP] Last Screen [I] Index Cursor keys
[F10]Exit Help [PG DOWN] Next Screen [HOME] Main Menu are active
< >
=>Main Menu
NEXT[The Basics] PREV[Main Menu]

< > The Basics< > Keystrokes

< > Getting at Files< > Issuing Commands

< > Searching and Replacing< > Command List

< > Regions< > Customizing Command Keys

< > Cutting and Pasting< > Using the Mouse

< > Buffers< > Modes of Operation

< > Windows< > The Outside World

< > Screens< > Advanced Text Editing

=Command List
=Creating New Commands
=Customizing Command Keys
=>Keyboard Macros
=Repetitive Tasks
=Creating New Commands
=>The Basics
NEXT[Alternative Basic Keys] PREV[Main Menu]

MicroEMACS is a very powerful tool to use for editing text files.
It has MANY MANY commands, options and features to let you do just
about anything you can imagine with text. But don't let this
apparent complexity keep you from using it.... MicroEMACS can also
be very simple.

To start editing files, all the keys you really need to know are:

[CSR UP]These keys let you move
|around in the your file
[CSR <-] <---> [CSR ->]

[F9] This saves your file

[F10]This leaves MicroEMACS

[PG DOWN] for other basic keys
=>Alternative Basic Keys
NEXT[Glossary of Terms] PREV[The Basics]

On systems that do not have special function and cursor keys,
MicroEMACS works by using control keys. On such a system these
keys perform basic functions:

^PMove upward
^BMove backward
^FMove forward
^NMove downward

^X^SSaves your file

^X^CExits MicroEMACS

An up arrow before the key means to hold the CTRL key down and
press the next character. For example, to exit MicroEMACS, hold
down the CTRL key and strike X and then C.

Press [PG DOWN] to learn about the terms used within MicroEMACS

=>Glossary of Terms
NEXT[Glossary 2] PREV[Alternative Basic Keys]

MicroEMACS uses a number of defined terms which will help you
understand the rest of this help document.

< > COMMANDSThese are built in functions that represent
basic things that MicroEMACS does. For example,
the cursor up key activates the "previous-line"
command which moves the cursor up to the line
of text immediately before the current line.

< > BINDINGSA binding is a link between a sequence of keys
and a command. The command previous-line is bound
to the cursor up key, and to the ^P key. Pressing
a key sequence causes the command to which it is
bound to execute.

[PG DOWN] for more terms
Select term for more info
=>Glossary 2
NEXT[Glossary 3] PREV[Glossary of Terms]

META KEYis the key used to start many commands. On most
keyboards this is the [ESC] key, but many times
it is rebound/changed to the key in the upper
left corner of the keyboard. This is often the
grave accent symbol.

< > BUFFERSThese are areas of memory set aside to hold text.
Each buffer has a buffer name which is used to
refer to it, and a file name from which it has
been read or where it will be written.

< > WINDOWSSections of the current screen which display a
portion of a buffer. More than one window may be
visible at a time. Multiple windows split the
screen horizontally.

[PG DOWN] for more terms
Select term for more info
=>Glossary 3
NEXT[Glossary 4] PREV[Glossary 2]

< > SCREENSare collection of windows. On a older text style
system, one screen is displayed at a time. On
a newer window based system, like OS/2, the
Macintosh or MicroSoft Windows, each operating
system window can display a different MicroEMACS

MODE LINEis the line at the bottom of each window naming
the buffer being displayed, along with its file
name. Also the active modes of the window are shown.

COMMAND LINEis the line at the bottom of the each screen
where you give more information to some commands.

[PG DOWN] for more terms
Select term for more info
=>Glossary 4
NEXT[Glossary 5] PREV[Glossary 3]

< > MACROSare programs written in the MicroEMACS language
which let you automate repetitive editing tasks.
These help pages are being run by a relatively
simple, but powerful MicroEMACS macro.


These are remembered sequences of keystrokes which
can be used to greatly speed quick and dirty
repetitive editing.

< > PAGESThese are groups of macros which have been written
to handle a particular editing task, and which have
been packaged to be available from the MicroEMACS
startup file. These macros are bound to shifted
function keys.

[PG DOWN] for more terms
Select term for more info
=>Glossary 5
NEXT[Main Menu] PREV[Glossary 4]

< > POINTThe position in the text of the current window
of the cursor. The point is considered between
the character the cursor rests on and the one
immediately behind it.

< > MARKPosition in the current buffer which delimits
the beginning of a region. Various commands
operate on text from the MARK to the POINT,
or move the current point to the MARK.

[PG DOWN] to return to Main Menu
Select term for more info
=>Modes of Operation
NEXT[Main Menu] PREV[Main Menu]

Modes determine how MicroEMACS will treat text. Modes effect the
contents of a buffer. Global modes determine the modes of newly
created buffers.

^X-M (add-mode)Adds a mode to the current buffer
^X-^M (delete-mode)Removes a mode from the current buffer
M-M (add-global-mode)Adds a global mode
M-^M (delete-global-mode)Removes a global mode

These are some of MicroEMACS's modes:

< > ASAVE mode< > EXACT mode< > REP mode

< > CMODE mode< > MAGIC Mode< > VIEW mode

< > CRYPT mode< > OVER mode< > WRAP mode

=>ASAVE Mode
NEXT[Modes of Operation] PREV[Modes of Operation]

ASAVE modeAutomatically Save

When this mode is on, MicroEMACS automatically saves the contents
of your current buffer to disk every time you have typed 256
characters. The buffer is saved to the file named on the mode line
of the buffer. This mode assures you that you will loose very
little text should your computer crash while you are editing. Be
sure you are willing to have your original file replaced
automatically before you add this mode.

The frequency of saving can be altered by changing the contents of
the $asave environment variable. Use the set command like this:

^X-A $asave 2048

to change MicroEMACS to automatically save the current
buffer after every 2048 characters are typed.

=>CMODE Mode
NEXT[Modes of Operation] PREV[Modes of Operation]

CMODE modeEditing C programs

This mode is specifically for editing programs written in the C
language. When CMODE is active, MicroEMACS will try to anticipate
what indentation is needed when the key is used. It will
always bring a pound sign (#) with only leading white space back
to the left margin. It will attempt to flash the proper character
matching any close symbol as the close symbol is typed.

The standard startup files for MicroEMACS will install a macro
which checks any file being read into MicroEMACS and sets CMODE if
the file ends with a .c or .h extension.


Place the point on any brace, bracket, or parenthesis and use
this command, MicroEMACS will jump to the matching character. If
there is none, a beep will sound.

=>CRYPT Mode
NEXT[Modes of Operation] PREV[Modes of Operation]

CRYPT modeEncryption

For files of a sensitive nature, MicroEMACS can encrypt text as it
is written or read. When you write out text, if CRYPT mode is
active and there is no encryption key, emacs will ask:

Encryption String:

Type in a word or phrase of at least five characters or more for
the encryption to use. If you look at the file which is then
written out, all the printing characters have been scrambled. To
read such a file back in, call up MicroEMACS like this:

emacs -k

and you will be asked the encryption key before the file is
read. The encryption algorithm is a Beaufort Cipher with a
variant key. This is reasonably difficult to decrypt.

=>EXACT Mode
NEXT[Modes of Operation] PREV[Modes of Operation]

EXACT modeCharacter Case during Searches

Normally, when using search or replace commands, MicroEMACS
ignores the case of letters for comparisons. With EXACT mode set,
the case of the characters must be the same for a match to occur.

=>MAGIC Mode
NEXT[More MAGIC] PREV[Modes of Operation]

MAGIC modeRegular Expression Pattern Matching

Normally, MicroEMACS uses the string you type in response to a
search or replace command as the string to find. When magic mode
is enabled, MicroEMACS considers the string you type as a pattern
or template to use in finding a string to match. Many characters
in this template have special meaning:

.any single character, except newline.
[]any single character from the bracketed set.
^beginning of a line.
$end of a line.
\the next character has no special meaning,
take the next character literally
(unless it is a parenthesis)

Press [PG DOWN] for more magic

=>More MAGIC
NEXT[Modes of Operation] PREV[MAGIC Mode]

Here are some more special characters in MAGIC mode:

?the preceding character (or . or []) is optional.
*the preceding character (or . or []) matches
zero to many times.
+the preceding character (or . or []) matches
one to many times.
\(\)define a group for the replacement string, or for
the &GROUP function.

Some characters in the replacement string can have special meanings:

&insert all of the text matched by the search.
\the next character has no special meaning (but
see groups...)
\1 to \9insert the text defined by the nth group in the
search string.

=>OVER Mode
NEXT[Modes of Operation] PREV[Modes of Operation]

OVER modeOverstrike Mode

MicroEMACS is normally in what many other editors consider
"insert" mode. This means when you strike a character, MicroEMACS
makes room for that character in the current line, inserting it
between the existing characters. In OVER mode, MicroEMACS instead
overwrites characters, replacing the existing character under the
point with the character you type. OVER mode will maintain the
position of text lined up using tabs while replacing existing

Be wary editing Japanese KANJI characters while in this mode, it
is possible to overwrite the first byte of the character, leaving
the second byte meaningless and alone.

=>WRAP Mode
NEXT[Modes of Operation] PREV[Modes of Operation]

WRAP modeWrap entered text

This mode causes the point and the previous word to jump down to
the next line when you type a space and are beyond the current
fill column. This is normally set to column 72, allowing you to
enter text non-stop on a standard screen without bothering to use
the return key.

To change the column that text is wrapped past, use the set
command to change the value of the $fillcol environment variable,
like this:

^X-A $fillcol

MicroEMACS will then wrap words past column .

=>VIEW Mode
NEXT[Modes of Operation] PREV[Modes of Operation]

VIEW modeNo Changes Permitted

When in VIEW mode, no command which would change the text is
allowed. If you attempt any such command, or try to type in any
text, MicroEMACS responds with:

[Key Illegal in View Mode]

This mode is very useful when you want to just look at some
existing text, as it will prevent you from changing that text.
Also MicroEMACS will not attempt a file lock if a file is read in
VIEW mode, allowing you to view files which you don't have write
access to, or other people have locked. To read a file in view
mode from the command line, type:

emacs -v

=>REP Mode
NEXT[Modes of Operation] PREV[Modes of Operation]

REP modeReplace Mode

MicroEMACS is normally in what many other editors consider
"insert" mode. This means when you strike a character, MicroEMACS
makes room for that character in the current line, inserting it
between the existing characters. In REP mode, MicroEMACS instead
replaces the existing character under the point with the
character you type. REP mode will not maintain the position of
text which takes up multiple columns using tabs since it will
replace a single tab character with the typed character which will
not take up the same space on screen.

However, Japanese KANJI characters will correctly replace and be
replaced in this mode as the two bytes will be considered together
when either style character is used.

NEXT[Main Menu] PREV[Main Menu]

All the MicroEMACS documentation talks about commands and the
keystrokes needed to use them. Each MicroEMACS command has a name,
and most of them are bound to a sequence of keys. Whenever we
refer to a command we will display it's binding (the keys needed
to activate the command) and the name of the command in

Keystrokes for commands include one of several prefixes, and a
command character. Command keystrokes look like these:

^Ahold down , press 'A'
M-Apress the META key, release it and press 'A'
^X-AHold , press 'X', release, press 'A'
^X-^Ahold , press 'X', release, hold , press 'A'
S-FN1hold down , press function key 1
A-Ahold down , press 'a'
FN^1hold down , press function key 1

=>Searching and Replacing
NEXT[Other Searches] PREV[Main Menu]

Commands for searching for and replacing strings come in a number
of different flavors. The simplest commands is:

^S (search-forward)

Typing this command results in a prompt like this:

Search []:

Any text shown in the square brackets will be searched for if you
don't type in any string. This is called the default search
string. The key shown in the angle brackets is the key you type to
end the search string, which is called the search terminator key.
Normally, it is the META, or ESCape key. This lets you to use the
return key () in a search string. So if you want to find the
string "mystic", you would type the word, and then ESCape key. The
point would jump to the end of the next occurrence of "mystic",
or, if there are none, MicroEMACS displays "not found".

=>Other Searches
NEXT[Replacements] PREV[Searching and Replacing]

^R (search-reverse)

This works like ^S except that it searches backwards through the
text for the last occurrence of the string. It leaves the point at
beginning of the string found.

A-S (hunt-forward)

This command searches for the next occurrence of the last search
string entered, without prompting for another string. To use this
command, hold down the ALT key and type 's'. This keystroke may
not be available on all keyboards.

A-R (hunt-backwards)

This searches backwards for the last occurrence of the last search
string entered. This also is only available on some keyboards.

NEXT[Main Menu] PREV[Other Searches]

M-R (replace-string)

This will prompt for two strings. The first string is replaced
with the second from the current position to the end. Both strings
may have defaults. If you want to replace a string with nothing,
and there is a default on the replacement string, striking ^K will
override the default and enter a blank string.

M-^R (query-replace-string)

Otherwise like replace-string, this command prompts at each
string. Typing 'Y' replaces the current string, 'N' skips the
current string, '!' replaces the current and all following strings
without asking, 'U' skips to the previous replacement and undoes
it, '^G' aborts the command, leaving the point at the current
word, '.' aborts and moves the point back to where the command
was originally given, '?' lists the available options.

NEXT[Main Menu] PREV[Main Menu]

Regions are used in MicroEMACS to specify what text is acted on by
many commands. A region is defined as all the text between the
point, and the last placed MARKed. To define a region:

1) Move the point to the beginning of the text you
want to effect

2) Use the M- (set-mark) command to position
the MARK at the current point

3) Move the point to the end of the text you want to effect

At this time, the text between the MARK and the POINT is the
current region which will be effected by many commands. Regions
can be defined backwards as well as forwards, and can include the
entire text, or as little as one character.

=>Cutting and Pasting
NEXT[Copying Text] PREV[Main Menu]

To move text from one place to another:

1) Move to the beginning of the text you want to move.

2) Set the mark here with the M- (set-mark) command.

3) Move the point to the end of the text.

4) Use the ^W (kill-region) command to delete the region you just
defined. The text will be saved in the "kill buffer".

5) Move the point to the place you want the text to appear.

6) Use the ^Y (yank) command to copy the text from the kill buffer
to the current point.

Repeat steps 5 and 6 to place more copies of the same text.

[PG DOWN] for more info

=>Copying Text
NEXT[Main Menu] PREV[Cutting and Pasting]

Copying text, without deleting the original is just like cutting
and pasting it, except that in place of the ^W (kill-region)
command, you use the M-W (copy-region) command which copies the
current region into the kill buffer without deleting it.

The kill buffer accumulates and text which is deleted by ^W, M-W
or a number of other delete commands. If more than one delete
command is used in a row, all the text from all the commands will
be in the kill buffer. Using any command between deletes causes
the kill buffer to discard earlier deletes and just hold the most
recent deletions.

Since there is only one kill buffer, you can switch between
windows, screens and files to copy text from one file to another.
There is no limit to the amount of text that can be stored in the
kill buffer except that of the memory of the computer running
MicroEMACS. Extremely large kills will take a few seconds.

NEXT[Buffer Commands] PREV[Main Menu]

A buffer is where MicroEMACS stores text. Normally that text is
read from a file, and is visible in a editing window. But text stored
in buffers can also be MicroEMACS macros, temporary storage for
macros, or lists of screens, files, buffers, variables, functions
or bindings created by MicroEMACS commands. Buffer commands include:


This prompt for a buffer name, and then makes that buffer the one
visible in the active window. If the buffer does not yet exist, it
will create it.


MicroEMACS attempts to discard the named buffer, reclaiming the
memory it occupied. It will not allow the destruction of a buffer
which is currently visible through any window on any screen.

[PG DOWN] for more buffer commands
=>Buffer Commands
NEXT[Memory Usage] PREV[Buffers]


This pops up a list of all the buffer names, the file the buffer was
read from, the size, and the active modes for each buffer. Using a
numeric argument (M-) with the command will list hidden buffers
used by MicroEMACS and its macros.

A '@' in column one shows that a file has already been read into a
buffer. A '*' in column two means that the buffer has been changed
since the last time it was written to disk. A '#' in column three
indicates the file was to large to read into memory and was truncated.


This command causes MicroEMACS to switch the active window to
display the next buffer in the buffer list. This can be used to
easily step through all the buffers.

[PG DOWN] for info on buffers memory usage
=>Memory Usage
NEXT[Main Menu] PREV[Buffer Commands]

The only limit to the number of buffers is the memory of your
computer. All the buffers, text, screens and windows use memory
for storage. On UNIX and other machines with virtual memory there
is no limit to the number and size of files you edit. Under MSDOS,
the AMIGA, the Atari ST, the HP150 and other microcomputers you
can estimate the memory used by adding up the size of all the
files you want to edit simultaneously, multiply by 1.4, and add
170K for the size of MicroEMACS. This results in the amount of
free memory needed to edit these files.

Under a MSDOS machine with 574K free from dos, you can edit files
totaling 288K in size.

NEXT[Window Commands] PREV[Main Menu]

MicroEMACS uses windows to display and allow you to edit the
contents of buffers. A single screen will show one or more
windows, separated by a modeline which describes the contents of
the window above it. Here are some window commands:


This command splits the current window into two windows. Both
windows view the current buffer at the current POINT.


These commands make the next window down, or the previous window
upward the current window. MicroEMACS highlights the mode line of
the currently active window, and places the machine's cursor at
the POINT.

[PG DOWN] for more window commands

=>Window Commands
NEXT[More Window Commands] PREV[Windows]


This command deletes all other windows but the active window.


This removes the active window from the screen, giving its space
to one of the adjacent windows. It does not discard or destroy any
text, just stops looking at that buffer. You can not delete the
last window on the screen.


These commands moves the windows view into it's buffer up or down
by one line. Preceding the command with M- will move the
window's view up or down by lines.

[PAGE DN] for even more window commands

=>More Window Commands
NEXT[Main Menu] PREV[Window Commands]

M- ^X-W(resize-window)

Type META, followed by a number, and then the resize-window
command, ^X-W. This attempts to change the length of the current
window (and it's mode line) to the number of lines you typed.
This may not always be possible depending on the size of the
other windows.

^X-^(grow-window)^X-^Z(shrink window)

These commands attempt to change the size of the active window by
one line.

NEXT[Screen Commands] PREV[Main Menu]

A Screen is a collection of windows and a command line which are
displayed together. On some non-graphically oriented systems, such
as UNIX, only one screen is displayed at one time. Under other
graphical oriented operating systems like WINDOWS 3, X-WINDOWS,
the Macintosh or the Amiga, each screen is displayed in an
operating system "window". Notice that the MicroEMACS usage of the
word window is different from the meaning used in these graphical

MicroEMACS termOS term


Each screen has its own set of windows and its own command line.
Switching from one screen to another will preserve the window
setup, the colors and the buffers being displayed.

[PG DOWN] for screen commands
=>Screen Commands
NEXT[More Screen Commands] PREV[Screens]

Under MSDOS, MicroEMACS uses a simple windowing system which
can display more than one screen at once. Look at the section
on using the mouse to learn how these screens can be manipulated.


This prompts you for a screen name. If it does not exist, it is
created. On text systems, this screen is displayed. On graphic
systems, the OS window containing this screen is brought to front.
Clicking on an existing window will also switch to that screen.


This command takes the rearmost screen, the last screen in
the screen list, and moves it to the front.

[PG DOWN] for more screen commands

=>More Screen Commands
NEXT[Main Menu] PREV[Screen Commands]


This command deletes any screen which is not the active screen.
Buffers being displayed on that screen are not discarded. On
graphic systems, the screen's OS window is closed. Clicking on
a close gadget will activate this command.


A pop up buffer containing a list of all current named screens
and the names of the buffers visible in the windows on that screen

[PG DOWN] to return to Main Menu

=>Getting at Files
NEXT[More File Commands] PREV[Main Menu]


This command causes MicroEMACS to prompt you for the name of a
file you want to edit. If that file is already somewhere in the
editor, it brings it up in the current window. If it is not, it
searches for it on disk. If it exists, it creates a new buffer
and reads the contents of the file into it. If it does not yet
exist, it simply creates a new buffer. In any case the buffer
is brought up in the current window. If you press a space or ESC
while typing in the filename, MicroEMACS will attempt to complete
the name for you.

^X-^S(save-file)[also F9 on some systems]

If the text in the current buffer has been changed since it has
been read, MicroEMACS will write the changed text back to the
disk file it came from.

[PG DOWN] for more file commands
=>More File Commands
NEXT[Yet More File Commands] PREV[Getting at Files]


Use this command to read a file into the current buffer, replacing
its original text with that from the file. MicroEMACS' concept of
the current file name will not change, so make sure that replacing
the text in the original file with that from the read one is what
you are intending when you use this command.


This writes the text in the current buffer to a file with a name
different from what MicroEMACS thought it was originally. This
does change MicroEMACS concept of the current buffer's file name.


This special exit command leaves MicroEMACS, but only after
writing out all changed buffers.
[PG DOWN] for yet more
=>Yet More File Commands
NEXT[Main Menu] PREV[More File Commands]


This will ask you for the name of a file to insert into the
current buffer, at the point.


Similar to write-file, this command writes out the current buffer
to the named file. But rather than replacing its contents, it
appends it to the end of the existing text in the file. This does
not change the filename of the current buffer. This is handy for
building log files.


This command lets you directly change the filename associated
with the current buffer.
[PG DOWN] to return to main menu

=>Issuing Commands
NEXT[Numeric Arguments] PREV[Main Menu]

Commands within MicroEMACS have descriptive names which you can
use to invoke them, or bind them to a keystroke. To execute one
of these commands, use the execute-named-command (M-X) command.
A colon (:) will appear on the command line. Type in the name of
the command and strike . The command will execute. If you
type a or the META key while typing, MicroEMACS will
attempt to complete the name for you.

To get a list of ALL the commands in your current MicroEMACS, type:

M-X describe-bindings

This will display a paged list of all legal commands and the
keystrokes to use to invoke them.

[PG DOWN] for more info on commands

=>Numeric Arguments
NEXT[Command Lines] PREV[Issuing Commands]

Some commands take a number as an argument. For example, to move
to a particular line within a file, you use the goto-line (M-G)
command. To go to a particular line, precede the command with
a number by striking the META key, typing a number, and then
the keys bound to the command. To go to the 123rd line of a file:


If a command does not need a numeric argument, it is taken as
a repeat count. This also works when typing any character!
To make a line of 50 dashes type:



[PG DOWN] for more info on using commands

=>Command Lines
NEXT[Macros] PREV[Numeric Arguments]

Execute-command-line (M-^X) lets you type in a MicroEMACS
command line. MicroEMACS macros are made from sequences of
these command lines. A command line has three parts:

To insert the string <*><*><*> at the point, type M-^X and then:

3 insert-string "<*>"

or to set the current fill column to 64, type M-^X and then:

64 set-fill-column

[PG DOWN] to learn more about using macros

=>Customizing Command Keys
NEXT[Unbinding Keys] PREV[Main Menu]

MicroEMACS lets you decide what keys activate what command!


prompts you for a command name, and a keystroke to bind to that
command. A keystroke can be bound only to one command at a time,
so when you bind it, its old definition is forgotten. This command
can be used to permanently change your key bindings by placing it
at the end of your emacs.rc (.emacsrc under UNIX) file. For example,
if you have one of those nasty keyboards with a tilde (~) in the
upper left corner, where ESC should be, and you want the tilde
to become the META key, add this line to the end of emacs.rc:

bind-to-key meta-prefix ~

You can use this command to make MicroEMACS feel similar to any
other editor by changing what keys activate which commands.

[PG DOWN] for more binding commands
=>Unbinding Keys
NEXT[Main Menu] PREV[Customizing Command Keys]


This prompts you for a key, and then disconnects if from
executing any command. Useful if you have a function key you
keep tripping over, or if you are trying to make MicroEMACS look
like a much more minimalistic editor.


Executed with the M-X command, this command pops up a list of
all MicroEMACS commands, each with all the keys which are currently
bound to it.

[PG DOWN] to return to Main Menu

=>Advanced Text Editing
NEXT[Main Menu] PREV[Main Menu]

Learn About

< >Paragraphs

< >Words

< >Case Control

< >Controlling Tabs

< >Repetitive Tasks

< >Narrowing Your Scope

< >Creating New Commands

[PG UP] to return to Main Menu

=>The Outside World
NEXT[More External Commands] PREV[Main Menu]

These commands let you interact with the Operating System


Most important of commands, you use this the exit MicroEMACS.
If you have any buffers with text that has been changed, you
will be asked if you are sure you want to leave.


Call up the operating system shell to execute a line which
MicroEMACS will prompt you for. If this is used interactively,
the editor will politely wait for you to press a key on the way
back in so you can view the results of your command.

[PG DOWN] for more external commands

=>More External Commands
NEXT[Main Menu] PREV[The Outside World]


This attempts to call up an external program directly, not through an
intervening shell. Without the shell, the call is faster and uses less
memory, but it can not be used to execute internal shell commands. (You
can not use it for the "DIR" command under MSDOS!)

^[email protected](pipe-command)

This command uses the shell to execute a program, but rather than
displaying what the program prints, it attempts to place it in a
buffer to let you edit or save it.


The contents of the current window are fed to a filter program
(like SORT) and the results replace the original.

[PG DOWN] to return to the main menu
NEXT[More Paragraph Commands] PREV[Advanced Text Editing]

MicroEMACS defines a paragraph as any lines of text surrounded
by blank lines. A line starting with a tab or one of the characters
in the $fmtlead variable is considered the first line of a paragraph.

If you are editing text destined for use by a text formatter, set
$fmtlead to the command character for that formatter. That will
prevent MicroEMACS from formatting what should be lines of commands
meant for the formatter. If, for example, you are editing SCRIBE
source, use the ^X-A (set) command to set $fmtlead to "@".

Commands that manipulate paragraphs include:


This command moves the point just past the last character of the
current paragraph. If already at the end, it will move to the end
of the next paragraph.

[PG DOWN] for more paragraph commands
=>More Paragraph Commands
NEXT[Advanced Text Editing] PREV[Paragraphs]


The point is moved to the first character of the current paragraph.
If already at the beginning, it will move back to the previous one.


This deletes the current paragraph, leaving a copy in the kill


This all important commands re-formats the current paragraph,
causing all of its text to be filled out to the current fill column
(Which is 72 by default and is set with $fillcol).

[PG DOWN] to return to the Advanced Editing Menu

NEXT[More Word Commands] PREV[Advanced Text Editing]

Words are defined, by default, as a string of characters consisting
of alphabetics, numbers and the underscore(_) character. You can
change this be setting the $wchars variable to a list of all the
characters you want considered as part of a word.

Commands to manipulate words include:

M-F(next-word)[ -> on PC keyboards]

This positions the point at the beginning of the next word.

M-B(previous-word)[ <- on PC keyboards]

This positions the point at the beginning of the previous word.

[PG DOWN] for more word commands]

=>More Word Commands
NEXT[Advanced Text Editing] PREV[Words]


Delete from the current position to the beginning of the next word.


Dete the word before the point.


Show the number of words in the current region, along with the
number of characters, lines and the average number of characters
per word.

[PG DOWN] to return to Advanced Editing Menu

=>Case Control
NEXT[Advanced Text Editing] PREV[Advanced Text Editing]


These three commands let you change the case of the word at or
following the point.


Setting a mark (with M-), moving to the other end of a region
and using one of these commands will change the case of all the words
in the selected region.

[PG DOWN] to return to Advanced Editing Menu

=>Narrowing Your Scope
NEXT[Advanced Text Editing] PREV[Advanced Text Editing]

Many times you will want to do something to a part of the text
when the command works on all the text. Also it is helpful to
see or edit just a portion of the text.


All the text in current buffer disappears except what is in the
currently defined region. The modeline displays "<>" to indicate
the current window looks into a narrowed buffer.


All the invisible text is restored.

[PG DOWN] to return to Advanced Editing Menu

=>Repetitive Tasks
NEXT[More Keyboard Macros] PREV[Advanced Text Editing]

Computers excel at performing the same task multiple times. You
should never have to perform the same edit more than once. These
commands show how:


This commands tells MicroEMACS to begin memorizing any keystrokes,
commands or mouse clicks.


MicroEMACS stops recording when this command is given.


This command replays everything recorded last.

[PG DOWN] to learn more about keyboard macros

=>More Keyboard Macros
NEXT[Advanced Text Editing] PREV[Repetitive Tasks]

To perform any repetitive task, where you have a list of things
that need to be changed, one per line, follow these steps:

1) Position the point to the beginning of the line to change

2) Strike ^X-( to start recording

3) make the change, staying on that line

4) move to the beginning of the next line

5) Strike ^X-) to stop recording

Now hit ^X-E once to test your change on the next line. Did it
work? If so count how many lines need to yet be changed, strike
the META key followed by that number and ^X-E. Voila! Your change
has been made on all the lines.

[PG DOWN] to return to Advanced Editing Menu
< >

 December 15, 2017  Add comments

Leave a Reply