1 This is ../info/xemacs.info, produced by makeinfo version 4.0 from
4 INFO-DIR-SECTION XEmacs Editor
6 * XEmacs: (xemacs). XEmacs Editor.
9 This file documents the XEmacs editor.
11 Copyright (C) 1985, 1986, 1988 Richard M. Stallman. Copyright (C)
12 1991, 1992, 1993, 1994 Lucid, Inc. Copyright (C) 1993, 1994 Sun
13 Microsystems, Inc. Copyright (C) 1995 Amdahl Corporation.
15 Permission is granted to make and distribute verbatim copies of this
16 manual provided the copyright notice and this permission notice are
17 preserved on all copies.
19 Permission is granted to copy and distribute modified versions of
20 this manual under the conditions for verbatim copying, provided also
21 that the sections entitled "The GNU Manifesto", "Distribution" and "GNU
22 General Public License" are included exactly as in the original, and
23 provided that the entire resulting derived work is distributed under the
24 terms of a permission notice identical to this one.
26 Permission is granted to copy and distribute translations of this
27 manual into another language, under the above conditions for modified
28 versions, except that the sections entitled "The GNU Manifesto",
29 "Distribution" and "GNU General Public License" may be included in a
30 translation approved by the author instead of in the original English.
33 File: xemacs.info, Node: Using Packages, Next: Building Packages, Prev: Package Terminology, Up: Packages
38 When you first download XEmacs 21, you will usually first grab the
39 "core distribution", a file called `xemacs-21.0.tar.gz'. (Replace the
40 21.0 by the current version number.) The core distribution contains
41 the sources of XEmacs and a minimal set of Emacs Lisp files, which are
42 in the subdirectory named `lisp'. This subdirectory used to contain
43 all Emacs Lisp files distributed with XEmacs. Now, to conserve disk
44 space, most non-essential packages were made optional.
46 Choosing the Packages You Need
47 ------------------------------
49 The available packages can currently be found in the same ftp
50 directory where you grabbed the core distribution from, and are located
51 in the subdirectory `packages/binary-packages'. Package file names
52 follow the naming convention `<package-name>-<version>-pkg.tar.gz'.
54 If you have EFS *Note (EFS)::, packages can be installed over the
55 network. Alternatively, if you have copies of the packages locally,
56 you can install packages from a local disk or CDROM.
58 The file `etc/PACKAGES' in the core distribution contains a list of
59 the packages available at the time of the XEmacs release. Packages are
60 also listed on the `Options' menu under:
62 Options->Customize->Emacs->Packages
64 However, don't select any of these menu picks unless you actually
65 want to install the given package (and have properly configured your
68 You can also get a list of available packages, and whether or not
69 they are installed, using the visual package browser and installer.
70 You can access it via the menus:
72 Options->Manage Packages->List & Install
74 Or, you can get to it via the keyboard:
78 Hint to system administrators of multi-user systems: it might be a
79 good idea to install all packages and not interfere with the wishes of
82 If you can't find which package provides the feature you require, try
83 using the `package-get-package-provider' function. Eg., if you know
84 that you need `thingatpt', type:
86 M-x package-get-package-provider RET thingatpt
88 which will return something like (fsf-compat "1.06"). You can the use
89 one of the methods above for installing the package you want.
91 XEmacs and Installing Packages
92 ------------------------------
94 Normally, packages are installed over the network, using EFS *Note
95 (EFS)::. However, you may not have network access, or you may already
96 have some or all of the packages on a local disk, such as a CDROM. If
97 you want to install from a local disk, you must first tell XEmacs where
98 to find the package binaries. This is done by adding a line like the
99 following to your `.emacs' file:
101 (setq package-get-remote (cons (list nil "/my/path/to/package/binaries")
104 Here, you'd change `/my/path/to/package/binaries' to be the path to
105 your local package binaries. Next, restart XEmacs, and you're ready to
106 go (advanced users can just re-evaluate the sexp).
108 If you are installing from a temporary, one-time directory, you can
109 also add these directory names to `package-get-remote' using:
111 M-x pui-add-install-directory
113 Note, however, that any directories added using this function are not
114 saved; this information will be lost when you quit XEmacs.
116 If you're going to install over the network, you only have to insure
117 that EFS *Note (EFS):: works, and that it can get outside a firewall, if
118 you happen to be behind one. You shouldn't have to do anything else;
119 XEmacs already knows where to go. However you can add your own mirrors
120 to this list. See `package-get-remote'.
122 The easiest way to install a package is to use the visual package
123 browser and installer, using the menu pick:
125 Options->Manage Packages->List & Install
127 Options->Manage Packages->Using Custom->Select-> ...
129 You can also access it using the keyboard:
131 M-x pui-list-packages
133 The visual package browser will then display a list of all packages.
134 Help information will be displayed at the very bottom of the buffer; you
135 may have to scroll down to see it. You can also press `?' to get the
136 same help. From this buffer, you can tell the package status by the
137 character in the first column:
140 The package has not been installed.
143 The package has been installed, but a newer version is available.
144 The current version is out-of-date.
147 The package has been marked for installation/update.
149 If there is no character in the first column, the package has been
150 installed and is up-to-date.
152 From here, you can select or unselect packages for installation using
153 the <RET> key, the `Mouse-2' button or selecting "Select" from the
154 (Popup) Menu. Once you've finished selecting the packages, you can
155 press the `x' key (or use the menu) to actually install the packages.
156 Note that you will have to restart XEmacs for XEmacs to recognize any
166 Toggle between selecting and unselecting a package for
170 Install selected packages.
173 View, in the minibuffer, additional information about the package,
174 such as the package date (not the build date) and the package
175 author. Moving the mouse over a package name will also do the
179 Toggle between verbose and non-verbose package display.
182 Refresh the package display.
185 Kill the package buffer.
187 Moving the mouse over a package will also cause additional
188 information about the package to be displayed in the minibuffer.
190 Other package installation interfaces
191 -------------------------------------
193 For an alternative package interface, you can select packages from
194 the customize menus, under:
196 Options->Customize->Emacs->Packages-> ...
198 Options->Manage Packages->Using Custom->Select-> ...
200 Set their state to on, and then do:
202 Options->Manage Packages->Using Custom->Update Packages
204 This will automatically retrieve the packages you have selected from
205 the XEmacs ftp site or your local disk, and install them into XEmacs.
206 Additionally it will update any packages you already have installed to
207 the newest version. Note that if a package is newly installed you will
208 have to restart XEmacs for the change to take effect.
210 You can also install packages using a semi-manual interface:
212 M-x package-get-all <return>
214 Enter the name of the package (e.g., `prog-modes'), and XEmacs will
215 search for the latest version (as listed in the lisp file
216 `lisp/package-get-base.el'), and install it and any packages that it
219 Manual Binary Package Installation
220 ----------------------------------
222 Pre-compiled, binary packages can be installed in either a system
223 package directory (this is determined when XEmacs is compiled), or in
224 one of the following subdirectories of your `$HOME' directory:
226 ~/.xemacs/mule-packages
227 ~/.xemacs/xemacs-packages
229 Packages in the former directory will only be found by a Mule-enabled
232 XEmacs does not have to be running to install binary packages,
233 although XEmacs will not know about any newly-installed packages until
234 you restart XEmacs. Note, however, that installing a newer version of a
235 package while XEmacs is running could cause strange errors in XEmacs;
236 it's best to exit XEmacs before upgrading an existing package.
238 To install binary packages manually:
240 1. Download the package(s) that you want to install. Each binary
241 package will typically be a gzip'd tarball.
243 2. Decide where to install the packages: in the system package
244 directory, or in `~/.xemacs/mule-packages' or
245 `~/.xemacs/xemacs-packages', respectively. If you want to install
246 the packages in the system package directory, make sure you can
247 write into that directory. If you want to install in your `$HOME'
248 directory, create the directory, `~/.xemacs/mule-packages' or
249 `~/.xemacs/xemacs-packages', respectively.
251 3. Next, `cd' to the directory under which you want to install the
254 4. From this directory, uncompress and extract each of the gzip'd
255 tarballs that you downloaded in step 1. Unix and Cygnus cygwin
256 users will typically do this using the commands:
258 gunzip < package.tar.gz | tar xvf -
260 Above, replace `package.tar.gz' with the filename of the package
261 that you downloaded in step 1.
263 Of course, if you use GNU `tar', you could also use:
265 tar xvzf package.tar.gz
267 5. That's it. Quit and restart XEmacs to get it to recognize any new
272 File: xemacs.info, Node: Building Packages, Prev: Using Packages, Up: Packages
274 Source packages are available from the `packages/source-packages'
275 subdirectory of your favorite XEmacs distribution site. Alternatively,
276 they are available via CVS from `cvs.xemacs.org'. Look at
277 `http://cvs.xemacs.org' for instructions.
279 Prerequisites for Building Source Packages
280 ------------------------------------------
282 You must have GNU `cp', GNU `install' (or a BSD compatible `install'
283 program) GNU `make' (3.75 or later preferred), `makeinfo' (1.68 from
284 `texinfo-3.11' or later required), GNU `tar' and XEmacs 21.0. The
285 source packages will untar into a correct directory structure. At the
286 top level you must have `XEmacs.rules' and `package-compile.el'. These
287 files are available from the XEmacs FTP site from the same place you
288 obtained your source package distributions.
290 What You Can Do With Source Packages
291 ------------------------------------
293 NB: A global build operation doesn't exist yet as of 13 January
296 Source packages are most useful for creating XEmacs package tarballs
297 for installation into your own XEmacs installations or for distributing
300 Supported operations from `make' are:
303 Remove all built files except `auto-autoloads.el' and
307 Remove XEmacs backups as well as the files deleted by `make clean'.
310 Bytecompile all files, build and bytecompile byproduct files like
311 `auto-autoloads.el' and `custom-load.el'. Create info version of
312 TeXinfo documentation if present.
315 Usually aliased to `make srckit-std'. This does a `make
316 distclean' and creates a package source tarball in the staging
317 directory. This is generally only of use for package maintainers.
320 May be aliased to `binkit-sourceonly', `binkit-sourceinfo',
321 `binkit-sourcedata', or `binkit-sourcedatainfo'. `sourceonly'
322 indicates there is nothing to install in a data directory or info
323 directory. `sourceinfo' indicates that source and info files are
324 to be installed. `sourcedata' indicates that source and etc
325 (data) files are to be installed. `sourcedatainfo' indicates
326 source, etc (data), and info files are to be installed. A few
327 packages have needs beyond the basic templates so this is not yet
331 Runs the rules `srckit' followed by `binkit'. This is primarily
332 of use by XEmacs maintainers producing files for distribution.
335 File: xemacs.info, Node: Abbrevs, Next: Picture, Prev: Packages, Up: Top
340 An "abbrev" is a word which "expands" into some different text.
341 Abbrevs are defined by the user to expand in specific ways. For
342 example, you might define `foo' as an abbrev expanding to `find outer
343 otter'. With this abbrev defined, you would be able to get `find outer
344 otter ' into the buffer by typing `f o o <SPC>'.
346 Abbrevs expand only when Abbrev mode (a minor mode) is enabled.
347 Disabling Abbrev mode does not cause abbrev definitions to be discarded,
348 but they do not expand until Abbrev mode is enabled again. The command
349 `M-x abbrev-mode' toggles Abbrev mode; with a numeric argument, it
350 turns Abbrev mode on if the argument is positive, off otherwise. *Note
351 Minor Modes::. `abbrev-mode' is also a variable; Abbrev mode is on
352 when the variable is non-`nil'. The variable `abbrev-mode'
353 automatically becomes local to the current buffer when it is set.
355 Abbrev definitions can be "mode-specific"--active only in one major
356 mode. Abbrevs can also have "global" definitions that are active in
357 all major modes. The same abbrev can have a global definition and
358 various mode-specific definitions for different major modes. A
359 mode-specific definition for the current major mode overrides a global
362 You can define Abbrevs interactively during an editing session. You
363 can also save lists of abbrev definitions in files and reload them in
364 later sessions. Some users keep extensive lists of abbrevs that they
365 load in every session.
367 A second kind of abbreviation facility is called the "dynamic
368 expansion". Dynamic abbrev expansion happens only when you give an
369 explicit command and the result of the expansion depends only on the
370 current contents of the buffer. *Note Dynamic Abbrevs::.
374 * Defining Abbrevs:: Defining an abbrev, so it will expand when typed.
375 * Expanding Abbrevs:: Controlling expansion: prefixes, canceling expansion.
376 * Editing Abbrevs:: Viewing or editing the entire list of defined abbrevs.
377 * Saving Abbrevs:: Saving the entire list of abbrevs for another session.
378 * Dynamic Abbrevs:: Abbreviations for words already in the buffer.
381 File: xemacs.info, Node: Defining Abbrevs, Next: Expanding Abbrevs, Prev: Abbrevs, Up: Abbrevs
387 Define an abbrev to expand into some text before point
388 (`add-global-abbrev').
391 Similar, but define an abbrev available only in the current major
392 mode (`add-mode-abbrev').
395 Define a word in the buffer as an abbrev
396 (`inverse-add-global-abbrev').
399 Define a word in the buffer as a mode-specific abbrev
400 (`inverse-add-mode-abbrev').
402 `M-x kill-all-abbrevs'
403 After this command, no abbrev definitions remain in effect.
405 The usual way to define an abbrev is to enter the text you want the
406 abbrev to expand to, position point after it, and type `C-x a g'
407 (`add-global-abbrev'). This reads the abbrev itself using the
408 minibuffer, and then defines it as an abbrev for one or more words
409 before point. Use a numeric argument to say how many words before point
410 should be taken as the expansion. For example, to define the abbrev
411 `foo' as in the example above, insert the text `find outer otter', then
413 `C-u 3 C-x a g f o o <RET>'.
415 An argument of zero to `C-x a g' means to use the contents of the
416 region as the expansion of the abbrev being defined.
418 The command `C-x a l' (`add-mode-abbrev') is similar, but defines a
419 mode-specific abbrev. Mode-specific abbrevs are active only in a
420 particular major mode. `C-x a l' defines an abbrev for the major mode
421 in effect at the time `C-x a l' is typed. The arguments work the same
422 way they do for `C-x a g'.
424 If the text of an abbrev you want is already in the buffer instead of
425 the expansion, use command `C-x a i g' (`inverse-add-global-abbrev')
426 instead of `C-x a g', or use `C-x a i l' (`inverse-add-mode-abbrev')
427 instead of `C-x a l'. These commands are called "inverse" because they
428 invert the meaning of the argument found in the buffer and the argument
429 read using the minibuffer.
431 To change the definition of an abbrev, just add the new definition.
432 You will be asked to confirm if the abbrev has a prior definition. To
433 remove an abbrev definition, give a negative argument to `C-x a g' or
434 `C-x a l'. You must choose the command to specify whether to kill a
435 global definition or a mode-specific definition for the current mode,
436 since those two definitions are independent for one abbrev.
438 `M-x kill-all-abbrevs' removes all existing abbrev definitions.
441 File: xemacs.info, Node: Expanding Abbrevs, Next: Editing Abbrevs, Prev: Defining Abbrevs, Up: Abbrevs
443 Controlling Abbrev Expansion
444 ============================
446 An abbrev expands whenever it is in a buffer just before point and
447 you type a self-inserting punctuation character (<SPC>, comma, etc.).
448 Most often an abbrev is used by inserting the abbrev followed by
451 Abbrev expansion preserves case; thus, `foo' expands into `find
452 outer otter', `Foo' into `Find outer otter', and `FOO' into `FIND OUTER
453 OTTER' or `Find Outer Otter' according to the variable
454 `abbrev-all-caps' (a non-`nil' value chooses the first of the two
457 Two commands are available to control abbrev expansion:
460 Separate a prefix from a following abbrev to be expanded
461 (`abbrev-prefix-mark').
464 Expand the abbrev before point (`expand-abbrev'). This is
465 effective even when Abbrev mode is not enabled.
467 `M-x unexpand-abbrev'
468 Undo last abbrev expansion.
470 `M-x expand-region-abbrevs'
471 Expand some or all abbrevs found in the region.
473 You may wish to expand an abbrev with a prefix attached. For
474 example, if `cnst' expands into `construction', you may want to use it
475 to enter `reconstruction'. It does not work to type `recnst', because
476 that is not necessarily a defined abbrev. Instead, you can use the
477 command `M-'' (`abbrev-prefix-mark') between the prefix `re' and the
478 abbrev `cnst'. First, insert `re'. Then type `M-''; this inserts a
479 minus sign in the buffer to indicate that it has done its work. Then
480 insert the abbrev `cnst'. The buffer now contains `re-cnst'. Now
481 insert a punctuation character to expand the abbrev `cnst' into
482 `construction'. The minus sign is deleted at this point by `M-''. The
483 resulting text is the desired `reconstruction'.
485 If you actually want the text of the abbrev in the buffer, rather
486 than its expansion, insert the following punctuation with `C-q'. Thus,
487 `foo C-q -' leaves `foo-' in the buffer.
489 If you expand an abbrev by mistake, you can undo the expansion
490 (replace the expansion by the original abbrev text) with `M-x
491 unexpand-abbrev'. You can also use `C-_' (`undo') to undo the
492 expansion; but that will first undo the insertion of the punctuation
495 `M-x expand-region-abbrevs' searches through the region for defined
496 abbrevs, and offers to replace each one it finds with its expansion.
497 This command is useful if you have typed text using abbrevs but forgot
498 to turn on Abbrev mode first. It may also be useful together with a
499 special set of abbrev definitions for making several global
500 replacements at once. The command is effective even if Abbrev mode is
504 File: xemacs.info, Node: Editing Abbrevs, Next: Saving Abbrevs, Prev: Expanding Abbrevs, Up: Abbrevs
506 Examining and Editing Abbrevs
507 =============================
510 Print a list of all abbrev definitions.
513 Edit a list of abbrevs; you can add, alter, or remove definitions.
515 The output from `M-x list-abbrevs' looks like this:
517 (lisp-mode-abbrev-table)
519 (global-abbrev-table)
522 (Some blank lines of no semantic significance, and some other abbrev
523 tables, have been omitted.)
525 A line containing a name in parentheses is the header for abbrevs in
526 a particular abbrev table; `global-abbrev-table' contains all the global
527 abbrevs, and the other abbrev tables that are named after major modes
528 contain the mode-specific abbrevs.
530 Within each abbrev table, each non-blank line defines one abbrev.
531 The word at the beginning is the abbrev. The number that appears is
532 the number of times the abbrev has been expanded. Emacs keeps track of
533 this to help you see which abbrevs you actually use, in case you want
534 to eliminate those that you don't use often. The string at the end of
535 the line is the expansion.
537 `M-x edit-abbrevs' allows you to add, change or kill abbrev
538 definitions by editing a list of them in an Emacs buffer. The list has
539 the format described above. The buffer of abbrevs is called
540 `*Abbrevs*', and is in Edit-Abbrevs mode. This mode redefines the key
541 `C-c C-c' to install the abbrev definitions as specified in the buffer.
542 The `edit-abbrevs-redefine' command does this. Any abbrevs not
543 described in the buffer are eliminated when this is done.
545 `edit-abbrevs' is actually the same as `list-abbrevs', except that
546 it selects the buffer `*Abbrevs*' whereas `list-abbrevs' merely
547 displays it in another window.
550 File: xemacs.info, Node: Saving Abbrevs, Next: Dynamic Abbrevs, Prev: Editing Abbrevs, Up: Abbrevs
555 These commands allow you to keep abbrev definitions between editing
558 `M-x write-abbrev-file'
559 Write a file describing all defined abbrevs.
561 `M-x read-abbrev-file'
562 Read such an abbrev file and define abbrevs as specified there.
564 `M-x quietly-read-abbrev-file'
565 Similar, but do not display a message about what is going on.
568 Define abbrevs from buffer.
571 Insert all abbrevs and their expansions into the buffer.
573 Use `M-x write-abbrev-file' to save abbrev definitions for use in a
574 later session. The command reads a file name using the minibuffer and
575 writes a description of all current abbrev definitions into the
576 specified file. The text stored in the file looks like the output of
579 `M-x read-abbrev-file' prompts for a file name using the minibuffer
580 and reads the specified file, defining abbrevs according to its
581 contents. `M-x quietly-read-abbrev-file' is the same but does not
582 display a message in the echo area; it is actually useful primarily in
583 the `.emacs' file. If you give an empty argument to either of these
584 functions, the file name Emacs uses is the value of the variable
585 `abbrev-file-name', which is by default `"~/.abbrev_defs"'.
587 Emacs offers to save abbrevs automatically if you have changed any of
588 them, whenever it offers to save all files (for `C-x s' or `C-x C-c').
589 Set the variable `save-abbrevs' to `nil' to inhibit this feature.
591 The commands `M-x insert-abbrevs' and `M-x define-abbrevs' are
592 similar to the previous commands but work on text in an Emacs buffer.
593 `M-x insert-abbrevs' inserts text into the current buffer before point,
594 describing all current abbrev definitions; `M-x define-abbrevs' parses
595 the entire current buffer and defines abbrevs accordingly.
598 File: xemacs.info, Node: Dynamic Abbrevs, Prev: Saving Abbrevs, Up: Abbrevs
600 Dynamic Abbrev Expansion
601 ========================
603 The abbrev facility described above operates automatically as you
604 insert text, but all abbrevs must be defined explicitly. By contrast,
605 "dynamic abbrevs" allow the meanings of abbrevs to be determined
606 automatically from the contents of the buffer, but dynamic abbrev
607 expansion happens only when you request it explicitly.
610 Expand the word in the buffer before point as a "dynamic abbrev",
611 by searching in the buffer for words starting with that
612 abbreviation (`dabbrev-expand').
614 For example, if the buffer contains `does this follow ' and you type
615 `f o M-/', the effect is to insert `follow' because that is the last
616 word in the buffer that starts with `fo'. A numeric argument to `M-/'
617 says to take the second, third, etc. distinct expansion found looking
618 backward from point. Repeating `M-/' searches for an alternative
619 expansion by looking farther back. After the entire buffer before
620 point has been considered, the buffer after point is searched.
622 Dynamic abbrev expansion is completely independent of Abbrev mode;
623 the expansion of a word with `M-/' is completely independent of whether
624 it has a definition as an ordinary abbrev.
627 File: xemacs.info, Node: Picture, Next: Sending Mail, Prev: Abbrevs, Up: Top
632 If you want to create a picture made out of text characters (for
633 example, a picture of the division of a register into fields, as a
634 comment in a program), use the command `edit-picture' to enter Picture
637 In Picture mode, editing is based on the "quarter-plane" model of
638 text. In this model, the text characters lie studded on an area that
639 stretches infinitely far to the right and downward. The concept of the
640 end of a line does not exist in this model; the most you can say is
641 where the last non-blank character on the line is found.
643 Of course, Emacs really always considers text as a sequence of
644 characters, and lines really do have ends. But in Picture mode most
645 frequently-used keys are rebound to commands that simulate the
646 quarter-plane model of text. They do this by inserting spaces or by
647 converting tabs to spaces.
649 Most of the basic editing commands of Emacs are redefined by Picture
650 mode to do essentially the same thing but in a quarter-plane way. In
651 addition, Picture mode defines various keys starting with the `C-c'
652 prefix to run special picture editing commands.
654 One of these keys, `C-c C-c', is pretty important. Often a picture
655 is part of a larger file that is usually edited in some other major
656 mode. `M-x edit-picture' records the name of the previous major mode.
657 You can then use the `C-c C-c' command (`picture-mode-exit') to restore
658 that mode. `C-c C-c' also deletes spaces from the ends of lines,
659 unless you give it a numeric argument.
661 The commands used in Picture mode all work in other modes (provided
662 the `picture' library is loaded), but are only bound to keys in
663 Picture mode. Note that the descriptions below talk of moving "one
664 column" and so on, but all the picture mode commands handle numeric
665 arguments as their normal equivalents do.
667 Turning on Picture mode calls the value of the variable
668 `picture-mode-hook' as a function, with no arguments, if that value
669 exists and is non-`nil'.
673 * Basic Picture:: Basic concepts and simple commands of Picture Mode.
674 * Insert in Picture:: Controlling direction of cursor motion
675 after "self-inserting" characters.
676 * Tabs in Picture:: Various features for tab stops and indentation.
677 * Rectangles in Picture:: Clearing and superimposing rectangles.
680 File: xemacs.info, Node: Basic Picture, Next: Insert in Picture, Prev: Picture, Up: Picture
682 Basic Editing in Picture Mode
683 =============================
685 Most keys do the same thing in Picture mode that they usually do,
686 but do it in a quarter-plane style. For example, `C-f' is rebound to
687 run `picture-forward-column', which moves point one column to the
688 right, by inserting a space if necessary, so that the actual end of the
689 line makes no difference. `C-b' is rebound to run
690 `picture-backward-column', which always moves point left one column,
691 converting a tab to multiple spaces if necessary. `C-n' and `C-p' are
692 rebound to run `picture-move-down' and `picture-move-up', which can
693 either insert spaces or convert tabs as necessary to make sure that
694 point stays in exactly the same column. `C-e' runs
695 `picture-end-of-line', which moves to after the last non-blank
696 character on the line. There was no need to change `C-a', as the choice
697 of screen model does not affect beginnings of lines.
699 Insertion of text is adapted to the quarter-plane screen model
700 through the use of Overwrite mode (*note Minor Modes::).
701 Self-inserting characters replace existing text, column by column,
702 rather than pushing existing text to the right. <RET> runs
703 `picture-newline', which just moves to the beginning of the following
704 line so that new text will replace that line.
706 Text is erased instead of deleted and killed. <DEL>
707 (`picture-backward-clear-column') replaces the preceding character with
708 a space rather than removing it. `C-d' (`picture-clear-column') does
709 the same in a forward direction. `C-k' (`picture-clear-line') really
710 kills the contents of lines, but never removes the newlines from a
713 To do actual insertion, you must use special commands. `C-o'
714 (`picture-open-line') creates a blank line, but does so after the
715 current line; it never splits a line. `C-M-o', `split-line', makes
716 sense in Picture mode, so it remains unchanged. <LFD>
717 (`picture-duplicate-line') inserts another line with the same contents
718 below the current line.
720 To actually delete parts of the picture, use `C-w', or with `C-c
721 C-d' (which is defined as `delete-char', as `C-d' is in other modes),
722 or with one of the picture rectangle commands (*note Rectangles in
726 File: xemacs.info, Node: Insert in Picture, Next: Tabs in Picture, Prev: Basic Picture, Up: Picture
728 Controlling Motion After Insert
729 ===============================
731 Since "self-inserting" characters just overwrite and move point in
732 Picture mode, there is no essential restriction on how point should be
733 moved. Normally point moves right, but you can specify any of the eight
734 orthogonal or diagonal directions for motion after a "self-inserting"
735 character. This is useful for drawing lines in the buffer.
738 Move left after insertion (`picture-movement-left').
741 Move right after insertion (`picture-movement-right').
744 Move up after insertion (`picture-movement-up').
747 Move down after insertion (`picture-movement-down').
750 Move up and left ("northwest") after insertion
751 (`picture-movement-nw').
754 Move up and right ("northeast") after insertion
755 (`picture-movement-ne').
758 Move down and left ("southwest") after insertion
759 (`picture-movement-sw').
762 Move down and right ("southeast") after insertion
763 (`picture-movement-se').
765 Two motion commands move based on the current Picture insertion
766 direction. The command `C-c C-f' (`picture-motion') moves in the same
767 direction as motion after "insertion" currently does, while `C-c C-b'
768 (`picture-motion-reverse') moves in the opposite direction.
771 File: xemacs.info, Node: Tabs in Picture, Next: Rectangles in Picture, Prev: Insert in Picture, Up: Picture
776 Two kinds of tab-like action are provided in Picture mode.
777 Context-based tabbing is done with `M-<TAB>' (`picture-tab-search').
778 With no argument, it moves to a point underneath the next "interesting"
779 character that follows whitespace in the previous non-blank line.
780 "Next" here means "appearing at a horizontal position greater than the
781 one point starts out at". With an argument, as in `C-u M-<TAB>', the
782 command moves to the next such interesting character in the current
783 line. `M-<TAB>' does not change the text; it only moves point.
784 "Interesting" characters are defined by the variable
785 `picture-tab-chars', which contains a string of characters considered
786 interesting. Its default value is `"!-~"'.
788 <TAB> itself runs `picture-tab', which operates based on the current
789 tab stop settings; it is the Picture mode equivalent of
790 `tab-to-tab-stop'. Without arguments it just moves point, but with a
791 numeric argument it clears the text that it moves over.
793 The context-based and tab-stop-based forms of tabbing are brought
794 together by the command `C-c <TAB>' (`picture-set-tab-stops'.) This
795 command sets the tab stops to the positions which `M-<TAB>' would
796 consider significant in the current line. If you use this command with
797 <TAB>, you can get the effect of context-based tabbing. But `M-<TAB>'
798 is more convenient in the cases where it is sufficient.
801 File: xemacs.info, Node: Rectangles in Picture, Prev: Tabs in Picture, Up: Picture
803 Picture Mode Rectangle Commands
804 ===============================
806 Picture mode defines commands for working on rectangular pieces of
807 the text in ways that fit with the quarter-plane model. The standard
808 rectangle commands may also be useful (*note Rectangles::).
811 Clear out the region-rectangle (`picture-clear-rectangle'). With
815 Similar but save rectangle contents in register R first
816 (`picture-clear-rectangle-to-register').
819 Copy last killed rectangle into the buffer by overwriting, with
820 upper left corner at point (`picture-yank-rectangle'). With
821 argument, insert instead.
824 Similar, but use the rectangle in register R
825 (`picture-yank-rectangle-from-register').
827 The picture rectangle commands `C-c C-k' (`picture-clear-rectangle')
828 and `C-c C-w' (`picture-clear-rectangle-to-register') differ from the
829 standard rectangle commands in that they normally clear the rectangle
830 instead of deleting it; this is analogous with the way `C-d' is changed
833 However, deletion of rectangles can be useful in Picture mode, so
834 these commands delete the rectangle if given a numeric argument.
836 The Picture mode commands for yanking rectangles differ from the
837 standard ones in overwriting instead of inserting. This is the same
838 way that Picture mode insertion of other text is different from other
839 modes. `C-c C-y' (`picture-yank-rectangle') inserts (by overwriting)
840 the rectangle that was most recently killed, while `C-c C-x'
841 (`picture-yank-rectangle-from-register') does for the rectangle found
842 in a specified register.
844 Since most region commands in Picture mode operate on rectangles,
845 when you select a region of text with the mouse in Picture mode, it is
846 highlighted as a rectangle.
849 File: xemacs.info, Node: Sending Mail, Next: Reading Mail, Prev: Picture, Up: Top
854 To send a message in Emacs, start by typing the command (`C-x m') to
855 select and initialize the `*mail*' buffer. You can then edit the text
856 and headers of the message in the mail buffer, and type the command
857 (`C-c C-c') to send the message.
860 Begin composing a message to send (`mail').
863 Likewise, but display the message in another window
864 (`mail-other-window').
867 In Mail mode, send the message and switch to another buffer
868 (`mail-send-and-exit').
870 The command `C-x m' (`mail') selects a buffer named `*mail*' and
871 initializes it with the skeleton of an outgoing message. `C-x 4 m'
872 (`mail-other-window') selects the `*mail*' buffer in a different
873 window, leaving the previous current buffer visible.
875 Because the buffer for mail composition is an ordinary Emacs buffer,
876 you can switch to other buffers while in the middle of composing mail,
877 and switch back later (or never). If you use the `C-x m' command again
878 when you have been composing another message but have not sent it, a
879 new mail buffer will be created; in this way, you can compose multiple
880 messages at once. You can switch back to and complete an unsent
881 message by using the normal buffer selection mechanisms.
883 `C-u C-x m' is another way to switch back to a message in progress:
884 it will search for an existing, unsent mail message buffer and select
889 * Format: Mail Format. Format of the mail being composed.
890 * Headers: Mail Headers. Details of allowed mail header fields.
891 * Mode: Mail Mode. Special commands for editing mail being composed.
894 File: xemacs.info, Node: Mail Format, Next: Mail Headers, Prev: Sending Mail, Up: Sending Mail
896 The Format of the Mail Buffer
897 =============================
899 In addition to the "text" or contents, a message has "header
900 fields", which say who sent it, when, to whom, why, and so on. Some
901 header fields, such as the date and sender, are created automatically
902 after the message is sent. Others, such as the recipient names, must
903 be specified by you in order to send the message properly.
905 Mail mode provides a few commands to help you edit some header
906 fields, and some are preinitialized in the buffer automatically at
907 times. You can insert or edit any header fields using ordinary editing
910 The line in the buffer that says:
912 --text follows this line--
914 is a special delimiter that separates the headers you have specified
915 from the text. Whatever follows this line is the text of the message;
916 the headers precede it. The delimiter line itself does not appear in
917 the message actually sent. The text used for the delimiter line is
918 controlled by the variable `mail-header-separator'.
920 Here is an example of what the headers and text in the `*mail*'
921 buffer might look like.
925 Subject: The XEmacs User's Manual
926 --Text follows this line--
927 Please ignore this message.
930 File: xemacs.info, Node: Mail Headers, Next: Mail Mode, Prev: Mail Format, Up: Sending Mail
935 There are several header fields you can use in the `*mail*' buffer.
936 Each header field starts with a field name at the beginning of a line,
937 terminated by a colon. It does not matter whether you use upper or
938 lower case in the field name. After the colon and optional whitespace
939 comes the contents of the field.
942 This field contains the mailing addresses of the message.
945 The contents of the `Subject' field should be a piece of text that
946 says what the message is about. Subject fields are useful because
947 most mail-reading programs can provide a summary of messages,
948 listing the subject of each message but not its text.
951 This field contains additional mailing addresses to send the
952 message to, but whose readers should not regard the message as
956 This field contains additional mailing addresses to send the
957 message to, but which should not appear in the header of the
958 message actually sent.
961 This field contains the name of one file (in Unix mail file
962 format) to which a copy of the message should be appended when the
966 Use the `From' field to say who you are, when the account you are
967 using to send the mail is not your own. The contents of the
968 `From' field should be a valid mailing address, since replies will
972 Use the `Reply-To' field to direct replies to a different address,
973 not your own. `From' and `Reply-To' have the same effect on where
974 replies go, but they convey a different meaning to the person who
978 This field contains a piece of text describing a message you are
979 replying to. Some mail systems can use the information to
980 correlate related pieces of mail. This field is normally filled
981 in by your mail handling package when you are replying to a
982 message and you never need to think about it.
984 The `To', `CC', `BCC' and `FCC' fields can appear any number of times,
985 to specify many places to send the message.
987 The `To', `CC', and `BCC', fields can have continuation lines. All the
988 lines starting with whitespace, following the line on which the field
989 starts, are considered part of the field. For example,
991 To: foo@here, this@there,
992 me@gnu.cambridge.mass.usa.earth.spiral3281
994 If you have a `~/.mailrc' file, Emacs scans it for mail aliases the
995 first time you try to send mail in an Emacs session. Emacs expands
996 aliases found in the `To', `CC', and `BCC' fields where appropriate.
997 You can set the variable `mail-abbrev-mailrc-file' to the name of the
998 file with mail aliases. If `nil', `~/.mailrc' is used.
1000 Your `.mailrc' file ensures that word-abbrevs are defined for each
1001 of your mail aliases when point is in a `To', `CC', `BCC', or `From'
1002 field. The aliases are defined in your `.mailrc' file or in a file
1003 specified by the MAILRC environment variable if it exists. Your mail
1004 aliases expand any time you type a word-delimiter at the end of an
1007 In this version of Emacs, what you see is what you get: in contrast
1008 to some other versions, no abbreviations are expanded after you have
1009 sent the mail. This means you don't suffer the annoyance of having the
1010 system do things behind your back--if the system rewrites an address
1011 you typed, you know it immediately, instead of after the mail has been
1012 sent and it's too late to do anything about it. For example, you will
1013 never again be in trouble because you forgot to delete an old alias
1014 from your `.mailrc' and a new local user is given a userid which
1015 conflicts with one of your aliases.
1017 Your mail alias abbrevs are in effect only when point is in an
1018 appropriate header field. The mail aliases will not expand in the body
1019 of the message, or in other header fields. The default mode-specific
1020 abbrev table `mail-mode-abbrev-table' is used instead if defined. That
1021 means if you have been using mail-mode specific abbrevs, this code will
1022 not adversely affect you. You can control which header fields the
1023 abbrevs are used in by changing the variable `mail-abbrev-mode-regexp'.
1025 If auto-fill mode is on, abbrevs wrap at commas instead of at word
1026 boundaries, and header continuation lines will be properly indented.
1028 You can also insert a mail alias with
1029 `mail-interactive-insert-alias'. This function, which is bound to `C-c
1030 C-a', prompts you for an alias (with completion) and inserts its
1033 In this version of Emacs, it is possible to have lines like the
1034 following in your `.mailrc' file:
1036 alias someone "John Doe <doe@quux.com>"
1038 That is, if you want an address to have embedded spaces, simply
1039 surround it with double-quotes. The quotes are necessary because the
1040 format of the `.mailrc' file uses spaces as address delimiters.
1042 Aliases in the `.mailrc' file may be nested. For example, assume you
1043 define aliases like:
1044 alias group1 fred ethel
1045 alias group2 larry curly moe
1046 alias everybody group1 group2
1048 When you now type `everybody' on the `To' line, it will expand to:
1049 fred, ethyl, larry, curly, moe
1051 Aliases may contain forward references; the alias of `everybody' in
1052 the example above can precede the aliases of `group1' and `group2'.
1054 In this version of Emacs, you can use the `source' `.mailrc' command
1055 for reading aliases from some other file as well.
1057 Aliases may contain hyphens, as in `"alias foo-bar foo@bar"', even
1058 though word-abbrevs normally cannot contain hyphens.
1060 To read in the contents of another `.mailrc'-type file from Emacs,
1061 use the command `M-x merge-mail-aliases'. The `rebuild-mail-aliases'
1062 command is similar, but deletes existing aliases first.
1064 If you want multiple addresses separated by a string other than `,'
1065 (a comma), then set the variable `mail-alias-seperator-string' to it.
1066 This has to be a comma bracketed by whitespace if you want any kind of
1067 reasonable behavior.
1069 If the variable `mail-archive-file-name' is non-`nil', it should be
1070 a string naming a file. Each time you start to edit a message to send,
1071 an `FCC' field is entered for that file. Unless you remove the `FCC'
1072 field, every message is written into that file when it is sent.
1075 File: xemacs.info, Node: Mail Mode, Prev: Mail Headers, Up: Sending Mail
1080 The major mode used in the `*mail*' buffer is Mail mode. Mail mode
1081 is similar to Text mode, but several commands are provided on the `C-c'
1082 prefix. These commands all deal specifically with editing or sending
1086 Send the message, and leave the `*mail*' buffer selected
1090 Send the message, and select some other buffer
1091 (`mail-send-and-exit').
1094 Move to the `To' header field, creating one if there is none
1098 Move to the `Subject' header field, creating one if there is none
1102 Move to the `CC' header field, creating one if there is none
1106 Insert the file `~/.signature' at the end of the message text
1110 Yank the selected message (`mail-yank-original').
1113 Fill all paragraphs of yanked old messages, each individually
1114 (`mail-fill-yanked-message').
1117 Pops up a menu of useful mail-mode commands.
1119 There are two ways to send a message. `C-c C-c'
1120 (`mail-send-and-exit') is the usual way to send the message. It sends
1121 the message and then deletes the window (if there is another window) or
1122 switches to another buffer. It puts the `*mail*' buffer at the lowest
1123 priority for automatic reselection, since you are finished with using
1124 it. `C-c C-s' (`mail-send') sends the message and marks the `*mail*'
1125 buffer unmodified, but leaves that buffer selected so that you can
1126 modify the message (perhaps with new recipients) and send it again.
1128 Mail mode provides some other special commands that are useful for
1129 editing the headers and text of the message before you send it. There
1130 are three commands defined to move point to particular header fields,
1131 all based on the prefix `C-c C-f' (`C-f' is for "field"). They are
1132 `C-c C-f C-t' (`mail-to') to move to the `To' field, `C-c C-f C-s'
1133 (`mail-subject') for the `Subject' field, and `C-c C-f C-c' (`mail-cc')
1134 for the `CC' field. These fields have special motion commands because
1135 they are edited most frequently.
1137 `C-c C-w' (`mail-signature') adds a standard piece of text at the
1138 end of the message to say more about who you are. The text comes from
1139 the file `.signature' in your home directory.
1141 When you use an Rmail command to send mail from the Rmail mail
1142 reader, you can use `C-c C-y' `mail-yank-original' inside the `*mail*'
1143 buffer to insert the text of the message you are replying to. Normally
1144 Rmail indents each line of that message four spaces and eliminates most
1145 header fields. A numeric argument specifies the number of spaces to
1146 indent. An argument of just `C-u' says not to indent at all and not to
1147 eliminate anything. `C-c C-y' always uses the current message from the
1148 `RMAIL' buffer, so you can insert several old messages by selecting one
1149 in `RMAIL', switching to `*mail*' and yanking it, then switching back
1150 to `RMAIL' to select another.
1152 After using `C-c C-y', you can use the command `C-c C-q'
1153 (`mail-fill-yanked-message') to fill the paragraphs of the yanked old
1154 message or messages. One use of `C-c C-q' fills all such paragraphs,
1155 each one separately.
1157 Clicking the right mouse button in a mail buffer pops up a menu of
1158 the above commands, for easy access.
1160 Turning on Mail mode (which `C-x m' does automatically) calls the
1161 value of `text-mode-hook', if it is not void or `nil', and then calls
1162 the value of `mail-mode-hook' if that is not void or `nil'.
1165 File: xemacs.info, Node: Reading Mail, Next: Calendar/Diary, Prev: Sending Mail, Up: Top
1170 XEmacs provides three separate mail-reading packages. Each one
1171 comes with its own manual, which is included standard with the XEmacs
1174 The recommended mail-reading package for new users is VM. VM works
1175 with standard Unix-mail-format folders and was designed as a replacement
1176 for the older Rmail.
1178 XEmacs also provides a sophisticated and comfortable front-end to the
1179 MH mail-processing system, called `mh-e'. Unlike in other mail
1180 programs, folders in MH are stored as file-system directories, with
1181 each message occupying one (numbered) file. This facilitates working
1182 with mail using shell commands, and many other features of MH are also
1183 designed to integrate well with the shell and with shell scripts. Keep
1184 in mind, however, that in order to use mh-e you must have the MH
1185 mail-processing system installed on your computer.
1187 Finally, XEmacs provides the Rmail package. Rmail is (currently) the
1188 only mail reading package distributed with FSF GNU Emacs, and is
1189 powerful in its own right. However, it stores mail folders in a special
1190 format called `Babyl', that is incompatible with all other
1191 frequently-used mail programs. A utility program is provided for
1192 converting Babyl folders to standard Unix-mail format; however, unless
1193 you already have mail in Babyl-format folders, you should consider
1194 using VM or mh-e instead. (If at times you have to use FSF Emacs, it is
1195 not hard to obtain and install VM for that editor.)
1198 File: xemacs.info, Node: Calendar/Diary, Next: Sorting, Prev: Reading Mail, Up: Top
1200 Calendar Mode and the Diary
1201 ===========================
1203 Emacs provides the functions of a desk calendar, with a diary of
1204 planned or past events. To enter the calendar, type `M-x calendar';
1205 this displays a three-month calendar centered on the current month, with
1206 point on the current date. With a numeric argument, as in `C-u M-x
1207 calendar', it prompts you for the month and year to be the center of the
1208 three-month calendar. The calendar uses its own buffer, whose major
1209 mode is Calendar mode.
1211 `Button2' in the calendar brings up a menu of operations on a
1212 particular date; `Buttons3' brings up a menu of commonly used calendar
1213 features that are independent of any particular date. To exit the
1214 calendar, type `q'. *Note Customizing the Calendar and Diary:
1215 (elisp)Calendar, for customization information about the calendar and
1220 * Calendar Motion:: Moving through the calendar; selecting a date.
1221 * Scroll Calendar:: Bringing earlier or later months onto the screen.
1222 * Mark and Region:: Remembering dates, the mark ring.
1223 * General Calendar:: Exiting or recomputing the calendar.
1224 * LaTeX Calendar:: Print a calendar using LaTeX.
1225 * Holidays:: Displaying dates of holidays.
1226 * Sunrise/Sunset:: Displaying local times of sunrise and sunset.
1227 * Lunar Phases:: Displaying phases of the moon.
1228 * Other Calendars:: Converting dates to other calendar systems.
1229 * Diary:: Displaying events from your diary.
1230 * Calendar Customization:: Altering the behavior of the features above.