The tables in this appendix list the most useful Lisp packages that
come with Emacs. All Lisp packages are typically located in the
directory emacs-source/lisp
, where
emacs-source
is the directory in which you
placed the Emacs source distribution. We have omitted all of the
packages that provide "basic" Emacs
support; likewise, we have omitted many packages
whose functionality is obsolete or
unspeakably obscure.
While some of these packages are described in some detail in this book, most aren't; you will have to rely on GNU Emacs' help for precise descriptions of what the package does. See Chapter 14 for details about help; the most important help commands you will need for finding out about the functionality of Lisp packages are C-h p (for finder-by-keyword), C-h f (for describe-function), and C-h m (for describe-mode).
C-h p is especially helpful. It lets you navigate through a hierarchy of information about all packages available on your system, from general areas of functionality, like those in the tables in this appendix, to the C-h m information about each individual mode. Unfortunately, the detailed information is sometimes incomplete and also lists many packages that could not possibly be interesting to anyone other than hard-core Emacs customizers.
Wherever it is reasonable, the tables in this appendix give commands that "start" the package. This startup information has the following meanings:
If the package implements a major mode, the startup command is the function that puts Emacs into this major mode.
If the package implements a major mode that is automatically loaded
when you visit a file with a certain suffix, we list
"suffix
suffixname
" in addition
to the startup command.
If the package implements a minor mode, the startup command is the function that puts Emacs into this minor mode.
If the package implements a set of general-purpose functions, we've tried to pick the most "typical" of these functions. For example, the studly package implements three commands. We arbitrarily picked studlify-region as one way to invoke this package. If there isn't any reasonable choice, we list "many."
Finally, a word on using the packages. Some packages are
automatically loaded when Emacs starts; some are loaded when you
visit a file with the appropriate suffix (such as many of the modes
for programming languages); some are automatically loaded whenever
you give the appropriate command (for example, M-x shell Enter loads the package
shell.el
for shell-mode); and some are never automatically
loaded. So how do you know which is which?
You don't really have to concern yourself with this
issue. In the tables, the Startup column tells you what command (or
commands) put the package to work. Start Emacs, and give this command
(M-x
startup-command
Enter). If Emacs complains no match, the package wasn't
loaded automatically and you need to load the package
"by hand." To do so during an Emacs
session, use the command M-x
load-library
name
Enter, where the package's
"name" is given in the first column
of the table. You can also tell Emacs to load packages automatically
at startup time by putting lines in your .emacs
file that have this form:
(load-library "name
")
Finally, if you're interested in looking at the source code of the libraries, which can be a great way to pick up techniques as you develop skills in programming Emacs Lisp, check out the find-library-file function presented in Chapter 11.
Now, without further ado, here are the tables of Lisp packages.
Table B-1. Support for Java, C, and C++ programming
Table B-2. Support for Lisp programming
Package |
Description |
Startup |
---|---|---|
lisp-mode |
Major modes for Lisp, Emacs Lisp and Lisp interaction |
lisp-mode, emacs-lisp-mode, lisp-interaction-mode, suffixes
|
scheme |
Major mode for editing Scheme source files |
scheme-mode, suffixes
|
cl |
Functions and macros for Emacs Lisp compatibility with Common Lisp |
many |
debug |
Major mode for debugging Emacs Lisp programs |
debug, automatically invoked if an error occurs running code when debug-on-error is not nil |
edebug |
Emacs Lisp debugging functionality, implemented as a minor mode |
edebug |
disass |
Function to disassemble compiled Emacs Lisp code |
disassemble |
elp |
Code profiler for Emacs Lisp |
elp-instrument-package, elp-instrument-function |
trace |
Produces function call traces for Emacs Lisp |
trace-function |
[1] Emacs Lisp mode
is also invoked for files named |
Table B-3. Support for other programming tasks and languages
Table B-4. Support for Text Processing
Package |
Description |
Startup |
---|---|---|
text-mode |
Major mode for editing unprocessed text files |
text-mode, suffixes
|
sgml-mode |
Major mode for editing structured documents (including HTML and XML)[2] |
html-mode, xml-mode, sgml-mode, suffixes |
tex-mode |
Major mode for editing TEX and LATEX files |
tex-mode, latex-mode, suffixes
|
bibtex |
Major mode for editing bibliography files |
bibtex-mode, suffix
|
refbib |
Convert bibliography files in refer format to bibtex format |
r2b-convert-buffer |
nroff |
Major mode for editing nroff and troff text files |
nroff-mode, suffixes
|
scribe |
Major mode for editing Scribe text files |
scribe-mode, suffix
|
Table B-6. Interfaces to operating system utilities[3]
Package |
Description |
Startup |
---|---|---|
shell |
Major mode for interacting with the command-line shell. |
shell-mode |
find-dired |
Run the find command and use dired on the resulting list of files. |
find-dired |
tar-mode |
Access files inside a tar archive through a dired-like interface. |
tar-mode, suffix
|
arc-mode |
Access files in several other archive formats through a dired-like interface. |
archive-mode, suffixes
|
lpr |
Print the contents of a buffer or region. |
lpr-buffer, print-buffer, lpr-region, print-region |
sort |
Sort the contents of a buffer. |
sort-columns, sort-fields, sort-lines, sort-numeric-fields, sort-paragraphs, sort-regexp-fields |
spell, ispell |
Various tools for checking spelling. |
See Chapter 3 |
diff, ediff |
Tools to help in comparing files. |
See Chapter 12 |
[3] Some of these will be useful on Windows only if you've installed a Unix compatibility package like Cygwin (see http://www.cygwin.com). |
Table B-7. Networking support
Table B-8. Games and amusements
Again, this is only a sampling of some available packages, to give you a sense of the breadth and depth of capabilities that ship with Emacs. The list isn't close to complete even with respect to what's available at this time, and new features are always being added. Your best bet is to explore for yourself using the tools mentioned at the beginning of this appendix. And don't forget to search the Web for nonstandard additions that might be just what you need for your own environment and projects!