home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 5 Edit
/
05-Edit.zip
/
me34exe.zip
/
doc
/
me3.doc
next >
Wrap
Text File
|
1995-01-14
|
55KB
|
1,212 lines
========================================================================
== ME3 Documentation Craig Durland 8/88 10/91 1/93 5/93 ==
========================================================================
ME3 is a small, portable, extensible [GNU] Emacs' like editor. This
document describes how individual commands work - it is light on general
usage. If you need to learn Emacs, look at the GNU, Goslings or
Unipress Emacs manuals.
Copyright 1991 Craig Durland
Distributed under the terms of the GNU General Public License.
Distributed "as is", without warranties of any kind, but comments,
suggestions and bug reports are welcome.
========================================================================
== Soft keys and Function keys ==
========================================================================
When describing characters or keys, the character itself is used if it
is printable. Unprintable characters are made printable using 3 or more
printable characters. For example, the letter "A" is printable but
control-A is not and so the code "C-a" is used to describe it. The
table below shows the various codes needed to map the unprintable keys.
Prefix Meaning
------ -------
C- Control key.
F- Function or soft key such as f1, Home, etc.
M- Meta key. See META in the GLOSSARY.
S- Shift. This only applies to function keys.
This is a list of "extended" keys - those not covered by ASCII. ME
maps these keys to 3 or more ASCII codes. Ignore the ME key column
unless you are binding keys. The keyboard column is the key on the
keyboard you press to generate the ME key which (unless rebound) fires
off the function listed in the Bound to column.
Keyboard ME key Bound to
-------- -- --- ----- --
F1 F-1
F2 F-2
F3 F-3
F4 F-4
F5 F-5
F6 F-6
F7 F-7
F8 F-8
F9 F-9
F10 F-0
F11 F-a
F12 F-b
F13 F-c
F14 F-d
F15 F-e
F16 F-f
home F-A (beginning-of-buffer)
end F-B (end-of-buffer)
up arrow F-C (previous-line)
down arrow F-D (next-line)
right arrow F-E (next-character)
left arrow F-F (previous-character)
insert F-G
delete F-H (delete-character)
page up F-I (previous-page)
page down F-J (next-page)
clear line F-K (cut-line)
delete line F-L
insert line F-M
select F-N (set-mark)
roll up F-O (scroll-down)
roll down F-P (scroll-up)
DEL C-? (delete-character) (This is the DELete key)
ESC C-[
shift tab M-I
ALT 0..9A..Z! mapped to META 0..9A..Z!
Use the ALT key like the control key (ie hold it down while you press the
next key).
For the MS-DOS and OS/2 versions of ME, the number pad keys (on the 101
extended keyboard) are distinguished from the grey keys (the ones
between the QWERTY keys and the number pad):
Keyboard ME key Bound to
-------- -- --- ----- --
NumPad home F-{ mark-and-home
NumPad end F-} mark-and-end
NumPad up arrow F-^ previous-line
NumPad down arrow F-. next-line
NumPad right arrow F-> next-character
NumPad left arrow F-< previous-character
NumPad insert F-& toggle-overstrike
NumPad delete F-# delete-character
NumPad page up F-[ next-page
NumPad page down F-] previous-page
NumPad - F--
NumPad + F-+
NumPad Enter F-$
NumPad / F-/
NumPad * F-*
========================================================================
== GLOSSARY ==
========================================================================
C-[ See META
args
Parameters or arguments that will be requested by the command. If
[] surround the arg, then it will only be requested in certain cases.
binding See bound.
bound
A key is attached or bound to a command or program.
If the key is pressed, whatever it is bound to is invoked.
Keys can be bound locally or globally. If a key has a local binding,
pressing the key in the buffer it was bound in causes action. A
global binding covers all buffers. Note that local bindings take
precedence over global ones.
buffer
A buffer is an internal workspace where changes are made to text. If
a buffer is visible, it is shown through one or more windows. It is
usually attached to a file (ie contains the contents of the file).
If the buffer was created by reading in a file, the buffer name is
created by removing the path from the file name (and leaving only
the name and extension).
clear
A operation where something is covered over by something else. Also
reset.
For example:
If text is cleared, it is covered by blanks.
If a mark is cleared, it is reset to an initial state (pointing to
nothing).
See also: cut, delete.
command or cmd
A ME built in command such as (read-file).
These can be bound to a key to make executing them easier.
Documented under COMMANDS (in me3.doc, this file). These are
different from functions in that they can be bound to keys or
executed by (ME-command).
Command completion
ME will attempt to complete a command if the space bar is pressed and
completion is on. The only time you can use command completion is
when you are being queried in the minibuffer. For example, when ME
is requesting a buffer name for (use-existing-buffer) and foobar is
a buffer, typing "foo" and hitting space will fill in the rest of
the name. ME also trys to fix typos. If you had typed "fooie" and
hit the space bar, you still get "foobar". Sometimes, you will hit
space and only part of the command name will appear. This is ME's
way of telling you there is some ambiguity as to the full name.
Type some more of the name and hit space again or press ? to get a
list of possible names.
See also: complete in me3mutt.doc.
cut
A operation where something is saved and then removed.
For example: If text is cut, it is saved in the cut buffer and then
deleted. You can retrieve it later from the cut buffer.
See also: cut buffer, delete, clear.
Cut buffer
An invisible buffer that holds things created by deletion commands
such as (cut-region) and (copy-region). Used to cut and paste, or
just cut, text.
If you want to move a block of text about: 1. set the mark at one
end and then move the dot to the other end. 2. cut the region. 3.
move the dot to the start of where you want the text to begin and 4.
yank the cut buffer. Bingo.
Copy and cut append to the cut buffer if last command was also a cut
or copy, otherwise the cut buffer is cleared before the new text is
entered.
The cut buffer is also used by (filter).
Other Emacs' refer to this as the kill buffer.
delete
A operation where something is removed and NOT saved.
For example: If text is deleted, it is gone and can't be recovered
(unless undo can get it back).
See also: cut, clear.
dot
The place between two characters. It is immediately to the left of
the cursor. Also known as point. One per window or buffer.
ESCAPE
See also META.
The escape key (usually marked ESC on keyboards) acts like the META key
for those keyboards that don't have a META key.
file
For MS-DOS, you can use forward slashes "/" as part of the path name.
function or fcn
The commands that comprise the Mutt programming language. Documented
in mutt2.doc and me3mutt.doc. These differ from commands in that
they cannot be bound to keys and cannot be executed by (ME-command).
help
Help is pretty much limited to reading manuals or asking gurus.
Limited forms of online help are command completion (see above),
typing a ? when being asked a question (see "If you are being
asked a question" below), command completion, and the (help)
command. Typing M-x help will get you started with the help system.
keys
Keys are used to enter text and invoke commands. The keys used to
invoke can be one or two keys where each key can have one or more
modifiers.
modifier meaning notes
M- META See META and ESCAPE. Cannot be prefixed.
C- CONTROL
S- SHIFT Only used with nonASCII keys
F- FUNCTION NonASCII keys
See also: prefix-key in me3mutt.doc
macro
A sequence of keystrokes that can be replayed on command. Used when
you don't want to spend the time writing a program. Created by
going through the motions (which are actually done so you can verify
that what you want to happen is actually happening) (see
(start-macro) and (end-macro)). When replayed by (execute-macro),
the exact sequence you typed in is replayed.
(mark)
A user settable dot.
A mark is remembered for the life of the buffer and stays where you
set it until you or ME moves it. (exchange-dot-and-mark) will get
you to the mark from anywhere in the buffer.
If the dot is at a mark and you do something (like insert text, yank
text, etc), it is done between the dot and mark, that is, the mark
is before the change and the dot after.
Advanced note: The marks are associated with a buffer NOT with the
windows attached to the buffer. Thus all windows attached to a
buffer have the same marks.
ME
ME3
The Mutt Editor. An editor that is extensible using the Mutt
programming language. ME3 is the follow on to ME2, the follow on to
ME.
message line or
minibuffer
The bottom line of the screen. This is the place where all questions
are asked, error messages sent, etc.
META key
This is a modifier key that works like the control key. Your keyboard
may or may not have one. On IBM PCs, this is the ALT key. To use,
hold down the META key and press the key you want to modify. If
your keyboard does not have a META key, use ESCAPE instead - press
the ESCAPE key, let it up and then press the key you want to modify.
In the ME documents, the META key will be referred to by M-x where x is
the key being modified.
(modeline)
Mode lines seprate windows and provide information about the buffer in
the window.
** ME3 -- buffer_name 8:45am -- (mode) [Ovwrt] File:file_name ----------
The ** is present if the buffer has been modified. It is %% if the
buffer is read only, " " if we don't care about the status of the
buffer and "--" if the buffer has not been modified.
The time is present if (display-time) has been called.
(mode) provides information about the mode the buffer is in. For
example, (C) for c mode.
The words in the brackets can be Ovwrt if the buffer is Overstriking
or McDef is a keyboard macro is being recorded.
file_name is present only if a file is associated with the buffer.
Mutt
The built in programming language. Refer to the Mutt documentation in
mutt2.doc and me3mutt.doc.
n nth
Argument prefix (set by (universal-argument)). This means repeat the
key (or what its bound to) or command n times. If
(universal-argument) is not used then n defaults to 1.
pgm See program.
point See dot.
program
A program created by (defun).
These are created by the user to make its editing easier.
See mutt2.doc and me3mutt.doc.
(rectangle)
The rectangler region between two marks. One mark is at the upper
left corner of the region and the other mark is at the lower right
corner. The width is measured in characters and the height in lines.
(region)
The area between two marks (usually the dot and the mark).
(register)
A storage area that can hold text, rectangles or postions. See the
various register commands for more info. Each register has a single
character name: a character in the range "0" to "9" and "a" to "z".
The contents of a register doesn't change until something is stored
there (which overwrites the old contents).
syntax tables are used to determine word boundaries, etc. All commands
work with words use these tables (eg (next-word). Use
(modify-syntax-entry) to change what it means to be a word.
sysvar or system variable
These are a collection of user changeable variables that effect the way
ME does certain things.
Documented in me3mutt.doc.
window
A portion of the screen. A window provides a view of a buffer. There
can be more than one window showing a buffer. Windows are separated
from each by a mode line.
word
A string of letters, digits, "$", "'" or "_". By modifying the syntax
tables, you can change the definition of a word.
See syntax tables, (modify-syntax-entry).
Word wrap
When you are typing at the end of a line and cross the fill column the
last "word" is wrapped to the next line. If you have some left
margin you wish to preserve, bind CR to newline-and-indent
(bind-to-key "newline-and-indent" "C-m").
Setting the system var word-wrap to 0 turns it off, setting it to n
causes wrapping to occur at column n.
========================================================================
== If you are being asked a question ==
========================================================================
"Special" keys:
C-h or Backspace Delete character left of the cursor.
C-g Terminate the command.
C-j Same as C-m.
C-l Redraw the screen. Handy if you messed it up with help and want
to see the original contents.
C-m or return (enter) End the question and return your answer.
C-q Quote the next character. C-qC-j is the code for the end of a
line - if you search for "C-qC-jstart of line" you will find
"start of line" if it is the first thing on a line.
C-^ Quote next key (same as C-q)
? Show choices (if available). This shows the possible responses
for this command. This is available whenever command
completion is.
Space Command completion (if available for this command). You can
customize this key. See complete-key in me3mutt.doc.
C-f Next character
C-b Previous character
C-a Beginning of line
C-e End of line
C-u Delete everything and start over.
C-d Delete character
C-k Delete to end of line
M-f Next word
M-b Previous word
C-p Previous history
C-n Next history
C-r Search back though history
M-> Youngest history entry
M-< Oldest history entry
If you answer the question by hitting <return or enter> and the line is
empty, you have entered the null line zone. This can be interpreted as:
1. An empty line. It will then be ignored or complained about or
stop the command.
2. A C-m. (bind-to-key) does this.
3. A request to use the default. This is usually the current
thing being manipulated (where thing is buffer, file, etc).
eg (write-file) defaults to current file name and
(delete-buffer) defaults to current buffer name.
========================================================================
== NOTES ==
========================================================================
In this document, you will see command names surrounded by parens (eg
(beginning-of-line)). If the command is bound, you can execute the
command by pressing the keys it is bound to. For example,
(beginning-of-line) is bound to C-a, so holding down the control key
and pressing A will move the cursor the the beginning of the line. If
the command is not bound (or you don't remember or want to use the
binding), you can also execute the command by using (ME-command).
========================================================================
== Command Line Options ==
========================================================================
ME supports several command line options. They are processed in the
order they appear on the command line. The list of options is
extendible - see cmdline.mut.
Here are the default options:
"file" Visit file using visit-file.
"-all" Process all the remaining command line options.
Normally, processing stops after the first file is read
(the "file" option) (actually, the option processing
stops just before the next file is visited). Some times
you want to read a bunch of files all at once, use -all.
See also next-file.
"+n file" Visit file (using visit-file) and then goto line n.
"-i file"
"-insert file"
Insert file (using insert-file) in the current buffer at
the dot.
"-l file"
"-load file"
Load a file of Mutt code (file.mco) using load.
"-f program"
"-funcall program"
Run the Mutt named program (same as (ME-command program)).
Examples:
me3 foo -f show-buffer-stats
This will read in foo and display some stats in the minibuffer.
me3 +5 mail
This will visit mail and put the cursor on line 5.
me3 -l ganoi
Run the towers of hanoi first thing.
me3 +5 mail -f set-the-mark -f end-of-buffer -f cut-region -i reply
This visits the file mail, removes all text after line 5 and inserts
the file reply there.
========================================================================
== COMMANDS ==
========================================================================
COMMAND name, default binding, args and comments
These all return a BOOLEAN (the ones written in Mutt might not).
Note: All of commands listed are actually written in Mutt. Some are
built-in (to ME) and others must be loaded. The ones that must be
loaded are marked with a "*". In all cases, the Mutt file that they
are defined in is listed after the command. If you are using the
standard distribution of ME, the commands that need to be loaded will
be when you run the command.
(abort) C-g basic.mut
Back out of anything.
If remembering a macro, forget it.
If executing a program, stop it.
This only works when ME is waiting for a key press (ie it won't halt
programs in a infinite loop or runaway programs that aren't looking
at the keyboard).
(apropos) M-? args: keyword basic.mut
List all commands and programs that have a keyword in them. For
example, if you apropos commands with "mark" in them you might get
something like:
PROGRAMS:
mark-and-end F-B
mark-and-home F-A
COMMANDS:
exchange-dot-and-mark C-xC-x
set-mark C-@ M- F-N
On the left is the command name. On the right are the key(s) bound
to the command. So, in this case, (set-the-mark) is bound to
control-@, meta-space and softkey-N.
Command completion is on.
See also: (describe-bindings).
(beginning-of-buffer) M-< basic.mut
Move the dot to the first character of the buffer.
See also: (end-of-buffer).
(beginning-of-line) C-a basic.mut
Move the dot to the first character of the line.
See also: (end-of-line).
(bind-local-key) Not Bound basic.mut
Args: command name, keystroke(s)
Same as (bind-to-key) but the binding is in effect only in the buffer it
was bound in.
Note that local bindings take precedence over global ones.
See: (bind-to-key)
(bind-to-key) Not Bound basic.mut
Args: command name, keystroke(s)
Attach a key to a command or program. When ever the key is pressed,
the command or program will be executed (except when a question is
being asked).
Possible keys are single key strokes and combo keystrokes.
Combo keys are prefixed keys, softkeys or modified keys.
When asked for the key just press the key(s). You might have to use
C-q to quote the keys, in that case it often easier to just type
"C-a" if you mean control a.
If programming, use the keycode. Keycodes are ASCII (ie no control
characters and such) representations of a key. For example, META-D
is represented by the 3 characters M-d, control-C by C-c and
function key 1 (aka soft key 1) by F-1. Keycodes should be used
when programming to avoid screwing up things like printers (when you
print out the file). eg (bind-to-key "foo" "F-1").
To unbind a key, bind it to "". (bind-to-key "" "F-1") will remove
anything bound to F-1 and make F-1 self insert.
Command completion is on.
See also: (bind-local-key), (defun), keys (in the glossary above).
(bug-report) Not Bound basic.mut
If you find a bug and would like report it or send comments about ME,
you can use this command.
(calculator)* Not Bound calc.mut
A simple programmers calculator for those times when you don't want to
use the one sitting next to the keyboard. Supports arithmetic in
many different bases. For more info, run calculator and press "?".
(capitalize-word) M-c case.mut
Capitalize word after dot.
If dot is between words, searches forward to the start of the next word
and capitalizes that one.
If the dot is in the middle of a word, the letter after the dot is
capitalized.
See also: (modify-syntax-entry), (upcase-region), (downcase-region),
(capitalize-region).
(capitalize-region) Not Bound case.mut
Capitalize all words in a region.
If dot is between words, searches forward to the start of the next word
and capitalizes that one.
If the dot is in the middle of a word, the letter after the dot is
capitalized.
See also: (modify-syntax-entry), (upcase-region), (downcase-region),
(capitalize-word).
(center-cursor) F-G (Insert key) me3.mut
The same things as C-uC-l - puts the cursor in the center of the
window.
(center-screen-around-cursor-horizontally) Not bound window.mut
(clear-rectangle) Not Bound me3.mut
Set the rectangle to blanks.
See also: (copy-rectangle), (cut-rectangle), (delete-rectangle).
(compile)* Not bound compile.mut
Run make (or a command of your choice (such as cc)), collect output in
a buffer and while the compile is running, optionally visit the
files that have errors.
See documentation in package.doc under "External Processes".
Notes:
Only works on machines running unix and the compute server.
Modeled after compile in GNU Emacs.
To run the compute server, use "comserver $HOME/.ME2.socket". Since
the compute server is quite verbose, you will want to run it in
its own window. If that is not possible (or desirable), use this
command:
comserver $HOME/.ME2.socket >/dev/null 2>/dev/null &
(copy-region) M-w basic.mut
Copy a region to the cut buffer. If the last command was a cut
command, append to the cut buffer. The region is unaffected.
Returns TRUE if region copied, FALSE if no region.
See also: (cut-region), (yank).
(copy-rectangle) Not Bound me3.mut
Copy a rectangle to the cut buffer.
See also: (cut-rectangle), (delete-rectangle), (clear-rectangle),
(copy-region-to-rectangle).
(copy-region-to-rectangle) C-xr register.mut
Copy a rectangle (marked by the dot and mark) to a register. With an
argument, the rectangle is deleted. The command querys you for the
register (a single character in the range 0-9 a-z).
See also: (insert-register), (copy-to-register), (copy-rectangle).
(copy-to-register) C-xx register.mut
Copy the region to a register. With an argument, the region is
deleted. The command querys you for the register (a single
character in the range 0-9 a-z).
See also: (insert-register), (copy-region-to-rectangle).
(cut-the-line) F-5 me3.mut
Delete the entire line the cursor is on.
(cut-line) C-k or F-K (clear line) basic.mut
Delete text from dot to the end of the line.
If an argument is given:
If n = 0: Cut from beginning of line to dot.
If n > 0: Cut forward over n newlines.
If n < 0: Cut backward over n newlines.
The deleted text is put into the cut buffer or appended to the cut
buffer if the last command was also a cut command.
Other Emacs' call this kill-line.
See also: (cut-word), (cut-previous-word), (cut-region),
(yank).
(cut-previous-word) M-C-h (M-backspace) basic.mut
Delete the previous word. Save them in the cut buffer.
See also: (modify-syntax-entry).
(cut-rectangle) Not Bound me3.mut
Copy a rectangle and delete a rectangle to the cut buffer.
In GNU Emacs, this is called kill-rectangle.
See also: (copy-rectangle), (delete-rectangle), (clear-rectangle).
(cut-region) C-w basic.mut
Delete a region and save it in the cut buffer. If the last command was
a cut command, append to the cut buffer.
See also: (copy-region), (cut-line),
(yank).
Other Emacs' call this kill-region.
(cut-word) M-d or M-C-? (M-DEL) basic.mut
Delete a word. Save them in the cut buffer.
See also: (modify-syntax-entry).
(dabbrev-expand) M-/ Autoloaded dabbrev.mut
Takes the word the cursor is on and looks around in the buffer for
another word that starts with the same characters. When one is
found, it is used to replace the word at the cursor. Pressing M-/
again looks for a different word.
(delete-buffer) C-xk delbuf.mut
Remove a buffer. It disappears into ness-ness land. If the buffer
has been modified, ask before deleting. If the buffer is on the
screen, replace it with the (next-buffer). If it is the only
buffer, replace it with "*scratch*". If n, remove the window it was
displayed in.
Defaults to the current buffer.
Buffer name completion is on.
See also: (delete-current-window).
(delete-character) C-d, C-? (DEL) or F-H (delete) basic.mut
Delete the character after the dot (visually under the cursor). If at
the end of the line, the next line is joined to the current line. If
given an argument, deleted characters are put into the cut buffer.
(delete-current-window) C-x0 window.mut
Delete the current window.
(delete-horizontal-space) Not bound wspace.mut
Remove all whitespace surrounding the cursor.
See also: delete-whitespace.
(delete-other-windows) C-x1 window.mut
Make the current window the only window on the screen.
See also: (split-window-vertically).
(delete-previous-character) C-h (backspace) basic.mut
Delete the character before the dot (visually to the left of the
cursor). If at the beginning of the line, the current line is
joined to the end of the previous line. If given an argument,
deleted characters are put into the cut buffer.
(delete-rectangle) Not Bound me3.mut
Delete the rectangle.
See also: (copy-rectangle), (cut-rectangle), (clear-rectangle).
(delete-whitespace) F-1 wspace.mut
Remove all the whitespace to the right of (and including) the cursor.
See also: delete-horizontal-space.
(describe-bindings) Not bound basic.mut
List all commands and programs along with their key bindings in the
same format as (apropos).
See also: (apropos).
(describe-key) Not Bound me3.mut
Tells you what a key is bound to.
(display-time) Not Bound mltime.mut
Display the current time in the modeline. The time is updated every
minute (ME is idle). This command toggles - if the time is being
displayed, (display-time) turns it off.
Notes:
Time is only updated while ME is idle. While running a program or
waiting for input (in the minibuffer), the time is not updated.
display-time returns TRUE if the time was turned on, FALSE if turned
off.
(downcase-region) C-xC-l case.mut
Convert a region to lower case.
See also: (upcase-region), (downcase-word), (upcase-word).
(downcase-word) M-l case.mut
Convert word to lower case.
See (capitalize-word) for edge conditions.
See also: (modify-syntax-entry), (upcase-word), (downcase-region),
(upcase-region).
(end-macro) C-x) basic.mut
Stop remembering keystrokes. The keystrokes are stored in the macro
buffer ready to be replayed by (execute-macro).
See also: (execute-macro), (start-macro).
(end-of-buffer) M-> basic.mut
Move the dot to the bottom of the buffer.
See also: (beginning-of-buffer).
(end-of-line) C-e basic.mut
Move the dot to the end of the line.
See also: (beginning-of-line).
(exchange-dot-and-mark) C-xC-x basic.mut
Move the dot to the mark and set the mark to old dot value. Visually,
move to where the mark was set. Repeating this command will undo it.
See also: (set-the-mark).
(execute-macro) C-xe basic.mut
Replay the keystrokes saved in the macro buffer.
See also: (start-macro), (end-macro).
(exit) C-c C-xC-c args: [yes or no] basic.mut
Exit ME. If there is a modified buffer (one that has changed since it
was last saved), you are asked about it.
If n, quit no matter what and without making any noise.
(filter) Not bound filter.mut
Take a region and feed it to a filter as standard input.
Take the output of the filter and use it to replace the region.
For example: If the region is a list of words and sort is a program
that sorts text then (filter "sort") will replace the region with a
sorted copy.
If you don't want to remove anything, use universal argument (C-u) or
make a null region (set the mark at the dot). eg C-u (filter "ls")
will insert a directory listing at the dot.
The region is saved in the cut buffer.
See OS-filter (in me3mutt.doc) for info on environment variables.
(findit)* Not bound findit.mut
Search or search and replace across many files.
See documentation in package.doc under "findit".
See also: grep.
(forward-re-search) M-C-s search.mut
Same as (forward-search) but using regular expressions.
See regexp.doc for regular expression syntax.
See also: (query-replace), (forward-search), (reverse-re-search).
in me3mutt.doc: case-fold-search, get-matched, looking-at
(forward-search) Not Bound search.mut
Search for a string.
CR ends patterns, LF (^J) => end of line.
The pattern is saved across searches.
(forward-search) The dot is after the last character matched.
(reverse-search) The dot is before the last character matched, or put
another way, to the left of the first character of the search string.
Examples:
To search for "foobar", type: foobar<Enter>
To search for "foobar"<end of line>, type: foobar^Q^J<Enter>
To search for <start of line>"foobar", type: ^Q^Jfoobar<Enter>
Note that, in this case, the very first line will not match (this
is because the first line has no preceding line and therefore no
end of line marker before it).
See also: (reverse-search), (forward-re-search), (isearch),
(query-replace), (re-query-replace), case-fold-search (in me3mutt.doc)
(get-sysvar) Not Bound sysvar.mut
Display the value of a ME3 system variable.
See me3mutt.doc for a list and what they do.
Command completion is on.
See also: (set-sysvar), (sysvars).
(Goto-line) M-g me3.mut
Move the dot to the beginning of the nth line in the current buffer.
First line of the buffer is 1. If n is negative, got the nth line
from the end of the buffer.
Returns FALSE is try to move off either end of the buffer. In that
case the dot is left at the buffer edge it tried to move across (at
the start of the line).
Notes:
Line 0 does not really exist so (goto-line 0) returns FALSE. If you
ignore the error, (goto-line 0) is the same as (goto-line 1).
See also: goto-line (in me3mutt.doc).
(grep)* Not bound compile.mut
Run grep, collect output in a buffer and while the grep is running,
visit all the files grep finds matches in.
See documentation in package.doc under "compile".
Notes:
Only works on machines running unix and the compute server.
Modeled after grep in GNU Emacs.
See also: findit.
(grow-window) C-x^ window.mut
Enlarge the current window by a line. To grow the window by n lines,
use C-u n C-x^. If n is negative, the window will shrink.
See also: (shrink-window).
(hanoi)* Not bound ganoi.mut
A towers of hanoi solver that shows the disks moving around.
To load it: M-x load <Enter> ganoi <Enter>
See also: (Queens).
(help) Not bound help.mut
This is front end to the web hyper text document browser (see web.mut
in package.doc). It pops up a menu so you can pick a topic to
browse.
(indent-rigidly) C-xC-i indent.mut
Shift a block left or right.
A block is all the lines of text between the dot and mark inclusive.
With no arg: asks for the amount to shift the region. Positive
for right shift, negative for left shift.
With arg (ie C-u): shifts the region by the difference between the dot
and the first nonblank character on that line.
eg use this to shift the top line of the region over to the cursor.
Removes white space from blank lines.
When doing a negative shift, text won't be shifted left of the left
margin.
(insert-file) C-xi args: file name basic.mut
Insert a file into the buffer at the dot. The file is unaffected.
Command completion is on.
The mark is left after the inserted text.
See also: (read-file), (visit-file), (write-file), file-to-buffer
(me3mutt.doc).
(insert-file-name) Not bound me3.mut
Use command completion to get a file name and insert the name at the
dot.
(insert-register) C-xg register.mut
Insert the contents of a register at the dot. If the register
contains a rectangle, a rectangle is inserted. The command querys
you for the register (a single character in the range 0-9 a-z).
For text, the dot is left after the inserted text and the mark is
before. With an argument, the dot is left before and the mark after.
See also: (copy-to-register), (copy-region-to-rectangle).
(isearch-forward) C-s or C-\ isearch.mut
Search as you type - shows you where the string you have typed so far
would be found.
Keys:
C-h (Backspace): Remove the last character from the search pattern.
Don't move.
C-s: Search forward for existing pattern. If haven't entered a
pattern, the old pattern is used.
C-\: Same as C-s.
C-r: Search reverse for pattern.
C-q: Quote the next character into the search pattern. Useful for
searching for control characters (like tab).
C-w: Add the rest of the word to the search pattern.
C-g: Exit search.
C-m (Enter): Drop to non incremental search if haven't done anything
yet.
Control characters and combo keys (eg cursor motion, C-x=, etc)
terminate the search. The key is then executed. For example,
searching for text and then pressing C-p will cause the cursor to
move to the line above the matched text.
If you want to call isearch from a Mutt program, prime and start
searching, just pass in a search string. eg (isearch TRUE "foobar")
will start a incremental search at the point and search for foobar.
Use FALSE to search backwards.
See also: (isearch-reverse), (forward-search).
(isearch-reverse) C-r isearch.mut
See (isearch-forward) for info.
(list-buffers) C-xC-b bstats.mut
List all the buffers currently in ME along with some info about them.
With arg, run buffer-menu.
For example:
Flags Size Buffer File
----- ---- ------ ----
.--- 81 *Help*
-u-- 2732 bstats.mut /users/craig/tools/me3/mutt/bstats.mut
Mu-- 37434 me3.doc /users/craig/tools/me3/doc/me2.doc
40527 bytes (943 lines) in 3 buffers.
Here is what the flags (MuhH) mean:
M : M if the buffer has been modified and we care.
u : u if undo is turned on.
H : if the buffer is "hard" hidden.
h : if the buffer is "soft" hidden.
If any of the flags is off, a "-" is used in place of the letter
(except for modified where a "." is used).
See also: (show-buffer-stats), buffer-menu (a package).
(load) Not bound args: code-file-name basic.mut
Load a Mutt executable code file compiled with the Mutt compiler (MC2).
Notes:
The extension (on the code file) MUST be ".mco" but you don't have
to type it in (ie I'll change it to ".mco" no matter what it is).
The environment variable ME3 is used as a search path for load. See
load-code (in me3mutt.doc for how it is parsed (basically like
$PATH)).
Warnings:
If a code file is loaded that has the same name (ignoring path) as
an already loaded code file, it overwrites the old file. All keys
bound to functions in the old file are removed. See autoload.mut
for more about loading and late binding.
See also: load-code (in me3mutt.doc).
(mark-and-end) F-B (End key) me3.mut
Set the mark and move the dot to the end of the buffer.
(mark-and-home) F-A (Home key) me3.mut
Set the mark and move the dot to the start of the buffer.
(ME-command) M-x args: command or program name basic.mut
Run a command or program. ie one of the things listed in this
document. When asked what to Execute: use the name as listed here
(without the "()"'s). eg Execute: describe-bindings
Command completion is in effect.
(newline) C-m basic.mut
Insert a newline before the dot (visually before the cursor).
See also: (newline-and-indent), (open-line).
(newline-and-indent) C-j or M-C-o (oh, not zero) basic.mut
Insert a newline before the dot and duplicate the indentation of the
previous line (the one the dot just left).
Notes:
If tab-stops is 0, tabs are used where possible. Otherwise only
blanks are used.
If the cursor is in the middle of whitespace at the start of a line,
the indent will be the same as the cursor. This makes
newline-and-indent at the start of a line work "right".
If the current line is blank but has whitespace on it, the whitespace
is removed.
See also: (newline), (open-line), tab-stops (me3mutt.doc).
(next-buffer) F-2 hidebuf.mut
Replace the current buffer with the next buffer in the buffer list,
skipping the hidden buffers. The buffer list is in alphabetical
order. The buffer list is circular, ie, the last buffer is followed
by the first buffer.
See also: (list-buffers), (switch-to-buffer), (use-existing-buffer).
(next-character) C-f or F-E (right arrow) basic.mut
Move right a character.
See also: (previous-character).
(next-file) C-xf basic.mut
Read the next file on the command line. By default, ME only reads the
first file on the command line. This command will read the next
one. Note that wildcards must be expanded by the shell (MS-DOS
users take note).
Use C-u to read in lots of files at once.
See also:
The section titled "Command Line Options".
(next-line) C-n or F-D (down arrow) basic.mut
Move the dot vertically down the screen. Trys to stay in the same
column.
Note:
Don't use this in a program unless you want column tracking (for
example binding an arrow key). In most cases the column tracking
gets in the way and will confuse your program. Use forward-line
instead. (see me3mutt.doc).
See also: (forward-line), (previous-line).
(next-page) C-v or F-J (page down) window.mut
Scroll forwards a page (window size -2).
See also: (previous-page).
(next-window) C-xo (oh, as in other) window.mut
Move to the next window down the screen and make it the current window.
See also: (previous-window)
(next-word) M-f basic.mut
Move forwards until dot is after the end of a word or end of buffer.
See also: glossary, (previous-word), (cut-previous-word),
(cut-word), (modify-syntax-entry).
(not-modified) Not bound me3.mut
Reset the modified bit on the current buffer.
(open-line) C-o (oh, not zero) basic.mut
Insert a newline after the dot. The dot does not move.
See also: (newline), (newline-and-indent).
(p-match) F-6 pmatch.mut
Paren matcher. Works on (){}.
Put the cursor at a paren, execute p-match. The cursor is moved to
the matching paren, sits there for a while so you can see the
matching paren and then cursor is restored. The mark is left at the
matching paren so you can (exchange-dot-and-mark) at your convenience.
(point-to-register) C-x/ register.mut
Mark the current buffer and position in a register. You can return to
that point (from anywhere) with (register-to-point).
(previous-character) C-b or F-F (left arrow) basic.mut
Move the dot backwards by a character.
See also: (next-character).
(previous-line) C-p or F-C (up arrow) basic.mut
Move the dot vertically up the screen. Tries to stay in the same
column.
Note:
Don't use this in a program unless you want column tracking (for
example binding an arrow key). In most cases the column tracking
gets in the way and will confuse your program. Use forward-line
instead. (see me3mutt.doc).
See also: (forward-line), (next-line).
(previous-page) M-v or F-I (page up) window.mut
Scroll backwards a page (window size -2).
See also: (next-page).
(previous-window) C-xp window.mut
Move to the window immediately above the current window and make it the
current window.
See also: (next-window).
(previous-word) M-b basic.mut
Move backwards until dot is at the beginning of a word or beginning of
buffer.
See also: (cut-previous-word), (cut-word), (next-word),
(modify-syntax-entry).
(Queens)* Not Bound queen.mut
A "how do you place N queens on a NxN chess board so they don't attack
each other?" solver that shows the queens moving around.
To load it: M-x load <Enter> queen <Enter>
See also: (hanoi).
(query-replace) M-% or M-q qr.mut
Interactively search and replace strings.
If the replacements are successful, the cursor is left where the
replace started and the mark is after the last replacement.
If terminated, the cursor is left where the abort occurred and the
mark is where the replace started.
n : No, don't replace. Go on to next match.
<SPACE>, y : Yes, replace and go to next match.
! : Replace all the rest without asking.
C-g : Stop. The command stops and the cursor is left where it is.
To get to the start of the query-replace, use
(exchange-dot-and-mark).
? : Popup a window with some documentation in it.
C-l : Redraw the screen and put the cursor in a "reasonable" place.
A few others. Use "?".
If you hit a character not in the list, the query-replace stops.
Patterns are saved across searches.
If you want to call this from a Mutt program, the optional args are:
(query-replace search-pattern replace-pattern)
Note that the query-replace remains interactive.
See also: (re-query-replace), search-replace (me3mutt.doc),
case-fold-search (in me3mutt.doc).
(quote) C-q or C-^ (control-^) basic.mut
Insert the next character typed into the buffer. This is how to get
control characters and the like into the buffer.
Notes:
If you quote ALT keys or softkeys it will be pretty boring.
C-q0 (zero) will ask for a decimal number that is converted into a
character. For example, C-q065 will insert "A" into the buffer.
(re-query-replace) M-C-q qr.mut
Same as (query-replace) but using regular expressions.
See regexp.doc for regular expression syntax.
See also: (query-replace), case-fold-search (in me3mutt.doc)
(read-file) C-xC-r args: file name, [yes or no] basic.mut
Clear the current buffer (asking if the buffer has been modified) and read
in a file.
The file name defaults to the file name of the current buffer.
Command completion is on.
See also: (insert-file), (visit-file), (write-file) and read-file-hook
(in me3mutt.doc).
(refresh-screen) C-l window.mut
Repaint the screen. If n, then center the dot vertically in the window.
See also: (reposition-window).
(register-to-point) C-xj register.mut
Jump to the buffer and point saved in a register by (point-to-register).
(rename-buffer) Not bound me3.mut
Change the name of the file that is attached to the current buffer.
After you do this, saving the buffer will cause it to write to the new
file name.
If you want to detach the buffer from the file system, use "" as the
new file name.
(reposition-window) M-! window.mut
Move the current window so that the line the dot is on is n lines
from the top of the window. The default is to move the line the dot
is on to the top of the window.
If n < 0, move the dot so that it is n lines from the bottom.
If n == 0, the dot is centered vertically centered in the window.
See also: (refresh-screen).
(reverse-re-search) Not Bound search.mut
Same as (reverse-search) but using regular expressions.
See regexp.doc for regular expression syntax.
See also: (reverse-search), (forward-re-search).
(reverse-search) Not Bound search.mut
See (forward-search) for info.
(save-buffer) C-xC-s basic.mut
Write the current buffer to the file associated with it. Does not
do anything if the buffer has not been modified. If you want to
force a write, use (write-file).
See also: (write-file).
(scroll-down) C-xC-n or F-O (oh) (roll up) window.mut
Move the current window down by a line. Visually, the dot moves up the
screen.
(scroll-left) C-x< window.mut
Scroll the current window left - ie move the text in the window to
the left. With an arg, moves that many columns, otherwise, moves 3
less than the screen width.
See also: (scroll-right).
(scroll-other-window) M-C-v window.mut
Page the "next" window (the one you would get to with next-window).
(scroll-right) C-x> window.mut
Scroll the current window right - ie move the text in the window to
the right. With an arg, moves that many columns, otherwise, moves 3
less than the screen width.
See also: (scroll-left).
(scroll-up) C-xC-p or F-P (roll down) window.mut
Move the current window up by a line. Visually, the dot moves down the
screen.
(set-the-mark) C-@ or M-SPACE or F-N (select), sometimes C-space basic.mut
Set the mark at the dot. Visually, under the cursor.
See also: (exchange-dot-and-mark).
(set-sysvar) Not Bound sysvar.mut
Set a ME system variable.
See me3mutt.doc for a list and what they do.
Command completion is on.
set-sysvar knows "off" and "hard" as 0, "on" as 1 and reconizes
numbers.
See also: (get-sysvar), (sysvars).
(shell-command) C-x! args: op sys command basic.mut
Call the operating system to perform a command or run a program and
then return to editing.
MS-DOS example: To copy a file: (shell-command "copy foo bar")
To get a directory listing: (shell-command "ls").
See also: (filter), (spawn-shell), enter-ME-hook, leave-ME-hook and
OS-command (in me3mutt.doc).
(shell-region) Not bound me3.mut
Use the region as input to (shell-command).
For example:
foo.c has a comment in it that shows how to compile:
/* cc -o foo foo.c -lX11 */
By setting dot and mark around the text and using shell-region, you
can compile foo.
Notes:
Don't use a very big region - shell-command gets very upset at more
then 256 characters.
See also: (shell-command).
(show-buffer-stats) C-x= bstats.mut
Display some info about the current buffer.
(shrink-window) C-xC-z window.mut
Shrink the current window by a line. With an arg, shrink by that many
lines.
See also: (grow-window), window-length (me3mutt.doc).
(spawn-shell) C-z basic.mut
Jump to the operating system shell for a while. ME is still loaded
and will sit in the background until you exit the shell (via "exit"
in MS-DOS).
In UNIX and MS-DOS, you can specify your shell with the SHELL
environment variable (eg set SHELL=MUSH.EXE).
On UNIX systems that support job control, C-uC-z will suspend ME.
This is (usually) much faster than forking a new shell (use the fg
command (or equivalent) to return to ME). A major drawback of this
is trying to use it from a shell that does not support job control
(such as sh) or from a program (such as mail) that fired off ME via
the C system() command (it uses sh). In these cases the shell hangs
and it is difficult to recover.
See also: (shell-command), (filter), enter-ME-hook and leave-ME-hook
(in me3mutt.doc).
(spell-buffer)* Unix only spell.mut
Check the spelling of every word in the current buffer using the Unix
spell program. For each incorrect word, you are asked for the
correct spelling and then put into a query-replace to fix some or
all occurrences. If you do not want to change a word, just press
Return - the query replace will be skipped. If you hit Return too
many times, press "-" and you will be asked about the previous
incorrect word. Case is important.
(spell-region)* Unix only spell.mut
Check the spelling of words in a region.
(spell-string)* Unix only spell.mut
Check the spelling of one or more words you type in. No query replace
is done.
(spell-word)* M-$ Unix only spell.mut
Check the spelling of the words the cursor is on.
(split-window-vertically) C-x2 window.mut
Make 2 windows out of the current window. A window with less than 3
lines cannot be split.
See also: (delete-other-windows).
(start-macro) C-x( basic.mut
Start remembering keystrokes until (end-macro).
(abort) will terminate and back out of the macro.
See also: (end-macro), (execute-macro).
(switch-to-buffer) C-xb args: buffer name basic.mut
Replace the current window with another buffer.
Buffer name completion is on.
See also: (list-buffers), (next-buffer), (use-existing-buffer).
(sysvars) Not Bound sysvar.mut
Pop a menu of the system variables and optionally set one. To set
one, move the cursor the variable you want to change (with regular
ME keys or vi keys) and press return. (set-sysvar) is then run on
that variable.
See also: (get-sysvar), (set-sysvar).
(tab) C-i or the tab key basic.mut
Insert tab(s).
Move to the next tab stop. With argument, move n tabs.
To set the tab stops, see tab-stops in me3mutt.doc.
(toggle-read-only) C-xC-q basic.mut
Toggle the read only status of the current buffer. When a buffer is
read only, no changes are allowed (the exception is that the buffer
can be deleted).
See also: buffer-read-only.
(transpose-chars) C-t twiddle.mut
Transpose the two characters on either side of the dot (cursor) and
move the dot forward. If at the end of the line, transpose the two
characters left of the dot.
This works the same as GNU Emacs transpose-chars.
See also: twiddle-about-dot and twiddle-left-of-dot.
(turn-on-undo) Not Bound undo.mut
Turn on undo for a buffer. This has usually already been done.
See also: (undo)
(twiddle-about-dot) Not Bound twiddle.mut
Transpose the two characters on either side of the dot (cursor).
See also: transpose-chars and twiddle-left-of-dot.
(twiddle-left-of-dot) Not Bound twiddle.mut
Transpose the two characters left of the dot (cursor).
See also: transpose-chars and twiddle-about-dot.
(undo) C-xu or C-_ undo.mut
Undo the last change to the buffer. May not be turned on for some
buffers.
Undo won't undo the following things:
cursor movement, buffer clears, file reads, buffer (or file) name
changes.
See also: (turn-on-undo), Undo.article.
(universal-argument) C-u basic.mut
Get a numeric count for the next command. The next command or program
is performed count times. If the command is a self-insert, count
copies of the character are inserted.
Count starts at 4 (except as noted below). If the first key pressed
after C-u is "-", count becomes negative. Pressing C-u multiplies
count by 4. If a non digit is pressed, whatever is bound to that
key is performed count times. Otherwise, count becomes the next
digits pressed.
For example, C-uC-f will move forward 4 characters, C-uC-uC-f 16
characters, C-u123 123 characters. C-u5@ will insert "@@@@@".
If (universal-argument) is given an argument, the count starts there.
For example, in some Emacses, META digit starts the count at digit.
See arg-prefix in me3mutt.doc for how to implement this.
(universal-argument) ignores running programs and will read from the
keyboard. Use arg-prefix if you wish pass an argument to something.
See also: arg-prefix (in me3mutt.doc).
(upcase-region) C-xC-u case.mut
Convert a region to upper case.
See also: (downcase-region), (downcase-word), (upcase-word).
(upcase-word) M-u case.mut
Convert word to upper case.
See (capitalize-word) for edge conditions.
See also: (modify-syntax-entry), (downcase-word), (downcase-region),
(upcase-region).
(use-existing-buffer) C-xC-o (oh) me3.mut
Replace the current window with a buffer that already exists.
Buffer name completion is on.
See also: (list-buffers), (switch-to-buffer).
(version) Not bound basic.mut
Show the version of ME.
(visit-file) C-xC-f or C-xC-v args: file name basic.mut
Pull a file into a buffer for editing. The current window is used to
hold new buffer. If arg-prefix, the window is split (if it is the
only one) or another window is used to hold the new buffer. If the
file has been already loaded, switch to it. Otherwise, read in the
file. A buffer name is created from the file name by stripping off
the directory info and keeping the name and extension. The dot is
set to the beginning of the buffer and the marks are cleared (if
this is a new buffer).
If the buffer already exists but the filenames are different (eg "foo"
and "../foo" both generate the buffer name "foo"), a unique buffer
name is constructed by appending "<2>", "<3>", etc, using the lowest
number that makes a name not already in use.
Command completion is on.
See also: (insert-file), (read-file), (write-file) and read-file-hook
(in me3mutt.doc).
(write-file) C-xC-w args: file-name basic.mut
Write the current buffer to a file. If the file exists, it is
overwritten. If the file does not already exist, it is created.
file-name defaults to the file name of the current buffer.
Note that the buffer name and file name do NOT change. Some Emacses
change the file name to file-name. If you like this behavior, try:
(defun write-named-file
{(rename-buffer (ask "Write named file: "))(write-file "")})
Command completion is on.
See also: (insert-file), (read-file), (save-buffer), (visit-file).
(yank) C-y basic.mut
Insert the contents of the cutbuffer before the dot (visually before the
cursor). Does not affect the cut buffer.
The dot is left after the yanked text. The mark does not move.
See also: (copy-region), (cut-line), (cut-region).