home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gold Fish 3
/
goldfish_volume_3.bin
/
files
/
util
/
edit
/
jade
/
man
/
jade.info-2
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
GNU Info File
|
1994-10-16
|
48.8 KB
|
1,505 lines
This is Info file jade.info, produced by Makeinfo-1.55 from the input
file jade.texi.
START-INFO-DIR-ENTRY
* Jade: (jade). An editor for X11 and AmigaDOS
END-INFO-DIR-ENTRY
This is Edition 1.3, last updated 7 October 1994, of `The Jade
Manual', for Jade, Version 3.2.
Jade is a text editor for X11 (on Unix) and the Amiga.
Copyright 1993, 1994 John Harper.
Permission is granted to make and distribute verbatim copies of this
manual provided the copyright notice and this permission notice are
preserved on all copies.
Permission is granted to copy and distribute modified versions of
this manual under the conditions for verbatim copying, provided that
the entire resulting derived work is distributed under the terms of a
permission notice identical to this one.
File: jade.info, Node: Editing Words, Next: Editing Expressions, Prev: Editing Characters, Up: Editing Units
Editing Words
-------------
The following commands operate on words. When given a prefix argument
they operate on that number of words all in one go.
The syntax of a word depends largely on the major mode being used to
edit the buffer with, see *Note Editing Modes::.
`Meta-f'
`Meta-Right'
Move forward one word.
`Meta-b'
`Meta-Left'
Move back one word.
`Meta-d'
`Meta-DEL'
Kills characters from the cursor to the start of the next word.
*Note Killing::.
`Meta-Backspace'
Kills characters from the start of the previous word to the cursor
position.
`Meta-t'
Transpose words: the word before the cursor is dragged over the
following word. An argument means to drag the word over that
number of words.
`Meta-u'
Convert the characters from the cursor to the start of the next
word to upper-case.
`Meta-l'
Similar to `Meta-u' but converts to lower-case.
`Meta-c'
Capitalise the word beginning at the cursor position. What happens
is that the next alphabetic character is converted to upper-case
then the rest of the word is converted to lower-case. Note that an
argument to this command currently has no effect.
File: jade.info, Node: Editing Expressions, Next: Editing Lines, Prev: Editing Words, Up: Editing Units
Editing Expressions
-------------------
Expressions are used when editing programming languages; the editing
mode for a particular programming language defines the syntax of an
expression element in that language. In other editing modes an
expression is defined as a single word.
These commands use prefix arguments in the normal manner.
`Ctrl-Meta-f'
Move forward over one expression element.
`Ctrl-Meta-b'
Move backwards over one expression.
`Ctrl-Meta-k'
Kills the following expression, starting from the current cursor
position. A negative argument means kill backwards. *Note
Killing::.
`Ctrl-Meta-t'
Transpose the previous expression with the following one. An
argument means to drag the previous one over that many expressions.
File: jade.info, Node: Editing Lines, Prev: Editing Expressions, Up: Editing Units
Editing Lines
-------------
These commands all operate on one or more lines of text. Most use a
prefix argument (if entered) to define how many lines to move or operate
on.
`Ctrl-n'
`Down'
Move down one line.
`Ctrl-p'
`Up'
Move to the previous line.
`Ctrl-a'
`Shift-Left'
Move to the beginning of the current line.
`Ctrl-e'
`Shift-Right'
Move to the end of the current line.
`Meta-j'
Prompts for the number of a line to jump to. If a prefix argument
was entered that defines the line number.
`Ctrl-DEL'
Kill the current line. *Note Killing::.
`Shift-DEL'
Kill from the cursor to the end of the current line.
`Shift-Backspace'
Kill from the cursor to the beginning of the line.
`Ctrl-k'
If the cursor is not at the end of the line kill the text from the
cursor to the end of the line, else kill from the end of the line
to the start of the next line.
If this command is given an argument it kills that number of
*whole* lines, either backwards or forwards from the cursor,
depending on whether or not the argument is negative or positive.
An argument of zero kills from the cursor to the start of the
current line.
`Ctrl-o'
Create a blank new line, leaving the cursor in its original
position. A prefix argument says to create that many blank lines.
File: jade.info, Node: Cutting And Pasting, Next: Using Blocks, Prev: Editing Units, Up: Using Jade
Cutting And Pasting
===================
One of the main functions of any editor is to allow you to move
around chunks of text, Jade makes this very easy.
Generally, to paste down some text you have to get the text to be
inserted into the window-system's clipboard (1). If the text you wish
to paste is in one of the editor's buffers Jade has a number of
commands for doing this, this is sometimes referred to as "killing" the
text. For details of how to kill a piece of text see *Note Killing::.
If the text to be pasted is in the same buffer as the position to
which you want to copy it there is an easier way than putting it into
the clipboard. For more details see *Note Commands on Blocks:: and the
command `Ctrl-i'.
Once the text to be pasted is in the clipboard there are two
commands which can be used to insert it into the buffer before the
cursor,
`Ctrl-y'
Inserts text into the buffer before the cursor. The text inserted
is either the current contents of the kill buffer, or the block
marked in this window, if one exists.
`Ctrl-Y'
This is a variant of `Ctrl-y', it treats the string that it is
pasting as a "rectangle" of text. That is, each successive line in
the string (each separated by a newline character) is inserted on
successive lines in the buffer but at the same column position.
For more details see *Note Rectangular Blocks:: and the function
`insert-rect'.
---------- Footnotes ----------
(1) When using an Amiga, unit zero of the `clipboard.device' is
used. For X11, the first cut-buffer.
File: jade.info, Node: Using Blocks, Next: Killing, Prev: Cutting And Pasting, Up: Using Jade
Using Blocks
============
A "block" is a section of a buffer, you mark it by specifying its
edges (i.e. the first and last characters). This part of the buffer can
then have various things done to it, for example insert it somewhere
else.
Each window can only have a single block marked at any one time, it
will be displayed in the reverse of normal text (i.e. white on black,
not black on white).
* Menu:
* Marking Blocks:: Commands to define the current block
* Commands on Blocks:: How to work with blocks
* Rectangular Blocks:: Columns of text as blocks
File: jade.info, Node: Marking Blocks, Next: Commands on Blocks, Up: Using Blocks
Marking Blocks
--------------
To mark a block you must specify its outermost points, note that the
text marked by the block ends one character before the marked position
(this is so that it easy to mark whole lines).
Rectangular blocks are a bit different for more information, see
*Note Rectangular Blocks::.
Note also that block marks shrink and grow as text is deleted and
inserted inside them, similar to what normal marks do.
These are the commands used to mark a block,
`Ctrl-m'
`Ctrl-SPC'
If a block is currently marked in this window it will unmark it.
Otherwise it will either mark the beginning or end of the block
depending on whether or not a block has previously been partially
marked.
The normal method for marking a few characters is to first make
sure that no block is currently marked (the status line displays
the status of the block marks, a `b' means that one end of a block
has been marked and a `B' means that both ends of a block are
marked in which case it will be highlighted somewhere in the
buffer) then press `Ctrl-m' at one end, move the cursor to the
opposite end and press `Ctrl-m' again.
`Ctrl-x h'
Mark the whole of the buffer.
`Meta-@'
Mark the current word.
`Meta-h'
Mark the current paragraph.
Another method for marking a block is to use the mouse, double
clicking the left mouse button on a character has the same effect as
moving to that character and typing `Ctrl-m'. Similarly, clicking the
left mouse button while pressing the SHIFT key clears a marked block.
File: jade.info, Node: Commands on Blocks, Next: Rectangular Blocks, Prev: Marking Blocks, Up: Using Blocks
Commands on Blocks
------------------
`Ctrl-i'
Inserts the block marked in this window, at the cursor position,
then unmarks the block.
`Ctrl-w'
Kills the contents of the marked block, for information about
killing see *Note Killing::.
`Meta-w'
Similar to `Ctrl-w' except that the text is not actually deleted,
just stored for later recall.
`Ctrl-W'
Deletes the text in the currently marked block.
`Ctrl-x Ctrl-l'
Makes all alpha characters in the current block lower case.
`Ctrl-x Ctrl-u'
Makes all characters in the block upper case.
File: jade.info, Node: Rectangular Blocks, Prev: Commands on Blocks, Up: Using Blocks
Rectangular Blocks
------------------
Normally blocks are thought of sequentially from their first to last
characters. It is also possible to mark rectangular blocks, the block
marks being thought of as the opposite corners of the rectangle.
The commands which operate on blocks automatically check whether the
current block is a rectangle; if so they change their function
accordingly. For example, the `Ctrl-i' command (`insert-block')
understands that rectangular blocks have to be inserted in a different
manner to normal, sequential, blocks.
`Ctrl-M'
Toggle between marking sequential and rectangular blocks, each
window has its own value of this attribute (i.e. one window can be
marking rectangles while the rest don't).
`Ctrl-Y'
Similar to `Ctrl-y' except that the string inserted is treated as a
rectangle -- newline characters don't get inserted, instead the
next line is inserted in the next line in the buffer at the same
column as that inserted into the previous line. For more details
see the function `insert-rect'.
At present there is a problem with changing the case of a
rectangular block with `Ctrl-x Ctrl-l' or `Ctrl-x Ctrl-u', they treat
it as a sequential block. This will be fixed soon.
File: jade.info, Node: Killing, Next: Searching and Replacing, Prev: Using Blocks, Up: Using Jade
Killing
=======
"Killing" is the general method for deleting a piece of text so that
it can later be re-inserted into a buffer. Each time you kill some text
it is stored in the window-system's clipboard (see *note Cutting And
Pasting::.) where it can be accessed by Jade or other programs.
The text copied by successive kill commands are concatenated
together, this makes it easy to incrementally save text a piece at a
time.
The main commands for killing are as follows, they are only described
in brief since their full descriptions are in other parts of the manual.
`Ctrl-w'
Kill the current block. *Note Using Blocks::.
`Meta-w'
Kill the current block without actually deleting it from the
buffer.
`Ctrl-k'
Kills the current line. *Note Editing Lines::.
`Meta-d'
Kill the word starting from the cursor. *Note Editing Words::.
`Meta-Backspace'
Kills from the cursor to the beginning of the current word.
`Ctrl-Meta-k'
Kill the expression following the cursor. *Note Editing
Expressions::.
File: jade.info, Node: Searching and Replacing, Next: Editing Modes, Prev: Killing, Up: Using Jade
Searching and Replacing
=======================
It is very easy to search any of Jade's buffers for a specific
string, the standard search command will search the current buffer for
a specified regular expression.
Once you have found an occurrence of the string you are looking for
it is then possible to replace it with something else.
* Menu:
* Regular Expressions:: The syntax of regular expressions
* Incremental Search:: How to search for regexps
* Global Replace:: Replacing all occurrences of a regexp
* Query Replace:: Interactively replacing regexps
File: jade.info, Node: Regular Expressions, Next: Incremental Search, Up: Searching and Replacing
Regular Expressions
-------------------
Jade uses the regexp(3) package by Henry Spencer, with some
modifications that I have added. It comes with this heading:
Copyright (c) 1986 by University of Toronto.
Written by Henry Spencer. Not derived from licensed software.
Permission is granted to anyone to use this software for any
purpose on any computer system, and to redistribute it freely,
subject to the following restrictions:
1. The author is not responsible for the consequences of use of
this software, no matter how awful, even if they arise from
defects in it.
2. The origin of this software must not be misrepresented, either
by explicit claim or by omission.
3. Altered versions must be plainly marked as such, and must not
be misrepresented as being the original software.
The syntax of a regular expression (or regexp) is as follows (this
is quoted from the regexp(3) manual page):
A regular expression is zero or more "branches", separated by `|'.
It matches anything that matches one of the branches.
A branch is zero or more "pieces", concatenated. It matches a
match for the first, followed by a match for the second, etc.
A piece is an "atom" possibly followed by `*', `+', or `?'. An
atom followed by `*' matches a sequence of 0 or more matches of
the atom. An atom followed by `+' matches a sequence of 1 or more
matches of the atom. An atom followed by `?' matches a match of
the atom, or the null string.
An atom is a regular expression in parentheses (matching a match
for the regular expression), a "range" (see below), `.' (matching
any single character), `^' (matching the null string at the
beginning of the input string), `$' (matching the null string at
the end of the input string), a `\' followed by a single character
(matching that character), or a single character with no other
significance (matching that character).
A "range" is a sequence of characters enclosed in `[]'. It
normally matches any single character from the sequence. If the
sequence begins with `^', it matches any single character *not*
from the rest of the sequence. If two characters in the sequence
are separated by `-', this is shorthand for the full list of ASCII
characters between them (e.g. `[0-9]' matches any decimal digit).
To include a literal `]' in the sequence, make it the first
character (following a possible `^'). To include a literal `-',
make it the first or last character.
Some example legal regular expressions could be:
`ab*a+b'
Matches an `a' followed by zero or more `b' characters, followed by
one or more `a' characters, followed by a `b'. For example,
`aaab', `abbbab', etc...
`(one|two)_three'
Matches `one_three' or `two_three'.
`^cmd_[0-9]+'
Matches `cmd_' followed by one or more digits, it must start at the
beginning of the line.
As well as being matched against, regexps also provide a means of
"remembering" portions of the string that they match. The first nine
parenthesised expressions that are matched and the whole match are
recorded so that they can be used later.
The main use for this is in the command to replace a previously
found regexp with the Lisp functions `regexp-expand',
`regexp-expand-line' and `replace-regexp'. The string which is given as
the template (i.e. the string that replaces the matched string) is
expanded inserting these recorded strings where asked to.
Each occurrence of `\C' in the template is a candidate for
expansion. C can be one of:
`&'
`0'
Replaces the whole substring matched by the regular expression.
`1' to `9'
The numbered parenthesised expression.
`\'
The character `\'.
For example, if a regexp of `:([0-9]+):' matches a line
`foo:123:bar', the expansion template `x_\1' would produce `x_123'.
File: jade.info, Node: Incremental Search, Next: Global Replace, Prev: Regular Expressions, Up: Searching and Replacing
Incremental Search
------------------
Jade's main command for searching buffers is an Emacs-style
incremental search (or "isearch"). This is a subsystem of the editor
which lets you interactively search for regular expressions in a buffer.
`Ctrl-s'
Start an incremental search, initially searching forwards through
the buffer.
`Ctrl-r'
Similar to `Ctrl-s' except that searching is initially in the
backwards direction.
When you are in an isearch the general idea is to type in a regular
expression and see what it matches in the buffer. As more characters are
added to the string being searched for the cursor indicates strings
which match. To backtrack your steps (i.e. the characters you have
typed) the backspace key is used.
The special commands which are available when isearching are,
`Ctrl-s'
Search forwards for another occurrence of the search regexp. This
can also be used to wrap around to the start of the buffer if no
more matches exist between the cursor and the end of the buffer.
`Ctrl-r'
Search backwards for the regexp.
`Ctrl-g'
Cancels the isearch. If the search is currently failing (the
string you've typed doesn't match anything) characters are deleted
from the regexp until either a match is found or the original
cursor position is reached. If the search is not failing the
cursor is returned to its original position and the isearch is
exited.
`Ctrl-w'
Copies the word under the cursor to the regexp being searched for.
`Ctrl-y'
The rest of the current line is appended to the regexp being
searched for.
`Ctrl-q'
The next character typed is appended to the regexp no matter what
it is, this can be used to enter control characters. Note that
currently you can't search for newline characters.
`RET'
`ESC'
Accept the cursor's current position, the isearch is exited
leaving the cursor as it is.
`Backspace'
Moves back up the stack which represents the current isearch, i.e.
deletes characters from the search regexp or moves the cursor
through the positions it had to reach its current position.
Any other keys are appended to the regular expression being searched
for.
File: jade.info, Node: Global Replace, Next: Query Replace, Prev: Incremental Search, Up: Searching and Replacing
Global Replace
--------------
`Meta-x replace-all RET REGEXP RET TEMPLATE'
For all occurrences of the regular expression REGEXP replace it
with the string obtained by expanding TEMPLATE. For details of how
the TEMPLATE works see *Note Regular Expressions::.
File: jade.info, Node: Query Replace, Prev: Global Replace, Up: Searching and Replacing
Query Replace
-------------
The `query-replace' function provides an interactive method of
replacing strings in a buffer which match a specific regular expression.
For each occurrence found you, the user, have a number of options;
for example, you could replace this occurrence with a prespecified
template.
`Meta-% REGEXP RET TEMPLATE RET'
Invoke a query-replace, for all occurrences of the regular
expression, REGEXP you will be prompted for what you want to do
with it. Usually this will be to replace it with the expansion
provided by the template (see *note Regular Expressions::.)
TEMPLATE.
Special commands which come into effect each time the query-replace
finds a match are,
`SPC'
`y'
Replace this occurrence with the expansion of TEMPLATE and search
for the next match.
`Backspace'
`n'
Ignore this match and search for the next.
`,'
Replace this occurrence, then wait for another command.
`RET'
`ESC'
`q'
Exit this query-replace.
`.'
Replace this occurrence then exit.
`!'
Replace the current match and all the rest between here and the
end of the buffer.
`^'
Retrace your steps through each match which has been found.
`Ctrl-r'
Enter a recursive-edit, this is allows you to edit this match by
hand. When you exit the recursive-edit (with the `Ctrl-Meta-c'
command) the next match is searched for.
`Ctrl-w'
Delete the current match, then enter a recursive-edit, as in the
`Ctrl-r' command.
File: jade.info, Node: Editing Modes, Next: Minor Modes, Prev: Searching and Replacing, Up: Using Jade
Editing Modes
=============
Modes are used to tailor the editor to the *type* of the file being
edited in a buffer. They are normally a file of Lisp which installs the
buffer-local key bindings and variables which are needed for that type
of file.
For example, C-mode is a mode used to edit C source code, its main
function is to try to indent each line to its correct position
automatically.
The name of the mode active in the current buffer is displayed in the
status line, inside the square brackets.
At present there are only a small number of modes available. It is
fairly straightforward to write a mode for other classes of file though.
*Note Writing Modes::.
Most of the modes for editing programming languages use the command
`Meta-;' to insert a comment place-holder, the cursor is moved to where
you should type the body of the comment.
* Menu:
* Invoking a Mode:: How editing modes are invoked on a buffer
* Generic mode:: The foundations which all modes build from
-- Modes for editing programming languages --
* C mode:: Mode for C source code
* Lisp mode:: Mode for Lisp
* Asm mode:: For generic assembler source
-- Modes for natural language --
* Text mode:: For normal language-based text
* Indented-Text mode:: Variant of Text-mode
* Texinfo mode:: Mode for editing Texinfo source
File: jade.info, Node: Invoking a Mode, Next: Generic mode, Up: Editing Modes
Invoking a Mode
---------------
When a new file is loaded the function `init-mode' tries to find the
mode that it should be edited with. If it is successful the mode will be
automatically invoked.
It is also possible to install a mode manually, simply invoke the
command which is the name of the mode. For example to install the `C
mode' in a buffer type `Meta-x c-mode'.
File: jade.info, Node: Generic mode, Next: C mode, Prev: Invoking a Mode, Up: Editing Modes
Generic mode
------------
This is not a mode as such since there is no Lisp code associated
with it. When no mode is being used to edit the buffer, it is said to
use the "Generic" mode.
This is the base from which all other modes build, it consists of
all the standard key bindings. Words are defined as one or more
alphanumeric characters, paragraphs are separated by a single blank
line.
File: jade.info, Node: C mode, Next: Lisp mode, Prev: Generic mode, Up: Editing Modes
C mode
------
`c-mode' is used for editing C source code files. Any files which
end in `.c' or `.h' are automatically edited in this mode.
It's one and only function is to try and indent lines to their
correct depth, it doesn't always get it right but it works fairly well.
The keys that it rebinds to achieve this are,
It also defines the syntax of an expression in the C language for use
with the expression commands, see *Note Editing Expressions::.
`TAB'
Indents the current line to what the editor thinks is the correct
position.
`{'
`}'
`:'
These keys are handled specially since the indentation of the line
that they are inserted on may have to be adjusted.
`Ctrl-Meta-\'
Indents all lines which are marked by the current block.
- Command: c-mode
Editing mode for C source code. Automatically used for files
ending in `.c' or `.h'.
- Hook: c-mode-hook
This hook is called by `c-mode' each time the mode is invoked.
- Variable: c-mode-tab
Size of tab stops used by `c-mode'.
- Variable: c-mode-auto-indent
When non-nil `RET' will indent the line after splitting it.
File: jade.info, Node: Lisp mode, Next: Asm mode, Prev: C mode, Up: Editing Modes
Lisp mode
---------
`lisp-mode' is used to edit files of Lisp intended to be read by the
editor. Its main function is to manage the indentation of Lisp
expressions for you. Each form is regarded as an expression by the
commands which operate on expressions, see *Note Editing Expressions::.
There is also support for using a buffer as a simple shell-interface
to the editor's Lisp subsystem.
The method used for indenting lines of Lisp is fairly
straightforward, the first symbol in the expression containing this
line is found. This symbol's `lisp-indent' property is then used to
decide which indentation method to apply to this line. It can be one of
the following,
`nil'
The standard method (also used if the symbol doesn't have a
`lisp-indent' property).
If the first argument to the function is on the same line as the
name of the function then subsequent lines are placed under the
first argument. Otherwise, the following lines are indented to
the same depth as the function name.
For example,
(setq foo 20
bar 1000)
(setq
foo 20
bar 1000)
`defun'
This method is used for all functions (or special-forms, macros)
whose name begins with `def' and any lambda-expressions.
All arguments to the function are indented `lisp-body-indent'
columns from the start of the expression.
For example,
(defun foo (bar)
"A test"
(let
((foo bar))
...
A number, N
The first N arguments to the function are indented twice the value
of `lisp-body-indent', the remaining arguments are indented by
`lisp-body-indent'.
For example the special-form `if' has a `lisp-indent' property of
2,
(if condition
t-expression
nil-expressions...)
Special commands for Lisp mode are,
`Ctrl-j'
Evaluates the expression preceding the cursor, prints the value on
the next line. This is designed to be used like a shell, you type
a Lisp expression, press `Ctrl-j' and Jade prints the value for
you.
`TAB'
Indents the current line.
`Ctrl-Meta-\'
Indents all lines which are marked by the current block.
`Ctrl-Meta-x'
Evaluates the expression before the cursor, prints it's value in
the status line.
- Command: lisp-mode
Editing mode for Jade's Lisp. Automatically invoked for files
ending in `.jl'.
- Hook: lisp-mode-hook
This hook is evaluated each time `lisp-mode' is invoked.
- Variable: lisp-body-indent
The number of characters which the body of a form is indented by,
the default value is 2.
File: jade.info, Node: Asm mode, Next: Text mode, Prev: Lisp mode, Up: Editing Modes
Asm mode
--------
A basic mode for editing assembler source files with, provides
automatic indentation of labels and instructions.
The special commands are,
`RET'
Breaks the line as normal, if `asm-indent' is non-nil a tab
characters is inserted as well.
`:'
Deletes all indentation from the start of the current line, then
inserts the string `:\t' to move to the next tab stop. This is
used to enter labels.
`.'
If the line is not empty, all indentation is deleted from the
start of the line. A dot (`.') is then inserted.
- Command: asm-mode
Major mode for generic assembler source files.
- Hook: asm-mode-hook
The hook which is called when `asm-mode' is entered.
- Variable: asm-indent
When this variable is non-nil the RET key inserts the string
`\n\t' instead of just `\n'. This indents the cursor to the first
tab stop of the new line.
- Variable: asm-comment
This variable defines the string which denotes the start of a
comment in the assembler that you are using. By default this is
`;'.
File: jade.info, Node: Text mode, Next: Indented-Text mode, Prev: Asm mode, Up: Editing Modes
Text mode
---------
This is the most basic mode for editing English-style text in. The
main difference over `generic-mode' and is that words are allowed to
contain underscores and there are some extra commands,
`Meta-s'
Centres the current line. The position of the `fill-column' is used
to calculate the centre of the line. For more information on the
`fill-column' variable see *Note Fill mode::.
`Meta-S'
Centres the current paragraph.
- Command: text-mode
Major mode for editing English text.
- Hook: text-mode-hook
Evaluated when `text-mode' is invoked. Variants of `text-mode'
also use this hook.
File: jade.info, Node: Indented-Text mode, Next: Texinfo mode, Prev: Text mode, Up: Editing Modes
Indented-Text mode
------------------
This is a variant of `text-mode', see *Note Text mode::. It's only
difference is in the way the TAB key is handled -- tab stops are
calculated from the previous non-empty line. Each transition from a
sequence of one or more spaces to a non-space character is used as a tab
stop. If there are none of these to the right of the cursor normal the
standard tabbing command is used.
- Command: indented-text-mode
Variant of `text-mode'.
- Hook: indented-text-mode-hook
Evaluated when `indented-text-mode' is invoked. The hook
`text-mode-hook' is also evaluated (before this one).
File: jade.info, Node: Texinfo mode, Prev: Indented-Text mode, Up: Editing Modes
Texinfo mode
------------
`texinfo-mode' is used to edit Texinfo source files, it is
automatically selected for files ending in `.texi' or `.texinfo'. It
provides a few basic key bindings to take some of the tedium out of
editing these files.
Paragraphs are separated by the regexp `^@node', i.e. each node is a
separate paragraph.
The special commands are,
`TAB'
Inserts as many spaces as are needed to move the cursor to the
next tab position. The reason tab characters aren't used is that
TeX doesn't agree with them.
`Ctrl-c Ctrl-c c'
Insert the string `@code{}', positioning the cursor between the
braces.
`Ctrl-c Ctrl-c d'
Insert the string `@dfn{}', positioning the cursor between the
braces.
`Ctrl-c Ctrl-c e'
Inserts the string `@end'.
`Ctrl-c Ctrl-c f'
Inserts the string `@file{}', the cursor is put between the braces.
`Ctrl-c Ctrl-c i'
Inserts the string `@item'.
`Ctrl-c Ctrl-c l'
Inserts the string `@lisp\n'.
`Ctrl-c Ctrl-c m'
Inserts the string `@menu\n'.
`Ctrl-c Ctrl-c Ctrl-m'
Prompts for the name of a node and makes a menu-item for it.
`Ctrl-c Ctrl-c n'
Prompts for each part of a node definition (name, next, prev, up)
and inserts the `@node ...' string needed.
`Ctrl-c Ctrl-c s'
Inserts the string `@samp{}' and puts the cursor between the
braces.
`Ctrl-c Ctrl-c v'
Inserts the string `@var{}', the cursor is put between the braces.
`Ctrl-c Ctrl-c {'
Inserts a pair of braces with the cursor between them.
`Ctrl-c Ctrl-c }'
`Ctrl-c Ctrl-c ]'
Moves the cursor to the character after the next closing brace.
- Command: texinfo-mode
Major mode for editing Texinfo source files.
- Hook: texinfo-mode-hook
Evaluated when `texinfo-mode' is invoked. The hook `text-mode-hook'
is evaluated first.
File: jade.info, Node: Minor Modes, Next: Using Buffers, Prev: Editing Modes, Up: Using Jade
Minor Modes
===========
The editing modes described in the previous section were "Major
modes", each mode was designed for a particular class of file. Minor
modes work on top of the major modes, each minor mode provides a single
extra feature for editing the buffer they are used in. For example
`overwrite-mode' is a minor mode which makes any keys you type
overwrite the character beneath the cursor, instead of inserting
themselves before the cursor.
The names of the minor modes currently active in the current buffer
are displayed in the status line, to the right of the name of the major
mode.
* Menu:
* Overwrite mode:: Typed characters overwrite the character
beneath them.
* Fill mode:: Automatically break long lines as they
are typed.
* Auto-Save mode:: How to disable auto-saving of a buffer.
* Latin-1 mode:: Displaying European characters.
File: jade.info, Node: Overwrite mode, Next: Fill mode, Up: Minor Modes
Overwrite mode
--------------
When enabled, characters typed replace the existing character under
the cursor instead of just moving it to the right.
The command to toggle this mode on and off is `Meta-x
overwrite-mode'.
- Command: overwrite-mode
Toggles overwriting character insertion in the current buffer.
File: jade.info, Node: Fill mode, Next: Auto-Save mode, Prev: Overwrite mode, Up: Minor Modes
Fill mode
---------
Filling splits lines so that they aren't longer than a certain
number of characters. The `fill-mode' checks if you have passed this
threshold when you type the SPC key. Any words passed the threshold get
moved to the next line.
`Ctrl-x f'
Sets the `fill-column' variable (see below) to the cursor's current
column position.
- Command: fill-mode
Toggles the auto-filling minor mode.
- Variable: fill-column
The maximum number of characters allowed in a single line. This is
used by the filling and centring functions.
File: jade.info, Node: Auto-Save mode, Next: Latin-1 mode, Prev: Fill mode, Up: Minor Modes
Auto-Save mode
--------------
This is not really a minor mode but it obeys the same calling
conventions (i.e. calling its function toggles its action).
- Command: auto-save-mode
Toggles whether or not the current buffer is regularly saved to a
temporary file.
For more details about auto-saving see *Note Auto-Saving Files::.
File: jade.info, Node: Latin-1 mode, Prev: Auto-Save mode, Up: Minor Modes
Latin-1 mode
------------
This minor mode toggles the display of characters in the Latin-1
character set, by default these characters are displayed as octal
escape sequences.
This only works properly if the font that you are using defines
glyphs for these characters!
- Command: latin-1-mode
Toggles the display of characters in the Latin-1 character set.
This is a *global* setting.
For more information about what is displayed for each character see
*Note Character Images::.
File: jade.info, Node: Using Buffers, Next: Using Windows, Prev: Minor Modes, Up: Using Jade
Using Buffers
=============
As you have probably realised, buffers are probably the most
important part of the editor. Each file that is being edited must be
stored in a buffer. They are not restricted to editing files though,
all buffers are regarded as simply being a list of lines which can be
displayed in a window and modified as needed.
This means that they are very flexible, for example, the Lisp
debugger uses a buffer for its user interface, the Info reader uses two
buffers - one to display the current node, the other to store the
file's tag table (never displayed, just used to look up the position of
nodes).
Each buffer has a name, generally buffers which contain proper files
use the base part of the filename, while buffers which don't correspond
to files use a word which starts and ends with asterisks (i.e.
`*jade*').
Each window can display one buffer at any one time. There is no
restriction on the number of windows which may display the same buffer
at once.
* Menu:
* Displaying Buffers:: How to make a window display a buffer
* Deleting Buffers:: Killing unwanted buffers
* Other Buffer Commands:: General buffer manipulation
* The Buffer Menu:: Interactive buffer manipulation
File: jade.info, Node: Displaying Buffers, Next: Deleting Buffers, Up: Using Buffers
Displaying Buffers
------------------
There are two main commands for switching to a different buffer,
`Ctrl-x b'
Prompt for the name of a buffer and display it in the current
window.
`Ctrl-x 4 b'
In a different window (opens a new window if there is currently
only one) prompt for the name of a buffer and display it in that
window.
Both commands are very similar, the `Ctrl-x 4 b' variant simply
invokes a command to switch to a different window before calling the
`Ctrl-x b' command.
When typing the name of the new buffer you can use the prompt's
completion mechanism to expand abbreviations (see *note The Buffer
Prompt::.). If you just press RET with an empty prompt the default
choice will be used. This will be the the buffer that was being shown
in this window before the current buffer was selected (its name is
displayed in the prompt's title).
The `Ctrl-x Ctrl-f' command and its variants also switch buffers
since they look for an existing copy of the file in a buffer before
loading it from disk, see *Note Commands To Load Files::.
File: jade.info, Node: Deleting Buffers, Next: Other Buffer Commands, Prev: Displaying Buffers, Up: Using Buffers
Deleting Buffers
----------------
There is no real need to delete buffers, those that haven't been
used for a while just hang around at the end of the list. If you're
short on memory though it can help to kill some of the unused buffers
which you have accumulated.
The command to kill a buffer is,
`Ctrl-x k'
Prompts for the name of a buffer (with completion) then deletes
that buffer (if the buffer contains unsaved modifications you are
asked if you really want to lose them). It is removed from all
window's buffer-lists and any window which is displaying it is
switched to another buffer (the next in its list).
Any marks which point to the buffer are made "non-resident" (that
is, they point to the name of the file in the buffer) and the
buffer is discarded.
File: jade.info, Node: Other Buffer Commands, Next: The Buffer Menu, Prev: Deleting Buffers, Up: Using Buffers
Other Buffer Commands
---------------------
`Meta-x rotate-buffers-forward'
Rotates the current window's list of buffers.
`Meta-x revert-buffer'
Restores the contents of the current buffer to the contents of the
file that it was loaded from, if an auto-save file exists you are
asked if you want to revert to that instead.
`Ctrl-x s'
Ask whether to save any modified buffers that exist.
`Meta-x clear-buffer'
Deletes the contents of the current buffer. Beware, you *won't* be
warned if you're about to lose any unsaved modifications!
File: jade.info, Node: The Buffer Menu, Prev: Other Buffer Commands, Up: Using Buffers
The Buffer Menu
---------------
The buffer menu presents you with a list of all the buffers
accessible from the current window in most-recently-used order. You are
then able to manipulate the buffer list using several simple commands.
`Ctrl-x Ctrl-b'
Enters the buffer menu; the buffer `*Buffer Menu*' is selected and
a list of available buffers is printed in it.
The following example shows how the buffer list is printed.
MR Name Mode File
-- ---- ---- ----
- *Buffer Menu* Buffer Menu
+ user.texi Texinfo man/user.texi
*jade* Lisp
The column headed `M' shows whether the buffer has been modified since
it was last saved and the column `R' shows whether or not the buffer is
read-only. The other columns should be self-explanatory.
When the `*Buffer Menu*' buffer is selected the following commands
are available. When a single buffer is to be manipulated by a command,
the buffer described by the line which the cursor is on is chosen.
`d'
Mark the buffer for deletion and move to the next buffer. A `D' is
displayed in the first column of a line if that buffer is marked
for deletion.
`s'
`Ctrl-s'
Mark the buffer to be saved then move to the next buffer in the
list. A `S' in the second column of a line denotes a buffer which
has been marked to be saved.
`x'
Execute previously-marked saves and deletions.
`u'
Unmark the current line (i.e. clear any `D' or `S' markers) then
move to the next entry in the buffer list.
`~'
Toggle the modified flag of the current line's buffer, then move
down.
`%'
`-'
Toggle the read-only status of the current line's buffer, then
move to the next entry.
`1'
`RET'
Select the current line's buffer in this window.
`o'
Select the current line's buffer in the other window.
`Ctrl-f'
`TAB'
Move to the next line in the buffer list.
`Ctrl-b'
Move to the previous line in the buffer list.
`Ctrl-l'
Redraw the buffer list, incorporating any changes made to the
available buffers.
`q'
Quit the buffer menu.
File: jade.info, Node: Using Windows, Next: Using the Prompt, Prev: Using Buffers, Up: Using Jade
Using Windows
=============
Windows have two main functions: to display the contents of buffers
(but only one buffer at a time) and to collect input from you, the user.
The editor *must* have at least one window open at all times, when
you close the last window Jade will exit, there is no limit to the
number of windows which you may have open at once.
Each window is split into two parts, they are
"The Main Display Area"
This is the largest part of the window, it is where the buffer
that this window is displaying is drawn.
"The Status Line"
A single line of text associated with the window, under X11 this
is the area of the beneath the horizontal line at the bottom of
the window, on the Amiga it is the title of the window. The status
line is normally used to display information about this window and
what it is displaying, it has this format,
BUFFER-NAME (MODE-NAMES) (COL,ROW) N line(s) [FLAGS]
Where the individual parts mean,
BUFFER-NAME
The name of the buffer being edited, it can have either a `+'
or a `-' appended to it, a plus means the buffer has been
modified since it was saved, a minus means that the buffer is
read-only.
MODE-NAMES
This tells you which editing modes are being used by this
buffer, the first word is the name of the major mode, any
subsequent words correspond to the names of the minor modes
for this buffer. If this section is surrounded by square
brackets `[...]' instead of parentheses it means that you are
currently in a recursive edit, for example, inside the Lisp
debugger.
COL
The column that the cursor is at.
ROW
The row number of the cursor.
N
The number of lines in this buffer
FLAGS
General one-character flags related to the status of the
window and its buffer.
Each window maintains a list of all buffers which are available for
displaying, this is kept in order, from the most recently used to the
least. This list (called `buffer-list') is used by some of the buffer
manipulation commands when they are working out which buffer should be
displayed.
* Menu:
* Creating Windows:: Opening a new window
* Killing Windows:: How to close windows
* Other Window Commands:: General window manipulation
File: jade.info, Node: Creating Windows, Next: Killing Windows, Up: Using Windows
Creating Windows
----------------
`Ctrl-x 2'
Opens a new window, it will have the most of the attributes that
the current window does, things like: size, buffer, font, etc...
If you are using X11 you will probably have to use your mouse to
select its position, depending on the window manager you use, on
the Amiga it will be created at the same position as the current
window.
`Ctrl-x 4 Ctrl-f'
`Ctrl-x 4 f'
In a different window, one will be created if only one window is
open, find a file, for more details see *Note Commands To Load
Files::.
`Ctrl-x 4 a'
In a different window add an entry to a change-log file. *Note
Keeping ChangeLogs::.
`Ctrl-x 4 b'
In a different window, choose a buffer to display, similar to the
`Ctrl-x b' command. *Note Displaying Buffers::.
`Ctrl-x 4 h'
Enter the help system in a different window. *Note The Help
System::.
`Ctrl-x 4 i'
Enter the Info browser in a different window. *Note Info Mode::.
`Ctrl-x 4 `'
Display the next error (or whatever) in the `*compilation*' buffer
in a different window. *Note Finding Errors::.
Note that for each `Ctrl-x 4' command there is a corresponding
`Ctrl-x 5' command. Instead of using a different window to the current
one, a new window is opened for each `Ctrl-x 5' command typed.
File: jade.info, Node: Killing Windows, Next: Other Window Commands, Prev: Creating Windows, Up: Using Windows
Killing Windows
---------------
`Ctrl-x 0'
Close the current window, if it is the last window that the editor
has open it will exit (after asking you if you wish to lose any
unsaved modifications to buffers).
`Ctrl-x 1'
Close all windows except the current one.
File: jade.info, Node: Other Window Commands, Prev: Killing Windows, Up: Using Windows
Other Window Commands
---------------------
`Ctrl-x o'
Activate the next window of the editor's. Under X11 this involves
warping the mouse-pointer to the top left corner of the newly
activated window.
`Meta-x set-font'
Choose a font to use in the current window. This command prompts
for the name of the font then installs it in the window. Font
names are the same as for the shell argument `-font' (*note
Startup Options::.).
File: jade.info, Node: Using the Prompt, Next: Using Marks, Prev: Using Windows, Up: Using Jade
Using the Prompt
================
There are two different styles of prompt that the editor uses when it
wants you to enter a string.
* Menu:
* The Simple Prompt:: The prompt at the bottom of the window
* The Buffer Prompt:: Prompt with its own buffer and completion
File: jade.info, Node: The Simple Prompt, Next: The Buffer Prompt, Up: Using the Prompt
The Simple Prompt
-----------------
The simplest prompt uses the the bottom-most line in the window, it
prints the prompt's title on the left hand side, you should type your
response and then press the RET key. This prompt is very primitive, the
only special commands that it has are,
`Backspace'
Delete the previous character.
`Up'
`Down'
Replace the contents of the prompt with the last string entered.
When you type `Up' or `Down' again the original contents are
restored.
`ESC'
Cancel the prompt.
All other keys are simply printed in the prompt -- whatever they are.
File: jade.info, Node: The Buffer Prompt, Prev: The Simple Prompt, Up: Using the Prompt
The Buffer Prompt
-----------------
This type of prompt is more sophisticated. It creates a new buffer
for you to type your response into (called `*prompt*'), the title of the
prompt is displayed in the buffer's first line.
Normally you type the answer to the prompt into the buffer and then
press the RET key. All normal editor commands are available while you
are using the prompt, you can switch buffers, load new files, whatever
you like.
Another advantage of this type of prompt is that it supports
"completion", this allows you to type the beginning of your response
then press the TAB key. What you have typed will be matched against the
list of responses that the editor has (i.e. when being prompted for the
name of a file it will be matched against all available files), if a
unique match is found your response will be completed to that match.
If several potential completions are found, these will be displayed
after the line `::Completions::' in the buffer and your response will
only be completed as far as the potential completions are similar. For
example, if you enter `fo' then press TAB and files called `foo' and
`foobar' exist, the contents of the prompt will become `foo'.
Completion is provided for many different things, some are: files,
buffers, symbols, functions, variables, Info nodes, etc...
The special commands for this type of prompt are,
`TAB'
`RMB-CLICK1'
Complete the contents of the prompt. If more than one potential
completion exists they are printed in the buffer.
`RET'
`LMB-CLICK2'
Enter the result of this prompt. If you invoke this command while
the cursor is on a printed potential completion (those under the
`::Completions::' line) the whole line will be entered. Otherwise,
just the text to the left of the cursor is entered.
`Meta-?'
Print all possible completions of the current prompt but do not
try to actually change the contents of the prompt.
`Ctrl-g'
Cancel the prompt.