1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-05 11:45:45 +00:00

Move to ../doc/man/

This commit is contained in:
Glenn Morris 2007-09-06 03:51:33 +00:00
parent 61e25ccc9a
commit a51b7a3566
4 changed files with 0 additions and 1150 deletions

View File

@ -1,3 +0,0 @@
.so man1/etags.1
.\" arch-tag: 54d4579b-9d66-4ba5-9fda-f01ec83612ad

View File

@ -1,753 +0,0 @@
'\" t
.\" Copyright (C) 1995, 1999, 2000, 2001, 2002, 2003, 2004,
.\" 2005, 2006, 2007 Free Software Foundation, Inc.
.\"
.\" This file is part of GNU Emacs.
.\"
.\" GNU Emacs is free software; you can redistribute it and/or modify
.\" it under the terms of the GNU General Public License as published by
.\" the Free Software Foundation; either version 3, or (at your option)
.\" any later version.
.\"
.\" GNU Emacs is distributed in the hope that it will be useful,
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
.\" GNU General Public License for more details.
.\"
.\" You should have received a copy of the GNU General Public License
.\" along with GNU Emacs; see the file COPYING. If not, write to the
.\" Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
.\" Boston, MA 02110-1301, USA.
.\"
'\" t
.TH EMACS 1 "2007 April 13" "GNU Emacs 22.1"
.
.
.SH NAME
emacs \- GNU project Emacs
.
.
.SH SYNOPSIS
.B emacs
[
.I command-line switches
] [
.I files ...\&
]
.
.
.SH DESCRIPTION
.I GNU Emacs
is a version of
.IR Emacs ,
written by the author of the original (PDP-10)
.IR Emacs ,
Richard Stallman.
.br
The primary documentation of GNU Emacs is in the GNU Emacs Manual,
which you can read using Info, either from Emacs or as a standalone
program.
Please look there for complete and up-to-date documentation.
This man page is updated only when someone volunteers to do so; the
Emacs maintainers' priority goal is to minimize the amount of time
this man page takes away from other more useful projects.
.br
The user functionality of GNU Emacs encompasses
everything other
.I Emacs
editors do, and it is easily extensible since its
editing commands are written in Lisp.
.PP
.I Emacs
has an extensive interactive help facility,
but the facility assumes that you know how to manipulate
.I Emacs
windows and buffers.
CTRL-h or F1 enters the Help facility.
Help Tutorial (CTRL-h t) starts an interactive tutorial which can
teach beginners the fundamentals of
.I Emacs
in a few minutes.
Help Apropos (CTRL-h a) helps you
find a command given its functionality, Help Character (CTRL-h c)
describes a given character's effect, and Help Function (CTRL-h f)
describes a given Lisp function specified by name.
.PP
.IR Emacs 's
Undo can undo several steps of modification to your buffers, so it is
easy to recover from editing mistakes.
.PP
.IR "GNU Emacs" 's
many special packages handle mail reading (RMail) and sending (Mail),
outline editing (Outline), compiling (Compile), running subshells
within
.I Emacs
windows (Shell), running a Lisp read-eval-print loop
(Lisp-Interaction-Mode), automated psychotherapy (Doctor), and much more.
.PP
There is an extensive reference manual, but
users of other Emacses
should have little trouble adapting even
without a copy.
Users new to
.I Emacs
will be able
to use basic features fairly rapidly by studying the tutorial and
using the self-documentation features.
.
.SS Emacs Options
The following options are of general interest:
.RS
.TP 8
.I file
Edit
.IR file .
.TP
.BI \-\-file " file\fR,\fP " \-\-find-file " file\fR,\fP " \-\-visit " file"
The same as specifying
.I file
directly as an argument.
.TP
.BI + number
Go to the line specified by
.I number
(do not insert a space between the "+" sign and
the number).
This applies only to the next file specified.
.TP
.BI + line:column
Go to the specified
.I line
and
.IR column .
.TP
.BR \-q ", " \-\-no\-init\-file
Do not load an init file.
.TP
.B \-\-no\-site\-file
Do not load the site-wide startup file.
.TP
.B \-\-no\-desktop
Do not load a saved desktop.
.TP
.BR \-nl ", " \-\-no\-shared\-memory
Do not use shared memory.
.TP
.BR \-Q ", " \-\-quick
Equivalent to "\-q \-\-no\-site\-file \-\-no\-splash".
.TP
.B \-\-no\-splash
Do not display a splash screen during start-up.
.TP
.B \-\-debug\-init
Enable
.I Emacs
Lisp debugger during the processing of the user init file
.BR ~/.emacs .
This is useful for debugging problems in the init file.
.TP
.BI \-u " user\fR,\fP " \-\-user " user"
Load
.IR user 's
init file.
.TP
.BI \-t " file\fR,\fP " \-\-terminal " file"
Use specified
.I file
as the terminal instead of using stdin/stdout.
This must be the first argument specified in the command line.
.TP
.BR \-\-multibyte ", " \-\-no-unibyte
Enable multibyte mode (enabled by default).
.TP
.BR \-\-unibyte ", " \-\-no-multibyte
Enable unibyte mode.
.TP
.B \-\-version
Display
.I Emacs
version information and exit.
.TP
.B \-\-help
Display this help and exit.
.RE
.PP
The following options are lisp-oriented
(these options are processed in the order encountered):
.RS
.TP 8
.BI \-f " function\fR,\fP " \-\-funcall " function"
Execute the lisp function
.IR function .
.TP
.BI \-l " file\fR,\fP " \-\-load " file"
Load the lisp code in the file
.IR file .
.TP
.BI \-\-eval " expr\fR,\fP " \-\-execute " expr"
Evaluate the Lisp expression
.IR expr .
.RE
.PP
The following options are useful when running
.I Emacs
as a batch editor:
.RS
.TP 8
.B \-\-batch
Edit in batch mode.
The editor will send messages to stderr.
This option must be the first in the argument list.
You must use \-l and \-f options to specify files to execute
and functions to call.
.TP
.BI \-\-script " file"
Run
.I file
as an Emacs Lisp script.
.TP
.BI \-\-insert " file"
Insert contents of
.I file
into the current buffer.
.TP
.B \-\-kill
Exit
.I Emacs
while in batch mode.
.TP
.BI \-L " dir\fR,\fP " \-\-directory " dir"
Add
.I dir
to the list of directories
.I Emacs
searches for Lisp files.
.RE
.
.\" START DELETING HERE IF YOU'RE NOT USING X
.SS Using Emacs with X
.I Emacs
has been tailored to work well with the X window system.
If you run
.I Emacs
from under X windows, it will create its own X window to
display in.
You will probably want to start the editor as a background
process so that you can continue using your original window.
.PP
.I Emacs
can be started with the following X switches:
.RS
.TP 8
.BI \-\-name " name"
Specify the name which should be assigned to the initial
.I Emacs
window.
This controls looking up X resources as well as the window title.
.TP
.BI \-T " name\fR,\fP " \-\-title " name"
Specify the title for the initial X window.
.TP
.BR \-r ", " \-rv ", " \-\-reverse\-video
Display the
.I Emacs
window in reverse video.
.TP
.BI \-fn " font\fR,\fP " \-\-font " font"
Set the
.I Emacs
window's font to that specified by
.IR font .
You will find the various
.I X
fonts in the
.I /usr/lib/X11/fonts
directory.
Note that
.I Emacs
will only accept fixed width fonts.
Under the X11 Release 4 font-naming conventions, any font with the
value "m" or "c" in the eleventh field of the font name is a fixed
width font.
Furthermore, fonts whose name are of the form
.IR width x height
are generally fixed width, as is the font
.IR fixed .
See
.BR xlsfonts (1)
for more information.
When you specify a font, be sure to put a space between the
switch and the font name.
.TP
.BI \-\-xrm " resources"
Set additional X resources.
.TP
.BI "\-\-color\fR,\fP \-\-color=" mode
Override color mode for character terminals;
.I mode
defaults to `auto', and can also be `never', `auto', `always',
or a mode name like `ansi8'.
.TP
.BI \-bw " pixels\fR,\fP " \-\-border\-width " pixels"
Set the
.I Emacs
window's border width to the number of pixels specified by
.IR pixels .
Defaults to one pixel on each side of the window.
.TP
.BI \-ib " pixels\fR,\fP " \-\-internal\-border " pixels"
Set the window's internal border width to the number of pixels specified
by
.IR pixels .
Defaults to one pixel of padding on each side of the window.
.TP
.BI \-g " geometry\fR,\fP " \-\-geometry " geometry"
Set the
.I Emacs
window's width, height, and position as specified.
The geometry specification is in the standard X format; see
.BR X (7)
for more information.
The width and height are specified in characters; the default is
80 by 24.
See the Emacs manual, section "Options for Window Size and Position",
for information on how window sizes interact
with selecting or deselecting the tool bar and menu bar.
.TP
.BI \-lsp " pixels\fR,\fP " \-\-line\-spacing " pixels"
Additional space to put between lines.
.TP
.BR \-vb ", " \-\-vertical\-scroll\-bars
Enable vertical scrollbars.
.TP
.BR \-fh ", " \-\-fullheight
Make the first frame as high as the screen.
.TP
.BR \-fs ", " \-\-fullscreen
Make the first frame fullscreen.
.TP
.BR \-fw ", " \-\-fullwidth
Make the first frame as wide as the screen.
.TP
.BI \-fg " color\fR,\fP " \-\-foreground\-color " color"
On color displays, set the color of the text.
Use the command
.I M\-x list\-colors\-display
for a list of valid color names.
.TP
.BI \-bg " color\fR,\fP " \-\-background\-color " color"
On color displays, set the color of the window's background.
.TP
.BI \-bd " color\fR,\fP " \-\-border\-color " color"
On color displays, set the color of the window's border.
.TP
.BI \-cr " color\fR,\fP " \-\-cursor\-color " color"
On color displays, set the color of the window's text cursor.
.TP
.BI \-ms " color\fR,\fP " \-\-mouse\-color " color"
On color displays, set the color of the window's mouse cursor.
.TP
.BI \-d " displayname\fR,\fP " \-\-display " displayname"
Create the
.I Emacs
window on the display specified by
.IR displayname .
Must be the first option specified in the command line.
.TP
.BR \-nbi ", " \-\-no\-bitmap\-icon
Do not use picture of gnu for Emacs icon.
.TP
.B \-\-iconic
Start
.I Emacs
in iconified state.
.TP
.BR \-nbc ", " \-\-no\-blinking\-cursor
Disable blinking cursor.
.TP
.BR \-nw ", " \-\-no\-window\-system
Tell
.I Emacs
not to use its special interface to X.
If you use this switch when invoking
.I Emacs
from an
.BR xterm (1)
window, display is done in that window.
.TP
.BR \-D ", " \-\-basic\-display
This option disables many display features; use it for
debugging Emacs.
.RE
.PP
You can set
.I X
default values for your
.I Emacs
windows in your
.I \.Xresources
file (see
.BR xrdb (1)).
Use the following format:
.IP
.RI emacs. keyword : value
.PP
where
.I value
specifies the default value of
.IR keyword .
.I Emacs
lets you set default values for the following keywords:
.RS
.TP 8
.BR background " (class " Background )
For color displays,
sets the window's background color.
.TP
.BR bitmapIcon " (class " BitmapIcon )
If
.BR bitmapIcon 's
value is set to
.IR on ,
the window will iconify into the "kitchen sink."
.TP
.BR borderColor " (class " BorderColor )
For color displays,
sets the color of the window's border.
.TP
.BR borderWidth " (class " BorderWidth )
Sets the window's border width in pixels.
.TP
.BR cursorColor " (class " Foreground )
For color displays,
sets the color of the window's text cursor.
.TP
.BR cursorBlink " (class " CursorBlink )
Specifies whether to make the cursor blink.
The default is
.IR on .
Use
.I off
or
.I false
to turn cursor blinking off.
.TP
.BR font " (class " Font )
Sets the window's text font.
.TP
.BR foreground " (class " Foreground )
For color displays,
sets the window's text color.
.TP
.BR fullscreen " (class " Fullscreen )
The desired fullscreen size.
The value can be one of
.IR fullboth ,
.IR fullwidth ,
or
.IR fullheight ,
which correspond to the command-line options `\-fs', `\-fw', and
`\-fh', respectively.
Note that this applies to the initial frame only.
.TP
.BR geometry " (class " Geometry )
Sets the geometry of the
.I Emacs
window (as described above).
.TP
.BR iconName " (class " Title )
Sets the icon name for the
.I Emacs
window icon.
.TP
.BR internalBorder " (class " BorderWidth )
Sets the window's internal border width in pixels.
.TP
.BR lineSpacing " (class " LineSpacing )
Additional space ("leading") between lines, in pixels.
.TP
.BR menuBar " (class " MenuBar )
Gives frames menu bars if
.IR on ;
don't have menu bars if
.IR off .
See the Emacs manual, sections "Lucid Resources" and "LessTif
Resources", for how to control the appearance of the menu bar
if you have one.
.TP
.BR minibuffer " (class " Minibuffer )
If
.IR none ,
don't make a minibuffer in this frame.
It will use a separate minibuffer frame instead.
.TP
.BR paneFont " (class " Font )
Font name for menu pane titles, in non-toolkit versions of
.IR Emacs .
.TP
.BR pointerColor " (class " Foreground )
For color displays,
sets the color of the window's mouse cursor.
.TP
.BR privateColormap " (class " PrivateColormap )
If
.IR on ,
use a private color map, in the case where the "default
visual" of class
.B PseudoColor
and
.B Emacs
is using it.
.TP
.BR reverseVideo " (class " ReverseVideo )
If
.BR reverseVideo 's
value is set to
.IR on ,
the window will be displayed in reverse video.
.TP
.BR screenGamma " (class "ScreenGamma )
Gamma correction for colors, equivalent to the frame parameter
`screen\-gamma'.
.TP
.BR scrollBarWidth " (class "ScrollBarWidth )
The scroll bar width in pixels, equivalent to the frame parameter
`scroll\-bar\-width'.
.TP
.BR selectionFont " (class " SelectionFont )
Font name for pop-up menu items, in non-toolkit versions of
.IR Emacs .
(For toolkit versions, see the Emacs manual, sections
"Lucid Resources" and "LessTif Resources".)
.TP
.BR selectionTimeout " (class " SelectionTimeout )
Number of milliseconds to wait for a selection reply.
A value of 0 means wait as long as necessary.
.TP
.BR synchronous " (class " Synchronous )
Run Emacs in synchronous mode if
.IR on .
Synchronous mode is useful for debugging X problems.
.TP
.BR title " (class " Title )
Sets the title of the
.I Emacs
window.
.TP
.BR toolBar " (class " ToolBar )
Number of lines to reserve for the tool bar.
.TP
.BR useXIM " (class " UseXIM )
Turns off use of X input methods (XIM) if
.I false
or
.IR off .
.TP
.BR verticalScrollBars " (class " ScrollBars )
Gives frames scroll bars if
.IR on ;
suppresses scroll bars if
.IR off .
.TP
.BR visualClass " (class " VisualClass )
Specify the "visual" that X should use.
This tells X how to handle colors.
The value should start with one of
.IR TrueColor ,
.IR PseudoColor ,
.IR DirectColor ,
.IR StaticColor ,
.IR GrayScale ,
and
.IR StaticGray ,
followed by
.BI \- depth\fR,\fP
where
.I depth
is the number of color planes.
.RE
.PP
If you try to set color values while using a black and white display,
the window's characteristics will default as follows:
the foreground color will be set to black,
the background color will be set to white,
the border color will be set to grey,
and the text and mouse cursors will be set to black.
.
.SS Using the Mouse
.PP
The following lists some of the mouse button bindings for the
.I Emacs
window under X11.
.
.RS
.TS
l l
- -
l l.
MOUSE BUTTON FUNCTION
left Set point.
middle Paste text.
right Cut text into X cut buffer.
SHIFT-middle Cut text into X cut buffer.
SHIFT-right Paste text.
CTRL-middle Cut text into X cut buffer and kill it.
CTRL-right T{
Select this window, then split it into two windows.
Same as typing CTRL\-x 2.
T}
.\" START DELETING HERE IF YOU'RE NOT USING X MENUS
CTRL-SHIFT-left T{
X buffer menu \(em hold the buttons and keys
down, wait for menu to appear, select buffer, and release.
Move mouse out of menu and release to cancel.
T}
CTRL-SHIFT-middle T{
X help menu \(em pop up index card menu for Emacs help.
T}
.\" STOP DELETING HERE IF YOU'RE NOT USING X MENUS
CTRL-SHIFT-right T{
Select window with mouse, and delete all other windows.
Same as typing CTRL\-x 1.
T}
.\" STOP DELETING HERE IF YOU'RE NOT USING X
.TE
.RE
.
.
.SH MANUALS
You can order printed copies of the GNU Emacs Manual from the Free
Software Foundation, which develops GNU software.
See the file ORDERS for ordering information.
.br
Your local Emacs maintainer might also have copies available.
As with all software and publications from FSF, everyone is permitted
to make and distribute copies of the Emacs manual.
The TeX source to the manual is also included in the Emacs source
distribution.
.
.
.SH FILES
/usr/local/share/info \(em files for the Info documentation browser.
The complete text of the Emacs reference manual is included in a
convenient tree structured form.
Also includes the Emacs Lisp Reference Manual, useful to anyone
wishing to write programs in the Emacs Lisp extension language.
/usr/local/share/emacs/$VERSION/lisp \(em Lisp source files and
compiled files that define most editing commands.
Some are preloaded; others are autoloaded from this directory when
used.
/usr/local/libexec/emacs/$VERSION/$ARCH \(em various programs that are
used with GNU Emacs.
/usr/local/share/emacs/$VERSION/etc \(em various files of information.
/usr/local/share/emacs/$VERSION/etc/DOC.* \(em contains the documentation
strings for the Lisp primitives and preloaded Lisp functions
of GNU Emacs.
They are stored here to reduce the size of Emacs proper.
/usr/local/share/emacs/$VERSION/etc/SERVICE lists people offering
various services to assist users of GNU Emacs, including education,
troubleshooting, porting and customization.
.
.
.SH BUGS
There is a mailing list, bug-gnu-emacs@gnu.org, for reporting Emacs
bugs and fixes.
But before reporting something as a bug, please try to be sure that
it really is a bug, not a misunderstanding or a deliberate feature.
We ask you to read the section ``Reporting Emacs Bugs'' near the
end of the reference manual (or Info system) for hints on how and
when to report bugs.
Also, include the version number of the Emacs you are running in
\fIevery\fR bug report that you send in.
Do not expect a personal answer to a bug report.
The purpose of reporting bugs is to get them fixed for everyone
in the next release, if possible.
For personal assistance, look in the SERVICE file (see above) for
a list of people who offer it.
Please do not send anything but bug reports to this mailing list.
For more information about Emacs mailing lists, see the
file /usr/local/emacs/etc/MAILINGLISTS.
Bugs tend actually to be fixed if they can be isolated, so it is
in your interest to report them in such a way that they can be
easily reproduced.
.
.
.SH UNRESTRICTIONS
.I Emacs
is free; anyone may redistribute copies of
.I Emacs
to
anyone under the terms stated in the
.I Emacs
General Public License,
a copy of which accompanies each copy of
.I Emacs
and which also
appears in the reference manual.
.PP
Copies of
.I Emacs
may sometimes be received packaged with distributions of Unix systems,
but it is never included in the scope of any license covering those
systems.
Such inclusion violates the terms on which distribution is permitted.
In fact, the primary purpose of the General Public License is to
prohibit anyone from attaching any other restrictions to
redistribution of
.IR Emacs .
.PP
Richard Stallman encourages you to improve and extend
.IR Emacs ,
and urges that
you contribute your extensions to the GNU library.
Eventually GNU (Gnu's Not Unix) will be a complete replacement
for Unix.
Everyone will be free to use, copy, study and change the GNU system.
.
.
.SH SEE ALSO
.BR emacsclient (1),
.BR etags (1),
.BR X (7),
.BR xlsfonts (1),
.BR xterm (1),
.BR xrdb (1)
.
.
.SH AUTHORS
.I Emacs
was written by Richard Stallman and the Free Software Foundation.
Joachim Martillo and Robert Krawitz added the X features.
.
.
.SH COPYING
Copyright
.if t \(co
.if n (C)
1995, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
2006, 2007 Free Software Foundation, Inc.
.PP
Permission is granted to make and distribute verbatim copies of this
document provided the copyright notice and this permission notice are
preserved on all copies.
.PP
Permission is granted to copy and distribute modified versions of
this document 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.
.PP
Permission is granted to copy and distribute translations of this
document into another language, under the above conditions for
modified versions, except that this permission notice may be stated
in a translation approved by the Free Software Foundation.
.
.\" arch-tag: 04dfd376-b46e-4924-919a-cecc3b257eaa

View File

@ -1,88 +0,0 @@
.TH EMACSCLIENT 1
.\" NAME should be all caps, SECTION should be 1-8, maybe w/ subsection
.\" other parms are allowed: see man(7), man(1)
.SH NAME
emacsclient \- tells a running Emacs to visit a file
.SH SYNOPSIS
.B emacsclient
.I "[options] files ..."
.SH "DESCRIPTION"
This manual page documents briefly the
.BR emacsclient
command. Full documentation is available in the GNU Info format; see
below.
This manual page was originally written for the Debian GNU/Linux
distribution, but is not specific to that system.
.PP
.B emacsclient
works in conjunction with the built-in Emacs server.
.PP
You can either call
.B emacsclient
directly or let other programs run it for you when necessary. On
GNU and Unix systems many programs consult the environment
variable EDITOR (sometimes also VISUAL) to obtain the command used for
editing. Thus, setting this environment variable to 'emacsclient'
will allow these programs to use an already running Emacs for editing.
Other operating systems might have their own methods for defining the
default editor.
For
.B emacsclient
to work, you need an already running Emacs with a server. Within Emacs,
call the functions `server-start' or `server-mode'. (Your `.emacs' file
can do this automatically if you add either `(server-start)' or
`(server-mode 1)' to it.)
When you've finished editing the buffer, type `C-x #'
(`server-edit'). This saves the file and sends a message back to the
`emacsclient' program telling it to exit. The programs that use
`EDITOR' wait for the "editor" (actually, `emacsclient') to exit. `C-x
#' also checks for other pending external requests to edit various
files, and selects the next such file.
If you set the variable `server-window' to a window or a frame, `C-x
#' displays the server buffer in that window or in that frame.
.SH OPTIONS
The programs follow the usual GNU command line syntax, with long
options starting with two dashes (`-').
.TP
.B \-n, \-\-no-wait
returns
immediately without waiting for you to "finish" the buffer in Emacs.
.TP
.B \-e, \-\-eval
do not visit files but instead evaluate the arguments as Emacs
Lisp expressions.
.TP
.B \-s, \-\-socket-name=FILENAME
use socket named FILENAME for communication.
.TP
.B \-f, \-\-server-file=FILENAME
use TCP configuration file FILENAME for communication.
This can also be specified via the `EMACS_SERVER_FILE' environment variable.
.TP
.B \-a, \-\-alternate-editor=EDITOR
if the Emacs server is not running, run the specified editor instead.
This can also be specified via the `ALTERNATE_EDITOR' environment variable.
.TP
.B \-d, \-\-display=DISPLAY
tell the server to display the files on the given display.
.TP
.B \-V, \-\-version
print version information and exit
.TP
.B \-h, \-\-help
print this usage information message and exit
.SH "SEE ALSO"
The program is documented fully in
.IR "Using Emacs as a Server"
available via the Info system.
.SH AUTHOR
This manual page was written by Stephane Bortzmeyer <bortzmeyer@debian.org>,
for the Debian GNU/Linux system (but may be used by others).
.SH COPYING
This manual page is in the public domain.
.\" arch-tag: 2b35e723-b197-4073-8752-231bc8b3d3f3

View File

@ -1,306 +0,0 @@
.\" Copyright (C) 1992, 2001, 2002, 2003, 2004,
.\" 2005, 2006, 2007 Free Software Foundation, Inc.
.\" See section COPYING for conditions for redistribution
.TH etags 1 "23nov2001" "GNU Tools" "GNU Tools"
.de BP
.sp
.ti -.2i
\(**
..
.SH NAME
etags, ctags \- generate tag file for Emacs, vi
.SH SYNOPSIS
.hy 0
.na
\fBetags\fP [\|\-aCDGIRVh\|] [\|\-i \fIfile\fP\|] [\|\-l \fIlanguage\fP\|]
.if n .br
[\|\-o \fItagfile\fP\|] [\|\-r \fIregexp\fP\|]
[\|\-\-parse\-stdin=\fIfile\fP\|]
.br
[\|\-\-append\|] [\|\-\-no\-defines\|]
[\|\-\-no\-globals\|] [\|\-\-include=\fIfile\fP\|]
[\|\-\-ignore\-indentation\|] [\|\-\-language=\fIlanguage\fP\|]
[\|\-\-no\-members\|] [\|\-\-output=\fItagfile\fP\|]
[\|\-\-regex=\fIregexp\fP\|] [\|\-\-no\-regex\|]
[\|\-\-help\|] [\|\-\-version\|]
\fIfile\fP .\|.\|.
\fBctags\fP [\|\-aCdgIRVh\|] [\|\-BtTuvwx\|] [\|\-l \fIlanguage\fP\|]
.if n .br
[\|\-o \fItagfile\fP\|] [\|\-r \fIregexp\fP\|]
[\|\-\-parse\-stdin=\fIfile\fP\|]
.br
[\|\-\-append\|] [\|\-\-backward\-search\|]
[\|\-\-cxref\|] [\|\-\-defines\|] [\|\-\-forward\-search\|]
[\|\-\-globals\|] [\|\-\-ignore\-indentation\|]
[\|\-\-language=\fIlanguage\fP\|] [\|\-\-members\|]
[\|\-\-output=\fItagfile\fP\|] [\|\-\-regex=\fIregexp\fP\|]
[\|\-\-typedefs\|] [\|\-\-typedefs\-and\-c++\|]
[\|\-\-update\|]
[\|\-\-help\|] [\|\-\-version\|]
\fIfile\fP .\|.\|.
.ad b
.hy 1
.SH DESCRIPTION
The \|\fBetags\fP\| program is used to create a tag table file, in a format
understood by
.BR emacs ( 1 )\c
\&; the \|\fBctags\fP\| program is used to create a similar table in a
format understood by
.BR vi ( 1 )\c
\&. Both forms of the program understand
the syntax of C, Objective C, C++, Java, Fortran, Ada, Cobol, Erlang, HTML,
LaTeX, Emacs Lisp/Common Lisp, Lua, makefile, Pascal, Perl, PHP, Postscript,
Python, Prolog, Scheme and
most assembler\-like syntaxes.
Both forms read the files specified on the command line, and write a tag
table (defaults: \fBTAGS\fP for \fBetags\fP, \fBtags\fP for
\fBctags\fP) in the current working directory.
Files specified with relative file names will be recorded in the tag
table with file names relative to the directory where the tag table
resides. If the tag table is in /dev, however, the file names are made
relative to the working directory. Files specified with absolute file
names will be recorded
with absolute file names. Files generated from a source file\-\-like
a C file generated from a source Cweb file\-\-will be recorded with
the name of the source file.
The programs recognize the language used in an input file based on its
file name and contents. The \fB\-\-language\fP switch can be used to force
parsing of the file names following the switch according to the given
language, overriding guesses based on filename extensions.
.SH OPTIONS
Some options make sense only for the \fBvi\fP style tag files produced
by ctags;
\fBetags\fP does not recognize them.
The programs accept unambiguous abbreviations for long option names.
.TP
.B \-a, \-\-append
Append to existing tag file. (For \fBvi\fP-format tag files, see also
\fB\-\-update\fP.)
.TP
.B \-B, \-\-backward\-search
Tag files written in the format expected by \fBvi\fP contain regular
expression search instructions; the \fB\-B\fP option writes them using
the delimiter `\|\fB?\fP\|', to search \fIbackwards\fP through files.
The default is to use the delimiter `\|\fB/\fP\|', to search \fIforwards\fP
through files.
Only \fBctags\fP accepts this option.
.TP
.B \-\-declarations
In C and derived languages, create tags for function declarations,
and create tags for extern variables unless \-\-no\-globals is used.
.TP
.B \-d, \-\-defines
Create tag entries for C preprocessor constant definitions
and enum constants, too. Since this is the default behavior of
\fBetags\fP, only \fBctags\fP accepts this option.
.TP
.B \-D, \-\-no\-defines
Do not create tag entries for C preprocessor constant definitions
and enum constants.
This may make the tags file much smaller if many header files are tagged.
Since this is the default behavior of \fBctags\fP, only \fBetags\fP
accepts this option.
.TP
.B \-\-globals
Create tag entries for global variables in C, C++, Objective C, Java,
and Perl.
Since this is the default behavior of \fBetags\fP, only \fBctags\fP
accepts this option.
.TP
.B \-\-no\-globals
Do not tag global variables. Typically this reduces the file size by
one fourth. Since this is the default behavior of \fBctags\fP, only
\fBetags\fP accepts this option.
.TP
\fB\-i\fP \fIfile\fP, \fB\-\-include=\fIfile\fP
Include a note in the tag file indicating that, when searching for a
tag, one should also consult the tags file \fIfile\fP after checking the
current file. Only \fBetags\fP accepts this option.
.TP
.B \-I, \-\-ignore\-indentation
Don't rely on indentation as much as we normally do. Currently, this
means not to assume that a closing brace in the first column is the
final brace of a function or structure definition in C and C++.
.TP
\fB\-l\fP \fIlanguage\fP, \fB\-\-language=\fIlanguage\fP
Parse the following files according to the given language. More than
one such options may be intermixed with filenames. Use \fB\-\-help\fP
to get a list of the available languages and their default filename
extensions. The `auto' language can be used to restore automatic
detection of language based on the file name. The `none'
language may be used to disable language parsing altogether; only
regexp matching is done in this case (see the \fB\-\-regex\fP option).
.TP
.B \-\-members
Create tag entries for variables that are members of structure-like
constructs in C++, Objective C, Java. This is the default for etags.
.TP
.B \-\-no\-members
Do not tag member variables. This is the default for ctags.
.TP
.B \-\-packages\-only
Only tag packages in Ada files.
.TP
\fB\-\-parse\-stdin=\fIfile\fP
May be used (only once) in place of a file name on the command line.
\fBetags\fP will read from standard input and mark the produced tags
as belonging to the file \fBFILE\fP.
.TP
\fB\-o\fP \fItagfile\fP, \fB\-\-output=\fItagfile\fP
Explicit name of file for tag table; overrides default \fBTAGS\fP or
\fBtags\fP. (But ignored with \fB\-v\fP or \fB\-x\fP.)
.TP
\fB\-r\fP \fIregexp\fP, \fB\-\-regex=\fIregexp\fP
Make tags based on regexp matching for the files following this option,
in addition to the tags made with the standard parsing based on
language. May be freely intermixed with filenames and the \fB\-R\fP
option. The regexps are cumulative, i.e. each such option will add to
the previous ones. The regexps are of one of the forms:
.br
[\fB{\fP\fIlanguage\fP\fB}\fP]\fB/\fP\fItagregexp/\fP[\fInameregexp\fP\fB/\fP]\fImodifiers\fP
.br
\fB@\fP\fIregexfile\fP
.br
where \fItagregexp\fP is used to match the tag. It should not match
useless characters. If the match is such that more characters than
needed are unavoidably matched by \fItagregexp\fP, it may be useful to
add a \fInameregexp\fP, to narrow down the tag scope. \fBctags\fP
ignores regexps without a \fInameregexp\fP. The syntax of regexps is
the same as in emacs. The following character escape sequences are
supported: \\a, \\b, \\d, \\e, \\f, \\n, \\r, \\t, \\v, which
respectively stand for the ASCII characters BEL, BS, DEL, ESC, FF, NL,
CR, TAB, VT.
.br
The \fImodifiers\fP are a sequence of 0 or more characters among
\fIi\fP, which means to ignore case when matching; \fIm\fP, which means
that the \fItagregexp\fP will be matched against the whole file contents
at once, rather than line by line, and the matching sequence can match
multiple lines; and \fIs\fP, which implies \fIm\fP and means that the
dot character in \fItagregexp\fP matches the newline char as well.
.br
The separator, which is \fB/\fP in the examples, can be any character
different from space, tab, braces and \fB@\fP. If the separator
character is needed inside the regular expression, it must be quoted
by preceding it with \fB\\\fP.
.br
The optional \fB{\fP\fIlanguage\fP\fB}\fP prefix means that the tag
should be
created only for files of language \fIlanguage\fP, and ignored
otherwise. This is particularly useful when storing many predefined
regexps in a file.
.br
In its second form, \fIregexfile\fP is the name of a file that contains
a number of arguments to the \fI\-\-regex\=\fP option,
one per line. Lines beginning with a space or tab are assumed
to be comments, and ignored.
.br
Here are some examples. All the regexps are quoted to protect them
from shell interpretation.
.br
Tag the DEFVAR macros in the emacs source files:
.br
\fI\-\-regex\='/[ \\t]*DEFVAR_[A-Z_ \\t(]+"\\([^"]+\\)"/'\fP
.\"" This comment is to avoid confusion to Emacs syntax highlighting
.br
Tag VHDL files (this example is a single long line, broken here for
formatting reasons):
.br
\fI\-\-language\=none\ \-\-regex='/[\ \\t]*\\(ARCHITECTURE\\|\\
CONFIGURATION\\)\ +[^\ ]*\ +OF/'\ \-\-regex\='/[\ \\t]*\\
\\(ATTRIBUTE\\|ENTITY\\|FUNCTION\\|PACKAGE\\(\ BODY\\)?\\
\\|PROCEDURE\\|PROCESS\\|TYPE\\)[\ \\t]+\\([^\ \\t(]+\\)/\\3/'\fP
.br
Tag TCL files (this last example shows the usage of a \fItagregexp\fP):
.br
\fI\-\-lang\=none \-\-regex\='/proc[\ \\t]+\\([^\ \\t]+\\)/\\1/'\fP
.br
A regexp can be preceded by {\fIlang\fP}, thus restricting it to match
lines of files of the specified language. Use \fBetags \-\-help\fP to obtain
a list of the recognised languages. This feature is particularly useful inside
\fBregex files\fP. A regex file contains one regex per line. Empty lines,
and those lines beginning with space or tab are ignored. Lines beginning
with @ are references to regex files whose name follows the @ sign. Other
lines are considered regular expressions like those following \fB\-\-regex\fP.
.br
For example, the command
.br
\fIetags \-\-regex=@regex.file *.c\fP
.br
reads the regexes contained in the file regex.file.
.TP
.B \-R, \-\-no\-regex
Don't do any more regexp matching on the following files. May be
freely intermixed with filenames and the \fB\-\-regex\fP option.
.TP
.B \-t, \-\-typedefs
Record typedefs in C code as tags. Since this is the default behavior
of \fBetags\fP, only \fBctags\fP accepts this option.
.TP
.B \-T, \-\-typedefs\-and\-c++
Generate tag entries for typedefs, struct, enum, and union tags, and
C++ member functions. Since this is the default behavior
of \fBetags\fP, only \fBctags\fP accepts this option.
.TP
.B \-u, \-\-update
Update tag entries for \fIfiles\fP specified on command line, leaving
tag entries for other files in place. Currently, this is implemented
by deleting the existing entries for the given files and then
rewriting the new entries at the end of the tags file. It is often
faster to simply rebuild the entire tag file than to use this.
Only \fBctags\fP accepts this option.
.TP
.B \-v, \-\-vgrind
Instead of generating a tag file, write index (in \fBvgrind\fP format)
to standard output. Only \fBctags\fP accepts this option.
.TP
.B \-x, \-\-cxref
Instead of generating a tag file, write a cross reference (in
\fBcxref\fP format) to standard output. Only \fBctags\fP accepts this option.
.TP
.B \-h, \-H, \-\-help
Print usage information. Followed by one or more \-\-language=LANG
prints detailed information about how tags are created for LANG.
.TP
.B \-V, \-\-version
Print the current version of the program (same as the version of the
emacs \fBetags\fP is shipped with).
.SH "SEE ALSO"
`\|\fBemacs\fP\|' entry in \fBinfo\fP; \fIGNU Emacs Manual\fP, Richard
Stallman.
.br
.BR cxref ( 1 ),
.BR emacs ( 1 ),
.BR vgrind ( 1 ),
.BR vi ( 1 ).
.SH COPYING
Copyright
.if t \(co
.if n (c)
1999, 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
.PP
Permission is granted to make and distribute verbatim copies of this
document provided the copyright notice and this permission notice are
preserved on all copies.
.PP
Permission is granted to copy and distribute modified versions of
this document 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.
.PP
Permission is granted to copy and distribute translations of this
document into another language, under the above conditions for
modified versions, except that this permission notice may be stated
in a translation approved by the Free Software Foundation.
.\" arch-tag: 9534977f-af78-42f0-991d-1df6b6c05573