Merge from emacs--devo--0
Patches applied: * emacs--devo--0 (patch 866-879) - Merge multi-tty branch - Update from CVS - Merge from emacs--rel--22 Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-257
This commit is contained in:
commit
ecb21060d5
270 changed files with 79058 additions and 44138 deletions
227
CONTRIBUTE
227
CONTRIBUTE
|
@ -1,227 +0,0 @@
|
|||
Copyright (C) 2006, 2007 Free Software Foundation, Inc.
|
||||
See end for license conditions.
|
||||
|
||||
|
||||
Contributing to Emacs
|
||||
|
||||
Emacs is a collaborative project and we encourage contributions from
|
||||
anyone and everyone. If you want to contribute in the way that will
|
||||
help us most, we recommend (1) fixing reported bugs and (2)
|
||||
implementing the feature ideas in etc/TODO. However, if you think of
|
||||
new features to add, please suggest them too -- we might like your
|
||||
idea. Porting to new platforms is also useful, when there is a new
|
||||
platform, but that is not common nowadays.
|
||||
|
||||
For documentation on how to develop Emacs changes, refer to the Emacs
|
||||
Manual and the Emacs Lisp Reference Manual (both included in the Emacs
|
||||
distribution). The web pages in http://www.gnu.org/software/emacs
|
||||
contain additional information.
|
||||
|
||||
You may also want to submit your change so that can be considered for
|
||||
inclusion in a future version of Emacs (see below).
|
||||
|
||||
If you don't feel up to hacking Emacs, there are many other ways to
|
||||
help. You can answer questions on the mailing lists, write
|
||||
documentation, find and report bugs, contribute to the Emacs web
|
||||
pages, or develop a package that works with Emacs.
|
||||
|
||||
Here are some style and legal conventions for contributors to Emacs:
|
||||
|
||||
|
||||
* Coding Standards
|
||||
|
||||
Contributed code should follow the GNU Coding Standard.
|
||||
|
||||
If it doesn't, we'll need to find someone to fix the code before we
|
||||
can use it.
|
||||
|
||||
Emacs has certain additional style and coding conventions.
|
||||
|
||||
Ref: http://www.gnu.org/prep/standards_toc.html
|
||||
Ref: GNU Coding Standards Info Manual
|
||||
Ref: The "Tips" Appendix in the Emacs Lisp Reference.
|
||||
|
||||
|
||||
* Copyright Assignment
|
||||
|
||||
We can accept small changes without legal papers, and for medium-size
|
||||
changes a copyright disclaimer is ok too. To accept substantial
|
||||
contributions from you, we need a copyright assignment form filled out
|
||||
and filed with the FSF.
|
||||
|
||||
Contact us at emacs-devel@gnu.org to obtain the relevant forms.
|
||||
|
||||
|
||||
* Getting the Source Code
|
||||
|
||||
The latest version of Emacs can be downloaded using CVS or Arch from
|
||||
the Savannah web site. It is important to write your patch based on
|
||||
this version; if you start from an older version, your patch may be
|
||||
outdated when you write it, and maintainers will have hard time
|
||||
applying it.
|
||||
|
||||
After you have downloaded the CVS source, you should read the file
|
||||
INSTALL.CVS for build instructions (they differ to some extent from a
|
||||
normal build).
|
||||
|
||||
Ref: http://savannah.gnu.org/projects/emacs
|
||||
|
||||
|
||||
* Submitting Patches
|
||||
|
||||
Every patch must have several pieces of information before we
|
||||
can properly evaluate it.
|
||||
|
||||
When you have all these pieces, bundle them up in a mail message and
|
||||
send it to emacs-pretest-bug@gnu.org or emacs-devel@gnu.org.
|
||||
|
||||
All subsequent discussion should also be sent to the mailing list.
|
||||
|
||||
** Description
|
||||
|
||||
For bug fixes, a description of the bug and how your patch fixes this
|
||||
bug.
|
||||
|
||||
For new features, a description of the feature and your
|
||||
implementation.
|
||||
|
||||
** ChangeLog
|
||||
|
||||
A ChangeLog entry as plaintext (separate from the patch).
|
||||
|
||||
See the various ChangeLog files for format and content. Note that,
|
||||
unlike some other projects, we do require ChangeLogs also for
|
||||
documentation, i.e. Texinfo files.
|
||||
|
||||
Ref: "Change Log Concepts" node of the GNU Coding Standards Info
|
||||
Manual, for how to write good log entries.
|
||||
|
||||
** The patch itself.
|
||||
|
||||
Please use "Context Diff" format.
|
||||
|
||||
If you are accessing the CVS repository use
|
||||
cvs update; cvs diff -cp
|
||||
else, use
|
||||
diff -cp OLD NEW
|
||||
|
||||
If your version of diff does not support these options, then get the
|
||||
latest version of GNU Diff.
|
||||
|
||||
** Mail format.
|
||||
|
||||
We prefer to get the patches as inline plain text.
|
||||
|
||||
Please be aware of line wrapping which will make the patch unreadable
|
||||
and useless for us. To avoid that, you can use MIME attachments or,
|
||||
as a last resort, uuencoded gzipped text.
|
||||
|
||||
** Please reread your patch before submitting it.
|
||||
|
||||
** Do not mix changes.
|
||||
|
||||
If you send several unrelated changes together, we will ask you to
|
||||
separate them so we can consider each of the changes by itself.
|
||||
|
||||
|
||||
* Coding style and conventions.
|
||||
|
||||
** Mandatory reading:
|
||||
|
||||
The "Tips and Conventions" Appendix of the Emacs Lisp Reference.
|
||||
|
||||
** Avoid using `defadvice' or `eval-after-load' for Lisp code to be
|
||||
included in Emacs.
|
||||
|
||||
** Remove all trailing whitespace in all source and text files.
|
||||
|
||||
** Use ?\s instead of ? in Lisp code for a space character.
|
||||
|
||||
|
||||
* Supplemental information for Emacs Developers.
|
||||
|
||||
** Write access to Emacs' CVS repository.
|
||||
|
||||
Once you become a frequent contributor to Emacs, we can consider
|
||||
giving you write access to the CVS repository.
|
||||
|
||||
|
||||
** Emacs Mailing lists.
|
||||
|
||||
Discussion about Emacs development takes place on emacs-devel@gnu.org.
|
||||
|
||||
Bug reports for released versions are sent to bug-gnu-emacs@gnu.org.
|
||||
|
||||
Bug reports for development versions are sent to emacs-pretest-bug@gnu.org.
|
||||
|
||||
You can subscribe to the mailing lists at savannah.gnu.org/projects/emacs.
|
||||
|
||||
You can find the mailing lists archives at lists.gnu.org or gmane.org.
|
||||
|
||||
|
||||
** Document your changes.
|
||||
|
||||
Think carefully about whether your change requires updating the
|
||||
documentation. If it does, you can either do this yourself or add an
|
||||
item to the NEWS file.
|
||||
|
||||
If you document your change in NEWS, please mark the NEWS entry with
|
||||
the documentation status of the change: if you submit the changes for
|
||||
the manuals, mark it with "+++"; if it doesn't need to be documented,
|
||||
mark it with "---"; if it needs to be documented, but you didn't
|
||||
submit documentation changes, leave the NEWS entry unmarked. (These
|
||||
marks are checked by the Emacs maintainers to make sure every change
|
||||
was reflected in the manuals.)
|
||||
|
||||
|
||||
** Understanding Emacs Internals.
|
||||
|
||||
The best way to understand Emacs Internals is to read the code,
|
||||
but the nodes "Tips" and "GNU Emacs Internals" in the Appendix
|
||||
of the Emacs Lisp Reference Manual may also help.
|
||||
|
||||
The file etc/DEBUG describes how to debug Emacs bugs.
|
||||
|
||||
|
||||
|
||||
* How to Maintain Copyright Years for GNU Emacs
|
||||
|
||||
See admin/notes/copyright.
|
||||
|
||||
** Our lawyer says it is ok if we add, to each file that has been in Emacs
|
||||
since Emacs 21 came out in 2001, all the subsequent years. We don't
|
||||
need to check whether *that file* was changed in those years.
|
||||
It's sufficient that *Emacs* was changed in those years (and it was!).
|
||||
|
||||
** For those files that have been added since then, we should add
|
||||
the year it was added to Emacs, and all subsequent years.
|
||||
|
||||
** For the refcards under etc/, it's ok to simply use the latest year
|
||||
(typically in a `\def\year{YEAR}' expression) for the rendered copyright
|
||||
notice, while maintaining the full list of years in the copyright notice
|
||||
in the comments.
|
||||
|
||||
|
||||
|
||||
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.
|
||||
|
||||
Local variables:
|
||||
mode: outline
|
||||
paragraph-separate: "[ ]*$"
|
||||
end:
|
||||
|
97
ChangeLog
97
ChangeLog
|
@ -1,3 +1,100 @@
|
|||
2007-10-05 Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
* config.bat: Fix configuring `doc' due to changes in the
|
||||
directory structure.
|
||||
|
||||
2007-09-16 Peter O'Gorman <bug-gnu-emacs@mlists.thewrittenword.com> (tiny change)
|
||||
|
||||
* configure.in: Don't use -lpthread on HP-UX.
|
||||
|
||||
2007-09-16 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* make-dist: File gfdl.1 has been removed.
|
||||
|
||||
2007-09-15 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* configure.in: Fix makeinfo version regexp.
|
||||
|
||||
2007-09-12 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* configure.in (AC_FUNC_ALLOCA): Throw an error if a system
|
||||
implementation of alloca is not found.
|
||||
|
||||
* Makefile.in (SOURCES, unlock, relock): Delete.
|
||||
(install-arch-indep): Do not exclude the etc/ Makefiles.
|
||||
|
||||
2007-09-09 Juri Linkov <juri@jurta.org>
|
||||
|
||||
* make-dist: Remove AUTHORS and CONTRIBUTE (moved to etc).
|
||||
|
||||
* README: Add doc/ to documentation directories.
|
||||
|
||||
2007-09-08 Michael Olson <mwolson@gnu.org>
|
||||
|
||||
* MAINTAINERS: Add myself for ERC and tq.el.
|
||||
Update for new doc/ directory layout.
|
||||
|
||||
2007-09-06 Romain Francoise <romain@orebokech.com>
|
||||
|
||||
* make-dist: Update for new doc/ directory layout.
|
||||
|
||||
2007-09-06 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* Makefile.in (mansrcdir): New variable.
|
||||
(SUBDIR_MAKEFILES): Update for new doc/ directory layout.
|
||||
(man/Makefile, lispref/Makefile, lispintro/Makefile): Rename and
|
||||
update these targets for new doc/ directory layout.
|
||||
(doc/misc/Makefile): New target.
|
||||
(install-arch-indep): Use mansrcdir for new location of manpages.
|
||||
(mostlyclean, clean, distclean, maintainer-clean, unlock)
|
||||
(relock, info, dvi): Update targets for new doc/ directory layout.
|
||||
|
||||
* configure.in (AC_OUTPUT): Update names of generated Makefiles
|
||||
for new doc/ directory layout.
|
||||
|
||||
2007-09-02 Andreas Schwab <schwab@suse.de>
|
||||
|
||||
* configure.in: Use AS_HELP_STRING throughout.
|
||||
* configure: Regenerate.
|
||||
|
||||
2007-09-02 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
|
||||
|
||||
* configure.in: Require Gtk/Glib 2.6.
|
||||
|
||||
2007-09-02 Thien-Thi Nguyen <ttn@gnuvola.org>
|
||||
|
||||
* configure.in (EMACS_ARG_Y, EMACS_ARG_N): New AC_DEFUNs.
|
||||
Use them throughout in place of AC_ARG_WITH calls.
|
||||
* configure: Regenerate.
|
||||
|
||||
2007-09-01 Andreas Schwab <schwab@suse.de>
|
||||
|
||||
* configure.in: Put quotes around nested macro calls.
|
||||
|
||||
2007-08-31 Ulrich Mueller <ulm@gentoo.org> (tiny change)
|
||||
|
||||
* configure.in: Fix typo.
|
||||
* configure: Regenerate.
|
||||
|
||||
2007-08-30 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* configure.in (AH_BOTTOM): Copy some manual changes made to
|
||||
src/config.in here so they are not lost when it regenerates.
|
||||
|
||||
* README.multi-tty: Move to admin/notes/multi-tty, with some edits.
|
||||
|
||||
2007-08-29 Karoly Lorentey <karoly@lorentey.hu>
|
||||
|
||||
* README.multi-tty: New file.
|
||||
|
||||
2007-08-29 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* README: Increase version to 23.0.50.
|
||||
|
||||
2007-08-29 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
|
||||
|
||||
* configure.in: New option: --without-xaw3d.
|
||||
|
||||
2007-08-24 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* configure.in: Check for a suitably recent makeinfo.
|
||||
|
|
19
MAINTAINERS
19
MAINTAINERS
|
@ -39,7 +39,7 @@ Eli Zaretskii
|
|||
lisp/term/tty-colors.el
|
||||
lisp/international/codepage.el
|
||||
|
||||
man/msdog.texi
|
||||
doc/emacs/msdog.texi
|
||||
|
||||
Kenichi Handa
|
||||
Mule
|
||||
|
@ -69,7 +69,14 @@ Jay Belanger
|
|||
Calc
|
||||
lisp/calc/*
|
||||
etc/calccard.tex
|
||||
man/calc.texi
|
||||
doc/misc/calc.texi
|
||||
|
||||
Michael Olson
|
||||
ERC
|
||||
lisp/erc/*
|
||||
etc/ERC-NEWS
|
||||
doc/misc/erc.texi
|
||||
lisp/emacs-lisp/tq.el
|
||||
|
||||
==============================================================================
|
||||
2.
|
||||
|
@ -79,7 +86,7 @@ Steven Tamm
|
|||
MacOS
|
||||
|
||||
Eli Zaretskii
|
||||
man/*
|
||||
doc/*
|
||||
lispref/*
|
||||
info/dir
|
||||
|
||||
|
@ -112,12 +119,6 @@ Miles Bader
|
|||
Thien-Thi Nguyen
|
||||
VMS
|
||||
|
||||
Juanma Barranquero
|
||||
lisp/bs.el
|
||||
lisp/server.el
|
||||
lib-src/emacsclient.c
|
||||
lib-src/grep-changelog
|
||||
|
||||
==============================================================================
|
||||
3.
|
||||
==============================================================================
|
||||
|
|
116
Makefile.in
116
Makefile.in
|
@ -158,6 +158,9 @@ bitmapdir=@bitmapdir@
|
|||
# We use $(srcdir) explicitly in dependencies so as not to depend on VPATH.
|
||||
srcdir=@srcdir@
|
||||
|
||||
# Where the manpage source files are kept.
|
||||
mansrcdir=$(srcdir)/doc/man
|
||||
|
||||
# Tell make where to find source files; this is needed for the makefiles.
|
||||
VPATH=@srcdir@
|
||||
|
||||
|
@ -250,7 +253,7 @@ EMACSFULL = `echo emacs-${version}${EXEEXT} | sed '$(TRANSFORM)'`
|
|||
SUBDIR = lib-src src
|
||||
|
||||
# The makefiles of the directories in $SUBDIR.
|
||||
SUBDIR_MAKEFILES = lib-src/Makefile man/Makefile lispref/Makefile lispintro/Makefile src/Makefile oldXMenu/Makefile lwlib/Makefile leim/Makefile
|
||||
SUBDIR_MAKEFILES = lib-src/Makefile doc/emacs/Makefile doc/misc/Makefile doc/lispref/Makefile doc/lispintro/Makefile src/Makefile oldXMenu/Makefile lwlib/Makefile leim/Makefile
|
||||
|
||||
# Subdirectories to install, and where they'll go.
|
||||
# lib-src's makefile knows how to install it, so we don't do that here.
|
||||
|
@ -336,13 +339,16 @@ src/config.stamp: $(srcdir)/src/config.in config.status
|
|||
lib-src/Makefile: $(srcdir)/lib-src/Makefile.in config.status
|
||||
./config.status
|
||||
|
||||
man/Makefile: $(srcdir)/man/Makefile.in config.status
|
||||
doc/emacs/Makefile: $(srcdir)/doc/emacs/Makefile.in config.status
|
||||
./config.status
|
||||
|
||||
lispref/Makefile: $(srcdir)/lispref/Makefile.in config.status
|
||||
doc/misc/Makefile: $(srcdir)/doc/misc/Makefile.in config.status
|
||||
./config.status
|
||||
|
||||
lispintro/Makefile: $(srcdir)/lispintro/Makefile.in config.status
|
||||
doc/lispref/Makefile: $(srcdir)/doc/lispref/Makefile.in config.status
|
||||
./config.status
|
||||
|
||||
doc/lispintro/Makefile: $(srcdir)/doc/lispintro/Makefile.in config.status
|
||||
./config.status
|
||||
|
||||
oldXMenu/Makefile: $(srcdir)/oldXMenu/Makefile.in config.status
|
||||
|
@ -414,6 +420,9 @@ install-arch-dep: mkdir
|
|||
|
||||
## If people complain about the h flag in tar command, take that out.
|
||||
## That flag is also used in leim/Makefile.in
|
||||
|
||||
## Note that the Makefiles in the etc directory are potentially useful
|
||||
## in an installed Emacs, so should not be excluded.
|
||||
install-arch-indep: mkdir info
|
||||
-set ${COPYDESTS} ; \
|
||||
unset CDPATH; \
|
||||
|
@ -446,7 +455,8 @@ install-arch-indep: mkdir info
|
|||
rm -f $${subdir}/.\#* ; \
|
||||
rm -f $${subdir}/*~ ; \
|
||||
rm -f $${subdir}/*.orig ; \
|
||||
rm -f $${subdir}/[mM]akefile* ; \
|
||||
[ "$${dir}" != "${srcdir}/etc" ] && \
|
||||
rm -f $${subdir}/[mM]akefile* ; \
|
||||
rm -f $${subdir}/ChangeLog* ; \
|
||||
rm -f $${subdir}/dired.todo ; \
|
||||
done) ; \
|
||||
|
@ -534,10 +544,10 @@ install-arch-indep: mkdir info
|
|||
else true; fi
|
||||
-chmod -R a+r $(DESTDIR)${datadir}/emacs/${version} $(DESTDIR)${datadir}/emacs/site-lisp ${COPYDESTS} $(DESTDIR)${infodir}
|
||||
thisdir=`/bin/pwd`; \
|
||||
cd ${srcdir}/etc; \
|
||||
cd ${mansrcdir}; \
|
||||
for page in emacs emacsclient etags ctags ; do \
|
||||
(cd $${thisdir}; \
|
||||
${INSTALL_DATA} ${srcdir}/etc/$${page}.1 $(DESTDIR)${man1dir}/$${page}${manext}; \
|
||||
${INSTALL_DATA} ${mansrcdir}/$${page}.1 $(DESTDIR)${man1dir}/$${page}${manext}; \
|
||||
chmod a+r $(DESTDIR)${man1dir}/$${page}${manext}); \
|
||||
done
|
||||
|
||||
|
@ -620,9 +630,10 @@ mostlyclean: FRC
|
|||
(cd oldXMenu; $(MAKE) $(MFLAGS) mostlyclean)
|
||||
(cd lwlib; $(MAKE) $(MFLAGS) mostlyclean)
|
||||
(cd lib-src; $(MAKE) $(MFLAGS) mostlyclean)
|
||||
-(cd man && $(MAKE) $(MFLAGS) mostlyclean)
|
||||
-(cd lispref && $(MAKE) $(MFLAGS) mostlyclean)
|
||||
-(cd lispintro && $(MAKE) $(MFLAGS) mostlyclean)
|
||||
-(cd doc/emacs && $(MAKE) $(MFLAGS) mostlyclean)
|
||||
-(cd doc/misc && $(MAKE) $(MFLAGS) mostlyclean)
|
||||
-(cd doc/lispref && $(MAKE) $(MFLAGS) mostlyclean)
|
||||
-(cd doc/lispintro && $(MAKE) $(MFLAGS) mostlyclean)
|
||||
(cd leim; $(MAKE) $(MFLAGS) mostlyclean)
|
||||
|
||||
### `clean'
|
||||
|
@ -638,9 +649,10 @@ clean: FRC
|
|||
(cd oldXMenu; $(MAKE) $(MFLAGS) clean)
|
||||
(cd lwlib; $(MAKE) $(MFLAGS) clean)
|
||||
(cd lib-src; $(MAKE) $(MFLAGS) clean)
|
||||
-(cd man && $(MAKE) $(MFLAGS) clean)
|
||||
-(cd lispref && $(MAKE) $(MFLAGS) clean)
|
||||
-(cd lispintro && $(MAKE) $(MFLAGS) clean)
|
||||
-(cd doc/emacs && $(MAKE) $(MFLAGS) clean)
|
||||
-(cd doc/misc && $(MAKE) $(MFLAGS) clean)
|
||||
-(cd doc/lispref && $(MAKE) $(MFLAGS) clean)
|
||||
-(cd doc/lispintro && $(MAKE) $(MFLAGS) clean)
|
||||
(cd leim; $(MAKE) $(MFLAGS) clean)
|
||||
|
||||
### `distclean'
|
||||
|
@ -658,9 +670,10 @@ distclean: FRC
|
|||
(cd oldXMenu; $(MAKE) $(MFLAGS) distclean)
|
||||
(cd lwlib; $(MAKE) $(MFLAGS) distclean)
|
||||
(cd lib-src; $(MAKE) $(MFLAGS) distclean)
|
||||
(cd man && $(MAKE) $(MFLAGS) distclean)
|
||||
(cd lispref && $(MAKE) $(MFLAGS) distclean)
|
||||
(cd lispintro && $(MAKE) $(MFLAGS) distclean)
|
||||
(cd doc/emacs && $(MAKE) $(MFLAGS) distclean)
|
||||
(cd doc/misc && $(MAKE) $(MFLAGS) distclean)
|
||||
(cd doc/lispref && $(MAKE) $(MFLAGS) distclean)
|
||||
(cd doc/lispintro && $(MAKE) $(MFLAGS) distclean)
|
||||
(cd leim; $(MAKE) $(MFLAGS) distclean)
|
||||
(cd lisp; $(MAKE) $(MFLAGS) distclean)
|
||||
${top_distclean}
|
||||
|
@ -681,9 +694,10 @@ maintainer-clean: FRC
|
|||
(cd oldXMenu; $(MAKE) $(MFLAGS) maintainer-clean)
|
||||
(cd lwlib; $(MAKE) $(MFLAGS) maintainer-clean)
|
||||
(cd lib-src; $(MAKE) $(MFLAGS) maintainer-clean)
|
||||
-(cd man && $(MAKE) $(MFLAGS) maintainer-clean)
|
||||
-(cd lispref && $(MAKE) $(MFLAGS) maintainer-clean)
|
||||
-(cd lispintro && $(MAKE) $(MFLAGS) maintainer-clean)
|
||||
-(cd doc/emacs && $(MAKE) $(MFLAGS) maintainer-clean)
|
||||
-(cd doc/misc && $(MAKE) $(MFLAGS) maintainer-clean)
|
||||
-(cd doc/lispref && $(MAKE) $(MFLAGS) maintainer-clean)
|
||||
-(cd doc/lispintro && $(MAKE) $(MFLAGS) maintainer-clean)
|
||||
(cd leim; $(MAKE) $(MFLAGS) maintainer-clean)
|
||||
(cd lisp; $(MAKE) $(MFLAGS) maintainer-clean)
|
||||
${top_distclean}
|
||||
|
@ -698,49 +712,6 @@ extraclean:
|
|||
-rm -f config-tmp-*
|
||||
-rm -f *~ \#*
|
||||
|
||||
### Unlocking and relocking. The idea of these productions is to reduce
|
||||
### hassles when installing an incremental tar of Emacs. Do `make unlock'
|
||||
### before unlocking the file to take the write locks off all sources so
|
||||
### that tar xvof will overwrite them without fuss. Then do `make relock'
|
||||
### afterward so that VC mode will know which files should be checked in
|
||||
### if you want to mung them.
|
||||
###
|
||||
### Note: it's no disaster if these productions miss a file or two; tar
|
||||
### and VC will swiftly let you know if this happens, and it is easily
|
||||
### corrected.
|
||||
SOURCES = ChangeLog FTP INSTALL Makefile.in \
|
||||
README configure make-dist move-if-change
|
||||
|
||||
.PHONY: unlock relock
|
||||
|
||||
unlock:
|
||||
chmod u+w $(SOURCES)
|
||||
-(cd elisp; chmod u+w Makefile README *.texi)
|
||||
(cd etc; $(MAKE) $(MFLAGS) unlock)
|
||||
(cd lib-src; $(MAKE) $(MFLAGS) unlock)
|
||||
(cd lisp; $(MAKE) $(MFLAGS) unlock)
|
||||
(cd lisp/term; chmod u+w README *.el)
|
||||
(cd man; chmod u+w *texi* ChangeLog split-man)
|
||||
(cd lispref; chmod u+w *texi* ChangeLog)
|
||||
(cd lispintro; chmod u+w *texi* ChangeLog)
|
||||
(cd oldXMenu; chmod u+w *.[ch] Makefile README)
|
||||
(cd lwlib; chmod u+w *.[ch] Makefile README)
|
||||
(cd src; $(MAKE) $(MFLAGS) unlock)
|
||||
|
||||
relock:
|
||||
chmod u-w $(SOURCES)
|
||||
-(cd elisp; chmod u-w Makefile README *.texi)
|
||||
(cd etc; $(MAKE) $(MFLAGS) relock)
|
||||
(cd lib-src; $(MAKE) $(MFLAGS) relock)
|
||||
(cd lisp; $(MAKE) $(MFLAGS) relock)
|
||||
(cd lisp/term; chmod u+w README *.el)
|
||||
(cd man; chmod u+w *texi* ChangeLog split-man)
|
||||
(cd lispref; chmod u+w *texi* ChangeLog)
|
||||
(cd lispintro; chmod u+w *texi* ChangeLog)
|
||||
(cd oldXMenu; chmod u+w *.[ch] Makefile README)
|
||||
(cd lwlib; chmod u+w *.[ch] Makefile README)
|
||||
(cd src; $(MAKE) $(MFLAGS) relock)
|
||||
|
||||
# The src subdir knows how to do the right thing
|
||||
# even when the build directory and source dir are different.
|
||||
TAGS tags: lib-src src
|
||||
|
@ -758,13 +729,15 @@ force-info:
|
|||
# put the info files in $(srcdir),
|
||||
# so we can do ok running make in the build dir.
|
||||
info: force-info
|
||||
-(cd man; $(MAKE) $(MFLAGS) info)
|
||||
-(cd lispref; $(MAKE) $(MFLAGS) info)
|
||||
-(cd lispintro; $(MAKE) $(MFLAGS) info)
|
||||
-(cd doc/emacs; $(MAKE) $(MFLAGS) info)
|
||||
-(cd doc/misc; $(MAKE) $(MFLAGS) info)
|
||||
-(cd doc/lispref; $(MAKE) $(MFLAGS) info)
|
||||
-(cd doc/lispintro; $(MAKE) $(MFLAGS) info)
|
||||
dvi:
|
||||
(cd man; $(MAKE) $(MFLAGS) dvi)
|
||||
(cd lispref; $(MAKE) $(MFLAGS) elisp.dvi)
|
||||
(cd lispintro; $(MAKE) $(MFLAGS) emacs-lisp-intro.dvi)
|
||||
(cd doc/emacs; $(MAKE) $(MFLAGS) dvi)
|
||||
(cd doc/misc; $(MAKE) $(MFLAGS) dvi)
|
||||
(cd doc/lispref; $(MAKE) $(MFLAGS) elisp.dvi)
|
||||
(cd doc/lispintro; $(MAKE) $(MFLAGS) emacs-lisp-intro.dvi)
|
||||
|
||||
#### Bootstrapping.
|
||||
|
||||
|
@ -813,7 +786,8 @@ bootstrap-clean-before-fast: FRC
|
|||
(cd oldXMenu; $(MAKE) $(MFLAGS) clean)
|
||||
(cd lwlib; $(MAKE) $(MFLAGS) clean)
|
||||
(cd lib-src; $(MAKE) $(MFLAGS) clean)
|
||||
-(cd man && $(MAKE) $(MFLAGS) clean)
|
||||
-(cd lispref && $(MAKE) $(MFLAGS) clean)
|
||||
-(cd lispintro && $(MAKE) $(MFLAGS) clean)
|
||||
-(cd doc/emacs && $(MAKE) $(MFLAGS) clean)
|
||||
-(cd doc/misc && $(MAKE) $(MFLAGS) clean)
|
||||
-(cd doc/lispref && $(MAKE) $(MFLAGS) clean)
|
||||
-(cd doc/lispintro && $(MAKE) $(MFLAGS) clean)
|
||||
(cd leim; $(MAKE) $(MFLAGS) clean)
|
||||
|
|
11
README
11
README
|
@ -3,7 +3,7 @@ Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007
|
|||
See the end of the file for license conditions.
|
||||
|
||||
|
||||
This directory tree holds version 22.1.50 of GNU Emacs, the extensible,
|
||||
This directory tree holds version 23.0.50 of GNU Emacs, the extensible,
|
||||
customizable, self-documenting real-time display editor.
|
||||
|
||||
The file INSTALL in this directory says how to build and install GNU
|
||||
|
@ -73,14 +73,13 @@ There are several subdirectories:
|
|||
`man', `lispref', and `lispintro' subdirectories are
|
||||
architecture-independent too.
|
||||
`info' holds the Info documentation tree for Emacs.
|
||||
`man' holds the source code for the Emacs Manual. If you modify the
|
||||
`doc/emacs' holds the source code for the Emacs Manual. If you modify the
|
||||
manual sources, you will need the `makeinfo' program to produce
|
||||
an updated manual. `makeinfo' is part of the GNU Texinfo
|
||||
package; you need version 4.6 or later of Texinfo.
|
||||
`lispref' holds the source code for the Emacs Lisp reference manual.
|
||||
`lispintro' holds the source code for the Introduction to Programming
|
||||
in Emacs Lisp manual.
|
||||
|
||||
`doc/lispref' holds the source code for the Emacs Lisp reference manual.
|
||||
`doc/lispintro' holds the source code for the Introduction to Programming
|
||||
in Emacs Lisp manual.
|
||||
`msdos' holds configuration files for compiling Emacs under MSDOG.
|
||||
`vms' holds instructions and useful files for running Emacs under VMS.
|
||||
`nt' holds various command files and documentation files that pertain
|
||||
|
|
19
config.bat
19
config.bat
|
@ -235,22 +235,11 @@ mv -f makefile.tmp Makefile
|
|||
cd ..
|
||||
:oldx1
|
||||
rem ----------------------------------------------------------------------
|
||||
Echo Configuring the manual directory...
|
||||
cd man
|
||||
sed -f ../msdos/sed6.inp < Makefile.in > Makefile
|
||||
cd ..
|
||||
rem ----------------------------------------------------------------------
|
||||
Echo Configuring the ELisp manual directory...
|
||||
cd lispref
|
||||
sed -f ../msdos/sed6.inp < Makefile.in > Makefile
|
||||
cd ..
|
||||
rem ----------------------------------------------------------------------
|
||||
Echo Configuring the ELisp Introduction manual directory...
|
||||
Rem The two variants for the line below is for when the shell
|
||||
Echo Configuring the doc directory...
|
||||
cd doc
|
||||
Rem The two variants for lispintro below is for when the shell
|
||||
Rem supports long file names but DJGPP does not
|
||||
if exist lispintro\Makefile.in cd lispintro
|
||||
if exist lispintr\Makefile.in cd lispintr
|
||||
sed -f ../msdos/sed6.inp < Makefile.in > Makefile
|
||||
for %%d in (emacs lispref lispintro lispintr misc) do sed -f ../msdos/sed6.inp < %%d\Makefile.in > %%d\Makefile
|
||||
cd ..
|
||||
rem ----------------------------------------------------------------------
|
||||
Echo Configuring the lisp directory...
|
||||
|
|
65
configure
vendored
65
configure
vendored
|
@ -1324,12 +1324,14 @@ if test -n "$ac_init_help"; then
|
|||
Optional Features:
|
||||
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
|
||||
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
|
||||
--enable-carbon-app[=DIR] [DIR=/Application]
|
||||
--enable-carbon-app[=DIR]
|
||||
specify install directory for Emacs.app on Mac OS X
|
||||
[DIR=/Application]
|
||||
--enable-font-backend compile code of font-backend support
|
||||
--enable-asserts compile code with asserts enabled
|
||||
--enable-maintainer-mode enable make rules and dependencies not useful
|
||||
(and sometimes confusing) to the casual installer
|
||||
--enable-maintainer-mode
|
||||
enable make rules and dependencies not useful (and
|
||||
sometimes confusing) to the casual installer
|
||||
--enable-locallisppath=PATH
|
||||
directories Emacs should search for lisp files
|
||||
specific to this site
|
||||
|
@ -1344,8 +1346,8 @@ Optional Packages:
|
|||
--with-kerberos5 support Kerberos version 5 authenticated POP
|
||||
--with-hesiod support Hesiod to get the POP server host
|
||||
--without-sound don't compile with sound support
|
||||
--with-x-toolkit=KIT use an X toolkit
|
||||
(KIT = yes/lucid/athena/motif/gtk/no)
|
||||
--with-x-toolkit=KIT use an X toolkit (KIT one of: yes, lucid, athena,
|
||||
motif, gtk, no)
|
||||
--with-xpm use -lXpm for displaying XPM images
|
||||
--with-jpeg use -ljpeg for displaying JPEG images
|
||||
--with-tiff use -ltiff for displaying TIFF images
|
||||
|
@ -1356,9 +1358,10 @@ Optional Packages:
|
|||
--with-gpm use -lgpm for mouse support on a GNU/Linux console
|
||||
--with-rsvg use -lrsvg-2 for displaying SVG images
|
||||
--with-gtk use GTK (same as --with-x-toolkit=gtk)
|
||||
--with-pkg-config-prog Path to pkg-config to use for finding GTK and librsvg
|
||||
--with-pkg-config-prog Path to pkg-config for finding GTK and librsvg
|
||||
--without-toolkit-scroll-bars
|
||||
don't use Motif or Xaw3d scroll bars
|
||||
--without-xaw3d don't use Xaw3d
|
||||
--without-xim don't use X11 XIM
|
||||
--without-carbon don't use Carbon GUI on Mac OS X
|
||||
--with-x use the X Window System
|
||||
|
@ -1828,12 +1831,14 @@ gamedir='${localstatedir}/games/emacs'
|
|||
gameuser=games
|
||||
|
||||
|
||||
|
||||
# Check whether --with-gcc was given.
|
||||
if test "${with_gcc+set}" = set; then
|
||||
withval=$with_gcc;
|
||||
fi
|
||||
|
||||
|
||||
|
||||
# Check whether --with-pop was given.
|
||||
if test "${with_pop+set}" = set; then
|
||||
withval=$with_pop; if test "$withval" = yes; then
|
||||
|
@ -1852,6 +1857,7 @@ fi
|
|||
|
||||
|
||||
|
||||
|
||||
# Check whether --with-kerberos was given.
|
||||
if test "${with_kerberos+set}" = set; then
|
||||
withval=$with_kerberos; if test "$withval" = yes; then
|
||||
|
@ -1864,6 +1870,7 @@ fi
|
|||
|
||||
|
||||
|
||||
|
||||
# Check whether --with-kerberos5 was given.
|
||||
if test "${with_kerberos5+set}" = set; then
|
||||
withval=$with_kerberos5; if test "${with_kerberos5+set}" = set; then
|
||||
|
@ -1883,6 +1890,7 @@ fi
|
|||
fi
|
||||
|
||||
|
||||
|
||||
# Check whether --with-hesiod was given.
|
||||
if test "${with_hesiod+set}" = set; then
|
||||
withval=$with_hesiod; if test "$withval" = yes; then
|
||||
|
@ -1927,6 +1935,7 @@ this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif' or \`
|
|||
fi
|
||||
|
||||
|
||||
|
||||
# Check whether --with-xpm was given.
|
||||
if test "${with_xpm+set}" = set; then
|
||||
withval=$with_xpm;
|
||||
|
@ -1999,6 +2008,12 @@ if test "${with_toolkit_scroll_bars+set}" = set; then
|
|||
fi
|
||||
|
||||
|
||||
# Check whether --with-xaw3d was given.
|
||||
if test "${with_xaw3d+set}" = set; then
|
||||
withval=$with_xaw3d;
|
||||
fi
|
||||
|
||||
|
||||
# Check whether --with-xim was given.
|
||||
if test "${with_xim+set}" = set; then
|
||||
withval=$with_xim;
|
||||
|
@ -2010,6 +2025,7 @@ if test "${with_carbon+set}" = set; then
|
|||
withval=$with_carbon;
|
||||
fi
|
||||
|
||||
|
||||
# Check whether --enable-carbon-app was given.
|
||||
if test "${enable_carbon_app+set}" = set; then
|
||||
enableval=$enable_carbon_app; carbon_appdir_x=${enableval}
|
||||
|
@ -5404,7 +5420,7 @@ fi
|
|||
|
||||
|
||||
if test "$MAKEINFO" != "no" && \
|
||||
test x"`$MAKEINFO --version 2> /dev/null | $EGREP 'texinfo[^0-9]*([5-9]|4\.[6-9])'`" = x; then
|
||||
test x"`$MAKEINFO --version 2> /dev/null | $EGREP 'texinfo[^0-9]*([1-4][0-9]+|[5-9]|4\.[6-9]|4\.[1-5][0-9]+)'`" = x; then
|
||||
MAKEINFO=no
|
||||
fi
|
||||
|
||||
|
@ -11298,8 +11314,8 @@ if test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "gtk" || \
|
|||
echo "$as_me: error: Conflicting options, --with-gtk is incompatible with --with-x-toolkit=${with_x_toolkit}" >&2;}
|
||||
{ (exit 1); exit 1; }; };
|
||||
fi
|
||||
GLIB_REQUIRED=2.4
|
||||
GTK_REQUIRED=2.4
|
||||
GLIB_REQUIRED=2.6
|
||||
GTK_REQUIRED=2.6
|
||||
GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
|
||||
|
||||
if test "X${with_pkg_config_prog}" != X; then
|
||||
|
@ -11638,6 +11654,7 @@ cat >>confdefs.h <<\_ACEOF
|
|||
_ACEOF
|
||||
|
||||
fi
|
||||
|
||||
HAVE_GTK_FILE_SELECTION=no
|
||||
|
||||
for ac_func in gtk_file_selection_new
|
||||
|
@ -12049,7 +12066,10 @@ fi
|
|||
|
||||
fi
|
||||
if test "$HAVE_GTK_AND_PTHREAD" = yes; then
|
||||
GTK_LIBS="$GTK_LIBS -lpthread"
|
||||
case "${canonical}" in
|
||||
*-hpux*) ;;
|
||||
*) GTK_LIBS="$GTK_LIBS -lpthread" ;;
|
||||
esac
|
||||
|
||||
cat >>confdefs.h <<\_ACEOF
|
||||
#define HAVE_GTK_AND_PTHREAD 1
|
||||
|
@ -12064,9 +12084,10 @@ if test x"${USE_X_TOOLKIT}" = xmaybe || test x"${USE_X_TOOLKIT}" = xLUCID; then
|
|||
if test x"${HAVE_X11R5}" != xyes; then
|
||||
USE_X_TOOLKIT=none
|
||||
else
|
||||
{ echo "$as_me:$LINENO: checking for xaw3d" >&5
|
||||
if test "$with_xaw3d" != no; then
|
||||
{ echo "$as_me:$LINENO: checking for xaw3d" >&5
|
||||
echo $ECHO_N "checking for xaw3d... $ECHO_C" >&6; }
|
||||
if test "${emacs_cv_xaw3d+set}" = set; then
|
||||
if test "${emacs_cv_xaw3d+set}" = set; then
|
||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
else
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
|
@ -12116,6 +12137,9 @@ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
|
|||
conftest$ac_exeext conftest.$ac_ext
|
||||
fi
|
||||
|
||||
else
|
||||
emacs_cv_xaw3d=no
|
||||
fi
|
||||
if test $emacs_cv_xaw3d = yes; then
|
||||
{ echo "$as_me:$LINENO: result: yes; using Lucid toolkit" >&5
|
||||
echo "${ECHO_T}yes; using Lucid toolkit" >&6; }
|
||||
|
@ -15707,6 +15731,12 @@ _ACEOF
|
|||
fi
|
||||
|
||||
|
||||
if test x"$ac_cv_func_alloca_works" != xyes; then
|
||||
{ { echo "$as_me:$LINENO: error: a system implementation of alloca is required " >&5
|
||||
echo "$as_me: error: a system implementation of alloca is required " >&2;}
|
||||
{ (exit 1); exit 1; }; }
|
||||
fi
|
||||
|
||||
# fmod, logb, and frexp are found in -lm on most systems.
|
||||
# On HPUX 9.01, -lm does not contain logb, so check for sqrt.
|
||||
|
||||
|
@ -24144,7 +24174,7 @@ fi
|
|||
rm -f conftest*
|
||||
|
||||
|
||||
ac_config_files="$ac_config_files Makefile lib-src/Makefile.c:lib-src/Makefile.in oldXMenu/Makefile man/Makefile lwlib/Makefile src/Makefile.c:src/Makefile.in lisp/Makefile lispref/Makefile lispintro/Makefile leim/Makefile"
|
||||
ac_config_files="$ac_config_files Makefile lib-src/Makefile.c:lib-src/Makefile.in oldXMenu/Makefile doc/emacs/Makefile doc/misc/Makefile doc/lispintro/Makefile doc/lispref/Makefile src/Makefile.c:src/Makefile.in lwlib/Makefile lisp/Makefile leim/Makefile"
|
||||
|
||||
ac_config_commands="$ac_config_commands default"
|
||||
|
||||
|
@ -24714,12 +24744,13 @@ do
|
|||
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
|
||||
"lib-src/Makefile.c") CONFIG_FILES="$CONFIG_FILES lib-src/Makefile.c:lib-src/Makefile.in" ;;
|
||||
"oldXMenu/Makefile") CONFIG_FILES="$CONFIG_FILES oldXMenu/Makefile" ;;
|
||||
"man/Makefile") CONFIG_FILES="$CONFIG_FILES man/Makefile" ;;
|
||||
"lwlib/Makefile") CONFIG_FILES="$CONFIG_FILES lwlib/Makefile" ;;
|
||||
"doc/emacs/Makefile") CONFIG_FILES="$CONFIG_FILES doc/emacs/Makefile" ;;
|
||||
"doc/misc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/misc/Makefile" ;;
|
||||
"doc/lispintro/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispintro/Makefile" ;;
|
||||
"doc/lispref/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispref/Makefile" ;;
|
||||
"src/Makefile.c") CONFIG_FILES="$CONFIG_FILES src/Makefile.c:src/Makefile.in" ;;
|
||||
"lwlib/Makefile") CONFIG_FILES="$CONFIG_FILES lwlib/Makefile" ;;
|
||||
"lisp/Makefile") CONFIG_FILES="$CONFIG_FILES lisp/Makefile" ;;
|
||||
"lispref/Makefile") CONFIG_FILES="$CONFIG_FILES lispref/Makefile" ;;
|
||||
"lispintro/Makefile") CONFIG_FILES="$CONFIG_FILES lispintro/Makefile" ;;
|
||||
"leim/Makefile") CONFIG_FILES="$CONFIG_FILES leim/Makefile" ;;
|
||||
"default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
|
||||
|
||||
|
|
181
configure.in
181
configure.in
|
@ -3,8 +3,8 @@ dnl To rebuild the `configure' script from this, execute the command
|
|||
dnl autoconf
|
||||
dnl in the directory containing this script.
|
||||
dnl
|
||||
dnl Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
|
||||
dnl Free Software Foundation, Inc.
|
||||
dnl Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2003,
|
||||
dnl 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
dnl
|
||||
dnl This file is part of GNU Emacs.
|
||||
dnl
|
||||
|
@ -42,25 +42,33 @@ gamedir='${localstatedir}/games/emacs'
|
|||
|
||||
gameuser=games
|
||||
|
||||
AC_ARG_WITH(gcc,
|
||||
[ --without-gcc don't use GCC to compile Emacs if GCC is found])
|
||||
AC_ARG_WITH(pop,
|
||||
[ --without-pop don't support POP mail retrieval with movemail],
|
||||
dnl Autoconf is so much less fun under VMS, maybe
|
||||
dnl because everything is less fun under VMS. --ttn
|
||||
AC_DEFUN([EMACS_ARG_Y],[dnl
|
||||
AC_ARG_WITH([$1],[AS_HELP_STRING([--with-$1],[$2])],[$3],[$4])dnl
|
||||
])dnl
|
||||
AC_DEFUN([EMACS_ARG_N],[dnl
|
||||
AC_ARG_WITH([$1],[AS_HELP_STRING([--without-$1],[$2])],[$3],[$4])dnl
|
||||
])dnl
|
||||
|
||||
EMACS_ARG_N([gcc],[don't use GCC to compile Emacs if GCC is found])
|
||||
|
||||
EMACS_ARG_N([pop],[don't support POP mail retrieval with movemail],
|
||||
[if test "$withval" = yes; then
|
||||
AC_DEFINE(MAIL_USE_POP)
|
||||
else :
|
||||
fi],
|
||||
AC_DEFINE(MAIL_USE_POP))
|
||||
AH_TEMPLATE(MAIL_USE_POP, [Define to support POP mail retrieval.])dnl
|
||||
AC_ARG_WITH(kerberos,
|
||||
[ --with-kerberos support Kerberos-authenticated POP],
|
||||
|
||||
EMACS_ARG_Y([kerberos],[support Kerberos-authenticated POP],
|
||||
[if test "$withval" = yes; then
|
||||
AC_DEFINE(KERBEROS)
|
||||
fi])
|
||||
AH_TEMPLATE(KERBEROS,
|
||||
[Define to support Kerberos-authenticated POP mail retrieval.])dnl
|
||||
AC_ARG_WITH(kerberos5,
|
||||
[ --with-kerberos5 support Kerberos version 5 authenticated POP],
|
||||
|
||||
EMACS_ARG_Y([kerberos5],[support Kerberos version 5 authenticated POP],
|
||||
[if test "${with_kerberos5+set}" = set; then
|
||||
if test "${with_kerberos+set}" != set; then
|
||||
with_kerberos=yes
|
||||
|
@ -68,21 +76,19 @@ AC_ARG_WITH(kerberos5,
|
|||
fi
|
||||
AC_DEFINE(KERBEROS5, 1, [Define to use Kerberos 5 instead of Kerberos 4.])
|
||||
fi])
|
||||
AC_ARG_WITH(hesiod,
|
||||
[ --with-hesiod support Hesiod to get the POP server host],
|
||||
|
||||
EMACS_ARG_Y([hesiod],[support Hesiod to get the POP server host],
|
||||
[if test "$withval" = yes; then
|
||||
AC_DEFINE(HESIOD, 1, [Define to support using a Hesiod database to find the POP server.])
|
||||
fi])
|
||||
|
||||
AC_ARG_WITH(sound,
|
||||
[ --without-sound don't compile with sound support])
|
||||
EMACS_ARG_N([sound],[don't compile with sound support])
|
||||
|
||||
dnl This should be the last --with option, because --with-x is
|
||||
dnl added later on when we find the path of X, and it's best to
|
||||
dnl keep them together visually.
|
||||
AC_ARG_WITH(x-toolkit,
|
||||
[ --with-x-toolkit=KIT use an X toolkit
|
||||
(KIT = yes/lucid/athena/motif/gtk/no)],
|
||||
AC_ARG_WITH([x-toolkit],[AS_HELP_STRING([--with-x-toolkit=KIT],
|
||||
[use an X toolkit (KIT one of: yes, lucid, athena, motif, gtk, no)])],
|
||||
[ case "${withval}" in
|
||||
y | ye | yes ) val=gtk ;;
|
||||
n | no ) val=no ;;
|
||||
|
@ -98,38 +104,27 @@ this option's value should be `yes', `no', `lucid', `athena', `motif' or `gtk'.
|
|||
esac
|
||||
with_x_toolkit=$val
|
||||
])
|
||||
AC_ARG_WITH(xpm,
|
||||
[ --with-xpm use -lXpm for displaying XPM images])
|
||||
AC_ARG_WITH(jpeg,
|
||||
[ --with-jpeg use -ljpeg for displaying JPEG images])
|
||||
AC_ARG_WITH(tiff,
|
||||
[ --with-tiff use -ltiff for displaying TIFF images])
|
||||
AC_ARG_WITH(gif,
|
||||
[ --with-gif use -lgif (or -lungif) for displaying GIF images])
|
||||
AC_ARG_WITH(png,
|
||||
[ --with-png use -lpng for displaying PNG images])
|
||||
AC_ARG_WITH(freetype,
|
||||
[ --with-freetype use -lfreetype for local fonts support])
|
||||
AC_ARG_WITH(xft,
|
||||
[ --with-xft use -lXft for anti aliased fonts])
|
||||
AC_ARG_WITH(gpm,
|
||||
[ --with-gpm use -lgpm for mouse support on a GNU/Linux console])
|
||||
AC_ARG_WITH(rsvg,
|
||||
[ --with-rsvg use -lrsvg-2 for displaying SVG images])
|
||||
AC_ARG_WITH(gtk,
|
||||
[ --with-gtk use GTK (same as --with-x-toolkit=gtk)])
|
||||
AC_ARG_WITH(pkg-config-prog,
|
||||
[ --with-pkg-config-prog Path to pkg-config to use for finding GTK and librsvg])
|
||||
AC_ARG_WITH(toolkit-scroll-bars,
|
||||
[ --without-toolkit-scroll-bars
|
||||
don't use Motif or Xaw3d scroll bars])
|
||||
AC_ARG_WITH(xim,
|
||||
[ --without-xim don't use X11 XIM])
|
||||
AC_ARG_WITH(carbon,
|
||||
[ --without-carbon don't use Carbon GUI on Mac OS X])
|
||||
|
||||
EMACS_ARG_Y([xpm],[use -lXpm for displaying XPM images])
|
||||
EMACS_ARG_Y([jpeg],[use -ljpeg for displaying JPEG images])
|
||||
EMACS_ARG_Y([tiff],[use -ltiff for displaying TIFF images])
|
||||
EMACS_ARG_Y([gif],[use -lgif (or -lungif) for displaying GIF images])
|
||||
EMACS_ARG_Y([png],[use -lpng for displaying PNG images])
|
||||
EMACS_ARG_Y([freetype],[use -lfreetype for local fonts support])
|
||||
EMACS_ARG_Y([xft],[use -lXft for anti aliased fonts])
|
||||
EMACS_ARG_Y([gpm],[use -lgpm for mouse support on a GNU/Linux console])
|
||||
EMACS_ARG_Y([rsvg],[use -lrsvg-2 for displaying SVG images])
|
||||
EMACS_ARG_Y([gtk],[use GTK (same as --with-x-toolkit=gtk)])
|
||||
EMACS_ARG_Y([pkg-config-prog],[Path to pkg-config for finding GTK and librsvg])
|
||||
EMACS_ARG_N([toolkit-scroll-bars],[don't use Motif or Xaw3d scroll bars])
|
||||
EMACS_ARG_N([xaw3d],[don't use Xaw3d])
|
||||
EMACS_ARG_N([xim],[don't use X11 XIM])
|
||||
EMACS_ARG_N([carbon],[don't use Carbon GUI on Mac OS X])
|
||||
|
||||
AC_ARG_ENABLE(carbon-app,
|
||||
[[ --enable-carbon-app[=DIR] [DIR=/Application]
|
||||
specify install directory for Emacs.app on Mac OS X]],
|
||||
[AS_HELP_STRING([--enable-carbon-app@<:@=DIR@:>@],
|
||||
[specify install directory for Emacs.app on Mac OS X
|
||||
[DIR=/Application]])],
|
||||
[ carbon_appdir_x=${enableval}])
|
||||
|
||||
AC_ARG_ENABLE(font-backend,
|
||||
|
@ -138,13 +133,14 @@ AC_ARG_ENABLE(font-backend,
|
|||
USE_FONT_BACKEND=no)
|
||||
|
||||
AC_ARG_ENABLE(asserts,
|
||||
[ --enable-asserts compile code with asserts enabled],
|
||||
[AS_HELP_STRING([--enable-asserts], [compile code with asserts enabled])],
|
||||
USE_XASSERTS=$enableval,
|
||||
USE_XASSERTS=no)
|
||||
|
||||
AC_ARG_ENABLE(maintainer-mode,
|
||||
[ --enable-maintainer-mode enable make rules and dependencies not useful
|
||||
(and sometimes confusing) to the casual installer],
|
||||
[AS_HELP_STRING([--enable-maintainer-mode],
|
||||
[enable make rules and dependencies not useful (and sometimes
|
||||
confusing) to the casual installer])],
|
||||
USE_MAINTAINER_MODE=$enableval,
|
||||
USE_MAINTAINER_MODE=no)
|
||||
if test $USE_MAINTAINER_MODE = yes; then
|
||||
|
@ -155,9 +151,9 @@ fi
|
|||
AC_SUBST(MAINT)
|
||||
|
||||
AC_ARG_ENABLE(locallisppath,
|
||||
[ --enable-locallisppath=PATH
|
||||
directories Emacs should search for lisp files
|
||||
specific to this site],
|
||||
[AS_HELP_STRING([--enable-locallisppath=PATH],
|
||||
[directories Emacs should search for lisp files specific
|
||||
to this site])],
|
||||
if test "${enableval}" = "no"; then
|
||||
locallisppath=
|
||||
elif test "${enableval}" != "yes"; then
|
||||
|
@ -1358,7 +1354,7 @@ AC_PATH_PROG(MAKEINFO, makeinfo, no)
|
|||
dnl By this stage, configure has already checked for egrep and set EGREP,
|
||||
dnl or exited with an error if no egrep was found.
|
||||
if test "$MAKEINFO" != "no" && \
|
||||
test x"`$MAKEINFO --version 2> /dev/null | $EGREP 'texinfo[[^0-9]]*([[5-9]]|4\.[[6-9]])'`" = x; then
|
||||
test x"`$MAKEINFO --version 2> /dev/null | $EGREP 'texinfo[[^0-9]]*([[1-4]][[0-9]]+|[[5-9]]|4\.[[6-9]]|4\.[[1-5]][[0-9]]+)'`" = x; then
|
||||
MAKEINFO=no
|
||||
fi
|
||||
|
||||
|
@ -2183,8 +2179,8 @@ if test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "gtk" || \
|
|||
if test "$USE_X_TOOLKIT" != "none" && test "$USE_X_TOOLKIT" != "maybe"; then
|
||||
AC_MSG_ERROR([Conflicting options, --with-gtk is incompatible with --with-x-toolkit=${with_x_toolkit}]);
|
||||
fi
|
||||
GLIB_REQUIRED=2.4
|
||||
GTK_REQUIRED=2.4
|
||||
GLIB_REQUIRED=2.6
|
||||
GTK_REQUIRED=2.6
|
||||
GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
|
||||
|
||||
dnl Check if --with-pkg-config-prog has been given.
|
||||
|
@ -2238,6 +2234,7 @@ if test "${HAVE_GTK}" = "yes"; then
|
|||
AC_DEFINE(HAVE_GTK_MULTIDISPLAY, 1,
|
||||
[Define to 1 if GTK can handle more than one display.])
|
||||
fi
|
||||
|
||||
dnl Check if we have the old file selection dialog.
|
||||
dnl If gdk_display_open exists, assume all others are there also.
|
||||
HAVE_GTK_FILE_SELECTION=no
|
||||
|
@ -2263,7 +2260,10 @@ if test "${HAVE_GTK}" = "yes"; then
|
|||
AC_CHECK_LIB(pthread, pthread_self, HAVE_GTK_AND_PTHREAD=yes)
|
||||
fi
|
||||
if test "$HAVE_GTK_AND_PTHREAD" = yes; then
|
||||
GTK_LIBS="$GTK_LIBS -lpthread"
|
||||
case "${canonical}" in
|
||||
*-hpux*) ;;
|
||||
*) GTK_LIBS="$GTK_LIBS -lpthread" ;;
|
||||
esac
|
||||
AC_DEFINE(HAVE_GTK_AND_PTHREAD, 1,
|
||||
[Define to 1 if you have GTK and pthread (-lpthread).])
|
||||
fi
|
||||
|
@ -2277,14 +2277,18 @@ if test x"${USE_X_TOOLKIT}" = xmaybe || test x"${USE_X_TOOLKIT}" = xLUCID; then
|
|||
if test x"${HAVE_X11R5}" != xyes; then
|
||||
USE_X_TOOLKIT=none
|
||||
else
|
||||
AC_MSG_CHECKING(for xaw3d)
|
||||
AC_CACHE_VAL(emacs_cv_xaw3d,
|
||||
[AC_TRY_LINK([
|
||||
if test "$with_xaw3d" != no; then
|
||||
AC_MSG_CHECKING(for xaw3d)
|
||||
AC_CACHE_VAL(emacs_cv_xaw3d,
|
||||
[AC_TRY_LINK([
|
||||
#include <X11/Intrinsic.h>
|
||||
#include <X11/Xaw3d/Simple.h>],
|
||||
[],
|
||||
emacs_cv_xaw3d=yes,
|
||||
emacs_cv_xaw3d=no)])
|
||||
[],
|
||||
emacs_cv_xaw3d=yes,
|
||||
emacs_cv_xaw3d=no)])
|
||||
else
|
||||
emacs_cv_xaw3d=no
|
||||
fi
|
||||
if test $emacs_cv_xaw3d = yes; then
|
||||
AC_MSG_RESULT([yes; using Lucid toolkit])
|
||||
USE_X_TOOLKIT=LUCID
|
||||
|
@ -2429,8 +2433,8 @@ AC_TRY_COMPILE([
|
|||
#include <X11/Xlib.h>
|
||||
#include <X11/Xresource.h>],
|
||||
[XIMProc callback;],
|
||||
HAVE_XIM=yes
|
||||
AC_DEFINE(HAVE_XIM, 1, [Define to 1 if XIM is available]),
|
||||
[HAVE_XIM=yes
|
||||
AC_DEFINE(HAVE_XIM, 1, [Define to 1 if XIM is available])],
|
||||
HAVE_XIM=no)
|
||||
|
||||
dnl `--with-xim' now controls only the initial value of use_xim at run time.
|
||||
|
@ -2567,7 +2571,7 @@ HAVE_XPM=no
|
|||
if test "${HAVE_X11}" = "yes"; then
|
||||
if test "${with_xpm}" != "no"; then
|
||||
AC_CHECK_HEADER(X11/xpm.h,
|
||||
AC_CHECK_LIB(Xpm, XpmReadFileToPixmap, HAVE_XPM=yes, , -lX11))
|
||||
[AC_CHECK_LIB(Xpm, XpmReadFileToPixmap, HAVE_XPM=yes, , -lX11)])
|
||||
if test "${HAVE_XPM}" = "yes"; then
|
||||
AC_MSG_CHECKING(for XpmReturnAllocPixels preprocessor define)
|
||||
AC_EGREP_CPP(no_return_alloc_pixels,
|
||||
|
@ -2597,7 +2601,7 @@ if test "${HAVE_X11}" = "yes"; then
|
|||
dnl Checking for jpeglib.h can lose because of a redefinition of
|
||||
dnl HAVE_STDLIB_H.
|
||||
AC_CHECK_HEADER(jerror.h,
|
||||
AC_CHECK_LIB(jpeg, jpeg_destroy_compress, HAVE_JPEG=yes))
|
||||
[AC_CHECK_LIB(jpeg, jpeg_destroy_compress, HAVE_JPEG=yes)])
|
||||
fi
|
||||
|
||||
AH_TEMPLATE(HAVE_JPEG, [Define to 1 if you have the jpeg library (-ljpeg).])dnl
|
||||
|
@ -2607,7 +2611,7 @@ if test "${HAVE_X11}" = "yes"; then
|
|||
[#include <jpeglib.h>
|
||||
version=JPEG_LIB_VERSION
|
||||
],
|
||||
AC_DEFINE(HAVE_JPEG),
|
||||
[AC_DEFINE(HAVE_JPEG)],
|
||||
[AC_MSG_WARN([libjpeg found, but not version 6b or later])
|
||||
HAVE_JPEG=no])
|
||||
fi
|
||||
|
@ -2635,10 +2639,10 @@ HAVE_TIFF=no
|
|||
if test "${HAVE_X11}" = "yes"; then
|
||||
if test "${with_tiff}" != "no"; then
|
||||
AC_CHECK_HEADER(tiffio.h,
|
||||
tifflibs="-lz -lm"
|
||||
[tifflibs="-lz -lm"
|
||||
# At least one tiff package requires the jpeg library.
|
||||
if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi
|
||||
AC_CHECK_LIB(tiff, TIFFGetVersion, HAVE_TIFF=yes, , $tifflibs))
|
||||
AC_CHECK_LIB(tiff, TIFFGetVersion, HAVE_TIFF=yes, , $tifflibs)])
|
||||
fi
|
||||
|
||||
if test "${HAVE_TIFF}" = "yes"; then
|
||||
|
@ -2652,7 +2656,7 @@ if test "${HAVE_X11}" = "yes" && test "${with_gif}" != "no"; then
|
|||
AC_CHECK_HEADER(gif_lib.h,
|
||||
# EGifPutExtensionLast only exists from version libungif-4.1.0b1.
|
||||
# Earlier versions can crash Emacs.
|
||||
AC_CHECK_LIB(gif, EGifPutExtensionLast, HAVE_GIF=yes, try_libungif=yes))
|
||||
[AC_CHECK_LIB(gif, EGifPutExtensionLast, HAVE_GIF=yes, try_libungif=yes)])
|
||||
|
||||
if test "$HAVE_GIF" = yes; then
|
||||
ac_gif_lib_name="-lgif"
|
||||
|
@ -2702,7 +2706,7 @@ fi
|
|||
HAVE_GPM=no
|
||||
if test "${with_gpm}" != "no"; then
|
||||
AC_CHECK_HEADER(gpm.h,
|
||||
AC_CHECK_LIB(gpm, Gpm_Open, HAVE_GPM=yes))
|
||||
[AC_CHECK_LIB(gpm, Gpm_Open, HAVE_GPM=yes)])
|
||||
fi
|
||||
|
||||
if test "${HAVE_GPM}" = "yes"; then
|
||||
|
@ -2710,7 +2714,7 @@ if test "${HAVE_GPM}" = "yes"; then
|
|||
fi
|
||||
|
||||
dnl Check for malloc/malloc.h on darwin
|
||||
AC_CHECK_HEADER(malloc/malloc.h, AC_DEFINE(HAVE_MALLOC_MALLOC_H, 1, [Define to 1 if you have the <malloc/malloc.h> header file.]))
|
||||
AC_CHECK_HEADER(malloc/malloc.h, [AC_DEFINE(HAVE_MALLOC_MALLOC_H, 1, [Define to 1 if you have the <malloc/malloc.h> header file.])])
|
||||
|
||||
### Use Mac OS X Carbon API to implement GUI.
|
||||
if test "${HAVE_CARBON}" = "yes"; then
|
||||
|
@ -2731,7 +2735,7 @@ fi
|
|||
HAVE_X_SM=no
|
||||
if test "${HAVE_X11}" = "yes"; then
|
||||
AC_CHECK_HEADER(X11/SM/SMlib.h,
|
||||
AC_CHECK_LIB(SM, SmcOpenConnection, HAVE_X_SM=yes, , -lICE))
|
||||
[AC_CHECK_LIB(SM, SmcOpenConnection, HAVE_X_SM=yes, , -lICE)])
|
||||
|
||||
if test "${HAVE_X_SM}" = "yes"; then
|
||||
AC_DEFINE(HAVE_X_SM, 1, [Define to 1 if you have the SM library (-lSM).])
|
||||
|
@ -2754,6 +2758,13 @@ fi
|
|||
|
||||
AC_FUNC_ALLOCA
|
||||
|
||||
dnl src/alloca.c has been removed. Could also check if $ALLOCA is set?
|
||||
dnl FIXME is there an autoconf test that does the right thing, without
|
||||
dnl needing to call A_M_E afterwards?
|
||||
if test x"$ac_cv_func_alloca_works" != xyes; then
|
||||
AC_MSG_ERROR( [a system implementation of alloca is required] )
|
||||
fi
|
||||
|
||||
# fmod, logb, and frexp are found in -lm on most systems.
|
||||
# On HPUX 9.01, -lm does not contain logb, so check for sqrt.
|
||||
AC_CHECK_LIB(m, sqrt)
|
||||
|
@ -2842,8 +2853,8 @@ if test "$with_hesiod" = yes ; then
|
|||
RESOLVLIB=
|
||||
fi
|
||||
AC_CHECK_FUNC(hes_getmailhost, , [AC_CHECK_LIB(hesiod, hes_getmailhost,
|
||||
AC_DEFINE(HAVE_LIBHESIOD, 1,
|
||||
[Define to 1 if you have the hesiod library (-lhesiod).]),
|
||||
[AC_DEFINE(HAVE_LIBHESIOD, 1,
|
||||
[Define to 1 if you have the hesiod library (-lhesiod).])],
|
||||
:, $RESOLVLIB)])
|
||||
fi
|
||||
|
||||
|
@ -2855,9 +2866,9 @@ if test "${with_kerberos+set}" = set; then
|
|||
AC_CHECK_LIB(krb5, krb5_init_context)
|
||||
if test "${with_kerberos5+set}" != set; then
|
||||
AC_CHECK_LIB(des425, des_cbc_encrypt,,
|
||||
AC_CHECK_LIB(des, des_cbc_encrypt))
|
||||
[AC_CHECK_LIB(des, des_cbc_encrypt)])
|
||||
AC_CHECK_LIB(krb4, krb_get_cred,,
|
||||
AC_CHECK_LIB(krb, krb_get_cred))
|
||||
[AC_CHECK_LIB(krb, krb_get_cred)])
|
||||
fi
|
||||
|
||||
if test "${with_kerberos5+set}" = set; then
|
||||
|
@ -3178,6 +3189,13 @@ AH_BOTTOM([
|
|||
#define HAVE_MOUSE
|
||||
#endif
|
||||
|
||||
/* Multi-tty support relies on MULTI_KBOARD. It seems safe to turn it
|
||||
on unconditionally. Note that src/s/darwin.h disables this at
|
||||
present. */
|
||||
#ifndef MULTI_KBOARD
|
||||
#define MULTI_KBOARD
|
||||
#endif
|
||||
|
||||
/* If we're using the Carbon API on Mac OS X, define a few more
|
||||
variables as well. */
|
||||
#ifdef HAVE_CARBON
|
||||
|
@ -3510,8 +3528,9 @@ AC_EGREP_CPP(yes..yes,
|
|||
CPP_NEED_TRADITIONAL=yes)
|
||||
|
||||
AC_OUTPUT(Makefile lib-src/Makefile.c:lib-src/Makefile.in oldXMenu/Makefile \
|
||||
man/Makefile lwlib/Makefile src/Makefile.c:src/Makefile.in \
|
||||
lisp/Makefile lispref/Makefile lispintro/Makefile leim/Makefile, [
|
||||
doc/emacs/Makefile doc/misc/Makefile doc/lispintro/Makefile \
|
||||
doc/lispref/Makefile src/Makefile.c:src/Makefile.in \
|
||||
lwlib/Makefile lisp/Makefile leim/Makefile, [
|
||||
|
||||
### Make the necessary directories, if they don't exist.
|
||||
for dir in etc lisp ; do
|
||||
|
|
23
doc/emacs/.gitignore
vendored
Normal file
23
doc/emacs/.gitignore
vendored
Normal file
|
@ -0,0 +1,23 @@
|
|||
*.aux
|
||||
*.cp
|
||||
*.cps
|
||||
*.dvi
|
||||
*.fn
|
||||
*.fns
|
||||
*.ky
|
||||
*.kys
|
||||
*.log
|
||||
*.op
|
||||
*.ops
|
||||
*.pdf
|
||||
*.pg
|
||||
*.pgs
|
||||
*.ps
|
||||
*.tmp
|
||||
*.toc
|
||||
*.tp
|
||||
*.tps
|
||||
*.vr
|
||||
*.vrs
|
||||
Makefile
|
||||
makefile
|
File diff suppressed because it is too large
Load diff
159
doc/emacs/Makefile.in
Normal file
159
doc/emacs/Makefile.in
Normal file
|
@ -0,0 +1,159 @@
|
|||
#### Makefile for the Emacs Manual
|
||||
|
||||
# Copyright (C) 1994, 1996, 1997, 1998, 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.
|
||||
|
||||
# Where to find the source code. $(srcdir) will be the man
|
||||
# subdirectory of the source tree. This is
|
||||
# set by the configure script's `--srcdir' option.
|
||||
srcdir=@srcdir@
|
||||
top_srcdir=@top_srcdir@
|
||||
|
||||
# Tell make where to find source files; this is needed for the makefiles.
|
||||
VPATH=@srcdir@
|
||||
|
||||
## Where the output files go.
|
||||
## Note that the setfilename command in the .texi files assumes this.
|
||||
infodir=../../info
|
||||
|
||||
# The makeinfo program is part of the Texinfo distribution.
|
||||
# Use --force so that it generates output even if there are errors.
|
||||
MAKEINFO = makeinfo --force
|
||||
|
||||
INFO_TARGETS = $(infodir)/emacs
|
||||
DVI_TARGETS = emacs.dvi
|
||||
|
||||
|
||||
TEXI2DVI = texi2dvi
|
||||
|
||||
# The following rule does not work with all versions of `make'.
|
||||
.SUFFIXES: .texi .dvi
|
||||
.texi.dvi:
|
||||
$(TEXI2DVI) $<
|
||||
|
||||
ENVADD = TEXINPUTS="$(srcdir):$(TEXINPUTS)" MAKEINFO="$(MAKEINFO) -I$(srcdir)"
|
||||
|
||||
|
||||
EMACS_XTRA=\
|
||||
$(srcdir)/arevert-xtra.texi \
|
||||
$(srcdir)/cal-xtra.texi \
|
||||
$(srcdir)/dired-xtra.texi \
|
||||
$(srcdir)/picture-xtra.texi \
|
||||
$(srcdir)/emerge-xtra.texi \
|
||||
$(srcdir)/vc-xtra.texi \
|
||||
$(srcdir)/vc1-xtra.texi \
|
||||
$(srcdir)/vc2-xtra.texi \
|
||||
$(srcdir)/fortran-xtra.texi \
|
||||
$(srcdir)/msdog-xtra.texi
|
||||
|
||||
EMACSSOURCES= \
|
||||
${srcdir}/emacs.texi \
|
||||
${srcdir}/doclicense.texi \
|
||||
${srcdir}/gpl.texi \
|
||||
${srcdir}/screen.texi \
|
||||
${srcdir}/commands.texi \
|
||||
${srcdir}/entering.texi \
|
||||
${srcdir}/basic.texi \
|
||||
${srcdir}/mini.texi \
|
||||
${srcdir}/m-x.texi \
|
||||
${srcdir}/help.texi \
|
||||
${srcdir}/mark.texi \
|
||||
${srcdir}/killing.texi \
|
||||
${srcdir}/regs.texi \
|
||||
${srcdir}/display.texi \
|
||||
${srcdir}/search.texi \
|
||||
${srcdir}/fixit.texi \
|
||||
${srcdir}/files.texi \
|
||||
${srcdir}/buffers.texi \
|
||||
${srcdir}/windows.texi \
|
||||
${srcdir}/frames.texi \
|
||||
${srcdir}/mule.texi \
|
||||
${srcdir}/major.texi \
|
||||
${srcdir}/indent.texi \
|
||||
${srcdir}/text.texi \
|
||||
${srcdir}/programs.texi \
|
||||
${srcdir}/building.texi \
|
||||
${srcdir}/maintaining.texi \
|
||||
${srcdir}/abbrevs.texi \
|
||||
${srcdir}/sending.texi \
|
||||
${srcdir}/rmail.texi \
|
||||
${srcdir}/dired.texi \
|
||||
${srcdir}/calendar.texi \
|
||||
${srcdir}/misc.texi \
|
||||
${srcdir}/custom.texi \
|
||||
${srcdir}/trouble.texi \
|
||||
${srcdir}/cmdargs.texi \
|
||||
${srcdir}/xresources.texi \
|
||||
${srcdir}/anti.texi \
|
||||
${srcdir}/macos.texi \
|
||||
${srcdir}/msdog.texi \
|
||||
${srcdir}/gnu.texi \
|
||||
${srcdir}/glossary.texi \
|
||||
${srcdir}/ack.texi \
|
||||
${srcdir}/kmacro.texi \
|
||||
$(EMACS_XTRA)
|
||||
|
||||
info: $(infodir) $(INFO_TARGETS)
|
||||
|
||||
$(infodir):
|
||||
mkdir $@
|
||||
|
||||
dvi: $(DVI_TARGETS)
|
||||
|
||||
# Note that all the Info targets build the Info files
|
||||
# in srcdir. There is no provision for Info files
|
||||
# to exist in the build directory.
|
||||
# In a distribution of Emacs, the Info files should be up to date.
|
||||
|
||||
emacs : $(infodir)/emacs
|
||||
|
||||
$(infodir)/emacs: ${EMACSSOURCES}
|
||||
cd $(srcdir); $(MAKEINFO) emacs.texi
|
||||
|
||||
emacs.dvi: ${EMACSSOURCES}
|
||||
$(ENVADD) $(TEXI2DVI) ${srcdir}/emacs.texi
|
||||
|
||||
|
||||
emacs-xtra.dvi: emacs-xtra.texi $(EMACS_XTRA)
|
||||
$(ENVADD) $(TEXI2DVI) ${srcdir}/emacs-xtra.texi
|
||||
|
||||
|
||||
mostlyclean:
|
||||
rm -f *.log *.cp *.fn *.ky *.op *.ops *.pg *.vr core *.tp *.core
|
||||
rm -f *.aux *.cps *.fns *.kys *.pgs *.vrs *.toc
|
||||
|
||||
clean: mostlyclean
|
||||
rm -f *.dvi
|
||||
|
||||
distclean: clean
|
||||
# rm -f Makefile
|
||||
|
||||
maintainer-clean: distclean
|
||||
for file in $(INFO_TARGETS); do rm -f $${file}*; done
|
||||
|
||||
|
||||
# Formerly this directory had texindex.c and getopt.c in it
|
||||
# and this makefile built them to make texindex.
|
||||
# That caused trouble because this is run entirely in the source directory.
|
||||
# Since we expect to get texi2dvi from elsewhere,
|
||||
# it is ok to expect texindex from elsewhere also.
|
||||
|
||||
|
||||
### Makefile ends here
|
1574
doc/emacs/ack.texi
Normal file
1574
doc/emacs/ack.texi
Normal file
File diff suppressed because it is too large
Load diff
191
doc/emacs/arevert-xtra.texi
Normal file
191
doc/emacs/arevert-xtra.texi
Normal file
|
@ -0,0 +1,191 @@
|
|||
@c This is part of the Emacs manual.
|
||||
@c Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
@c See file emacs.texi for copying conditions.
|
||||
@c
|
||||
@c This file is included either in emacs-xtra.texi (when producing the
|
||||
@c printed version) or in the main Emacs manual (for the on-line version).
|
||||
@node Autorevert
|
||||
@section Auto Reverting non-file Buffers
|
||||
|
||||
Normally Global Auto Revert Mode only reverts file buffers. There are
|
||||
two ways to auto-revert certain non-file buffers: enabling Auto Revert
|
||||
Mode in those buffers (using @kbd{M-x auto-revert-mode}) and setting
|
||||
@code{global-auto-revert-non-file-buffers} to @code{t}. The latter
|
||||
enables Auto Reverting for all types of buffers for which it is
|
||||
implemented, that is, for the types of buffers listed in the menu
|
||||
below.
|
||||
|
||||
Like file buffers, non-file buffers should normally not revert while
|
||||
you are working on them, or while they contain information that might
|
||||
get lost after reverting. Therefore, they do not revert if they are
|
||||
``modified''. This can get tricky, because deciding when a non-file
|
||||
buffer should be marked modified is usually more difficult than for
|
||||
file buffers.
|
||||
|
||||
Another tricky detail is that, for efficiency reasons, Auto Revert
|
||||
often does not try to detect all possible changes in the buffer, only
|
||||
changes that are ``major'' or easy to detect. Hence, enabling
|
||||
auto-reverting for a non-file buffer does not always guarantee that
|
||||
all information in the buffer is up to date and does not necessarily
|
||||
make manual reverts useless.
|
||||
|
||||
At the other extreme, certain buffers automatically auto-revert every
|
||||
@code{auto-revert-interval} seconds. (This currently only applies to
|
||||
the Buffer Menu.) In this case, Auto Revert does not print any
|
||||
messages while reverting, even when @code{auto-revert-verbose} is
|
||||
non-@code{nil}.
|
||||
|
||||
The details depend on the particular types of buffers and are
|
||||
explained in the corresponding sections.
|
||||
|
||||
@menu
|
||||
* Auto Reverting the Buffer Menu::
|
||||
* Auto Reverting Dired::
|
||||
* Supporting additional buffers::
|
||||
@end menu
|
||||
|
||||
@node Auto Reverting the Buffer Menu
|
||||
@subsection Auto Reverting the Buffer Menu
|
||||
|
||||
If auto-reverting of non-file buffers is enabled, the Buffer Menu
|
||||
automatically reverts every @code{auto-revert-interval} seconds,
|
||||
whether there is a need for it or not. (It would probably take longer
|
||||
to check whether there is a need than to actually revert.)
|
||||
|
||||
If the Buffer Menu inappropriately gets marked modified, just revert
|
||||
it manually using @kbd{g} and auto-reverting will resume. However, if
|
||||
you marked certain buffers to get deleted or to be displayed, you have
|
||||
to be careful, because reverting erases all marks. The fact that
|
||||
adding marks sets the buffer's modified flag prevents Auto Revert from
|
||||
automatically erasing the marks.
|
||||
|
||||
@node Auto Reverting Dired
|
||||
@subsection Auto Reverting Dired buffers
|
||||
|
||||
Auto-reverting Dired buffers currently works on GNU or Unix style
|
||||
operating systems. It may not work satisfactorily on some other
|
||||
systems.
|
||||
|
||||
Dired buffers only auto-revert when the file list of the buffer's main
|
||||
directory changes. They do not auto-revert when information about a
|
||||
particular file changes or when inserted subdirectories change. To be
|
||||
sure that @emph{all} listed information is up to date, you have to
|
||||
manually revert using @kbd{g}, @emph{even} if auto-reverting is
|
||||
enabled in the Dired buffer. Sometimes, you might get the impression
|
||||
that modifying or saving files listed in the main directory actually
|
||||
does cause auto-reverting. This is because making changes to a file,
|
||||
or saving it, very often causes changes in the directory itself, for
|
||||
instance, through backup files or auto-save files. However, this is
|
||||
not guaranteed.
|
||||
|
||||
If the Dired buffer is marked modified and there are no changes you
|
||||
want to protect, then most of the time you can make auto-reverting
|
||||
resume by manually reverting the buffer using @kbd{g}. There is one
|
||||
exception. If you flag or mark files, you can safely revert the
|
||||
buffer. This will not erase the flags or marks (unless the marked
|
||||
file has been deleted, of course). However, the buffer will stay
|
||||
modified, even after reverting, and auto-reverting will not resume.
|
||||
This is because, if you flag or mark files, you may be working on the
|
||||
buffer and you might not want the buffer to change without warning.
|
||||
If you want auto-reverting to resume in the presence of marks and
|
||||
flags, mark the buffer non-modified using @kbd{M-~}. However, adding,
|
||||
deleting or changing marks or flags will mark it modified again.
|
||||
|
||||
Remote Dired buffers are not auto-reverted. Neither are Dired buffers
|
||||
for which you used shell wildcards or file arguments to list only some
|
||||
of the files. @samp{*Find*} and @samp{*Locate*} buffers do not
|
||||
auto-revert either.
|
||||
|
||||
@node Supporting additional buffers
|
||||
@subsection Adding Support for Auto-Reverting additional Buffers.
|
||||
|
||||
This section is intended for Elisp programmers who would like to add
|
||||
support for auto-reverting new types of buffers.
|
||||
|
||||
To support auto-reverting the buffer must first of all have a
|
||||
@code{revert-buffer-function}. @xref{Definition of
|
||||
revert-buffer-function,, Reverting, elisp, the Emacs Lisp Reference Manual}.
|
||||
|
||||
In addition, it @emph{must} have a @code{buffer-stale-function}.
|
||||
|
||||
@defvar buffer-stale-function
|
||||
The value of this variable is a function to check whether a non-file
|
||||
buffer needs reverting. This should be a function with one optional
|
||||
argument @var{noconfirm}. The function should return non-@code{nil}
|
||||
if the buffer should be reverted. The buffer is current when this
|
||||
function is called.
|
||||
|
||||
While this function is mainly intended for use in auto-reverting, it
|
||||
could be used for other purposes as well. For instance, if
|
||||
auto-reverting is not enabled, it could be used to warn the user that
|
||||
the buffer needs reverting. The idea behind the @var{noconfirm}
|
||||
argument is that it should be @code{t} if the buffer is going to be
|
||||
reverted without asking the user and @code{nil} if the function is
|
||||
just going to be used to warn the user that the buffer is out of date.
|
||||
In particular, for use in auto-reverting, @var{noconfirm} is @code{t}.
|
||||
If the function is only going to be used for auto-reverting, you can
|
||||
ignore the @var{noconfirm} argument.
|
||||
|
||||
If you just want to automatically auto-revert every
|
||||
@code{auto-revert-interval} seconds, use:
|
||||
|
||||
@example
|
||||
(set (make-local-variable 'buffer-stale-function)
|
||||
#'(lambda (&optional noconfirm) 'fast))
|
||||
@end example
|
||||
|
||||
@noindent
|
||||
in the buffer's mode function.
|
||||
|
||||
The special return value @samp{fast} tells the caller that the need
|
||||
for reverting was not checked, but that reverting the buffer is fast.
|
||||
It also tells Auto Revert not to print any revert messages, even if
|
||||
@code{auto-revert-verbose} is non-@code{nil}. This is important, as
|
||||
getting revert messages every @code{auto-revert-interval} seconds can
|
||||
be very annoying. The information provided by this return value could
|
||||
also be useful if the function is consulted for purposes other than
|
||||
auto-reverting.
|
||||
@end defvar
|
||||
|
||||
Once the buffer has a @code{revert-buffer-function} and a
|
||||
@code{buffer-stale-function}, several problems usually remain.
|
||||
|
||||
The buffer will only auto-revert if it is marked unmodified. Hence,
|
||||
you will have to make sure that various functions mark the buffer
|
||||
modified if and only if either the buffer contains information that
|
||||
might be lost by reverting or there is reason to believe that the user
|
||||
might be inconvenienced by auto-reverting, because he is actively
|
||||
working on the buffer. The user can always override this by manually
|
||||
adjusting the modified status of the buffer. To support this, calling
|
||||
the @code{revert-buffer-function} on a buffer that is marked
|
||||
unmodified should always keep the buffer marked unmodified.
|
||||
|
||||
It is important to assure that point does not continuously jump around
|
||||
as a consequence of auto-reverting. Of course, moving point might be
|
||||
inevitable if the buffer radically changes.
|
||||
|
||||
You should make sure that the @code{revert-buffer-function} does not
|
||||
print messages that unnecessarily duplicate Auto Revert's own messages
|
||||
if @code{auto-revert-verbose} is @code{t} and effectively override a
|
||||
@code{nil} value for @code{auto-revert-verbose}. Hence, adapting a
|
||||
mode for auto-reverting often involves getting rid of such messages.
|
||||
This is especially important for buffers that automatically
|
||||
auto-revert every @code{auto-revert-interval} seconds.
|
||||
|
||||
Also, you may want to update the documentation string of
|
||||
@code{global-auto-revert-non-file-buffers}.
|
||||
|
||||
@ifinfo
|
||||
Finally, you should add a node to this chapter's menu. This node
|
||||
@end ifinfo
|
||||
@ifnotinfo
|
||||
Finally, you should add a section to this chapter. This section
|
||||
@end ifnotinfo
|
||||
should at the very least make clear whether enabling auto-reverting
|
||||
for the buffer reliably assures that all information in the buffer is
|
||||
completely up to date (or will be after @code{auto-revert-interval}
|
||||
seconds).
|
||||
|
||||
@ignore
|
||||
arch-tag: 2983e613-a272-45f6-9593-3010ad7f865e
|
||||
@end ignore
|
|
@ -707,7 +707,7 @@ C-n} (move down a good fraction of a screen), @kbd{C-u C-u C-o} (make
|
|||
``a lot'' of blank lines), and @kbd{C-u C-k} (kill four lines).
|
||||
|
||||
Some commands care whether there is an argument, but ignore its
|
||||
value. For example, the command @kbd{M-q} (@code{fill-paragraph})
|
||||
value. For example, the command @kbd{M-q} (@code{fill-paragraph-or-region})
|
||||
fills text; with an argument, it justifies the text as well.
|
||||
(@xref{Filling}, for more information on @kbd{M-q}.) Plain @kbd{C-u}
|
||||
is a handy way of providing an argument for such commands.
|
665
doc/emacs/buffers.texi
Normal file
665
doc/emacs/buffers.texi
Normal file
|
@ -0,0 +1,665 @@
|
|||
@c This is part of the Emacs manual.
|
||||
@c Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1997, 2000, 2001,
|
||||
@c 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
@c See file emacs.texi for copying conditions.
|
||||
@node Buffers, Windows, Files, Top
|
||||
@chapter Using Multiple Buffers
|
||||
|
||||
@cindex buffers
|
||||
The text you are editing in Emacs resides in an object called a
|
||||
@dfn{buffer}. Each time you visit a file, a buffer is created to hold the
|
||||
file's text. Each time you invoke Dired, a buffer is created to hold the
|
||||
directory listing. If you send a message with @kbd{C-x m}, a buffer named
|
||||
@samp{*mail*} is used to hold the text of the message. When you ask for a
|
||||
command's documentation, that appears in a buffer called @samp{*Help*}.
|
||||
|
||||
@cindex selected buffer
|
||||
@cindex current buffer
|
||||
At any time, one and only one buffer is @dfn{current}. It is also
|
||||
called the @dfn{selected buffer}. Often we say that a command operates on
|
||||
``the buffer'' as if there were only one; but really this means that the
|
||||
command operates on the current buffer (most commands do).
|
||||
|
||||
When Emacs has multiple windows, each window has its own chosen
|
||||
buffer and displays it; at any time, only one of the windows is
|
||||
selected, and its chosen buffer is the current buffer. Each window's
|
||||
mode line normally displays the name of the window's chosen buffer
|
||||
(@pxref{Windows}).
|
||||
|
||||
Each buffer has a name, which can be of any length, and you can select
|
||||
any buffer by giving its name. Most buffers are made by visiting files,
|
||||
and their names are derived from the files' names. But you can also create
|
||||
an empty buffer with any name you want. A newly started Emacs has a buffer
|
||||
named @samp{*scratch*} which can be used for evaluating Lisp expressions in
|
||||
Emacs. The distinction between upper and lower case matters in buffer
|
||||
names.
|
||||
|
||||
Each buffer records individually what file it is visiting, whether it is
|
||||
modified, and what major mode and minor modes are in effect in it
|
||||
(@pxref{Major Modes}). Any Emacs variable can be made @dfn{local to} a
|
||||
particular buffer, meaning its value in that buffer can be different from
|
||||
the value in other buffers. @xref{Locals}.
|
||||
|
||||
@cindex buffer size, maximum
|
||||
A buffer's size cannot be larger than some maximum, which is defined
|
||||
by the largest buffer position representable by the @dfn{Emacs integer}
|
||||
data type. This is because Emacs tracks buffer positions using that
|
||||
data type. For 32-bit machines, the largest buffer size is 256
|
||||
megabytes.
|
||||
|
||||
@menu
|
||||
* Select Buffer:: Creating a new buffer or reselecting an old one.
|
||||
* List Buffers:: Getting a list of buffers that exist.
|
||||
* Misc Buffer:: Renaming; changing read-onlyness; copying text.
|
||||
* Kill Buffer:: Killing buffers you no longer need.
|
||||
* Several Buffers:: How to go through the list of all buffers
|
||||
and operate variously on several of them.
|
||||
* Indirect Buffers:: An indirect buffer shares the text of another buffer.
|
||||
* Buffer Convenience:: Convenience and customization features for
|
||||
buffer handling.
|
||||
@end menu
|
||||
|
||||
@node Select Buffer
|
||||
@section Creating and Selecting Buffers
|
||||
@cindex change buffers
|
||||
@cindex switch buffers
|
||||
|
||||
@table @kbd
|
||||
@item C-x b @var{buffer} @key{RET}
|
||||
Select or create a buffer named @var{buffer} (@code{switch-to-buffer}).
|
||||
@item C-x 4 b @var{buffer} @key{RET}
|
||||
Similar, but select @var{buffer} in another window
|
||||
(@code{switch-to-buffer-other-window}).
|
||||
@item C-x 5 b @var{buffer} @key{RET}
|
||||
Similar, but select @var{buffer} in a separate frame
|
||||
(@code{switch-to-buffer-other-frame}).
|
||||
@item C-x @key{LEFT}
|
||||
Select the previous buffer in the list of existing buffers.
|
||||
@item C-x @key{RIGHT}
|
||||
Select the next buffer in the list of existing buffers.
|
||||
@item C-u M-g M-g
|
||||
@itemx C-u M-g g
|
||||
Read a number @var{n} and move to line @var{n} in the most recently
|
||||
selected buffer other than the current buffer.
|
||||
@end table
|
||||
|
||||
@kindex C-x b
|
||||
@findex switch-to-buffer
|
||||
To select the buffer named @var{bufname}, type @kbd{C-x b @var{bufname}
|
||||
@key{RET}}. This runs the command @code{switch-to-buffer} with argument
|
||||
@var{bufname}. You can use completion to enter the buffer
|
||||
name (@pxref{Completion}). An empty argument to @kbd{C-x b}
|
||||
specifies the buffer that was current most recently among those not
|
||||
now displayed in any window.
|
||||
|
||||
@kindex C-x @key{LEFT}
|
||||
@kindex C-x @key{RIGHT}
|
||||
@findex next-buffer
|
||||
@findex previous-buffer
|
||||
For conveniently switching between a few buffers, use the commands
|
||||
@kbd{C-x @key{LEFT}} and @kbd{C-x @key{RIGHT}}. @kbd{C-x @key{RIGHT}}
|
||||
(@code{previous-buffer}) selects the previous buffer (following the order
|
||||
of most recent selection in the current frame), while @kbd{C-x @key{LEFT}}
|
||||
(@code{next-buffer}) moves through buffers in the reverse direction.
|
||||
|
||||
@kindex C-x 4 b
|
||||
@findex switch-to-buffer-other-window
|
||||
@vindex even-window-heights
|
||||
To select a buffer in a window other than the current one, type
|
||||
@kbd{C-x 4 b @var{bufname} @key{RET}}. This runs the command
|
||||
@code{switch-to-buffer-other-window} which displays the buffer
|
||||
@var{bufname} in another window. By default, if displaying the buffer
|
||||
causes two vertically adjacent windows to be displayed, the heights of
|
||||
those windows are evened out; to countermand that and preserve the
|
||||
window configuration, set the variable @code{even-window-heights} to
|
||||
@code{nil}.
|
||||
|
||||
@kindex C-x 5 b
|
||||
@findex switch-to-buffer-other-frame
|
||||
Similarly, @kbd{C-x 5 b @var{buffer} @key{RET}} runs the command
|
||||
@code{switch-to-buffer-other-frame} which selects a buffer in another
|
||||
frame.
|
||||
|
||||
@vindex display-buffer-reuse-frames
|
||||
You can control how certain buffers are handled by these commands by
|
||||
customizing the variables @code{special-display-buffer-names},
|
||||
@code{special-display-regexps}, @code{same-window-buffer-names}, and
|
||||
@code{same-window-regexps}. See @ref{Force Same Window}, and
|
||||
@ref{Special Buffer Frames}, for more about these variables. In
|
||||
addition, if the value of @code{display-buffer-reuse-frames} is
|
||||
non-@code{nil}, and the buffer you want to switch to is already
|
||||
displayed in some frame, Emacs will just raise that frame.
|
||||
|
||||
Most buffers are created by visiting files, or by Emacs commands that
|
||||
want to display some text, but you can also create a buffer explicitly
|
||||
by typing @kbd{C-x b @var{bufname} @key{RET}}. This makes a new, empty
|
||||
buffer that is not visiting any file, and selects it for editing. Such
|
||||
buffers are used for making notes to yourself. If you try to save one,
|
||||
you are asked for the file name to use. The new buffer's major mode is
|
||||
determined by the value of @code{default-major-mode} (@pxref{Major
|
||||
Modes}).
|
||||
|
||||
Note that @kbd{C-x C-f}, and any other command for visiting a file,
|
||||
can also be used to switch to an existing file-visiting buffer.
|
||||
@xref{Visiting}.
|
||||
|
||||
@kbd{C-u M-g M-g}, that is @code{goto-line} with a prefix argument
|
||||
of just @kbd{C-u}, reads a number @var{n} using the minibuffer,
|
||||
selects the most recently selected buffer other than the current
|
||||
buffer in another window, and then moves point to the beginning of
|
||||
line number @var{n} in that buffer. This is mainly useful in a buffer
|
||||
that refers to line numbers in another buffer: if point is on or just
|
||||
after a number, @code{goto-line} uses that number as the default for
|
||||
@var{n}. Note that prefix arguments other than just @kbd{C-u} behave
|
||||
differently. @kbd{C-u 4 M-g M-g} goes to line 4 in the @emph{current}
|
||||
buffer, without reading a number from the minibuffer. (Remember that
|
||||
@kbd{M-g M-g} without prefix argument reads a number @var{n} and then
|
||||
moves to line number @var{n} in the current buffer.)
|
||||
|
||||
Emacs uses buffer names that start with a space for internal purposes.
|
||||
It treats these buffers specially in minor ways---for example, by
|
||||
default they do not record undo information. It is best to avoid using
|
||||
such buffer names yourself.
|
||||
|
||||
@node List Buffers
|
||||
@section Listing Existing Buffers
|
||||
|
||||
@table @kbd
|
||||
@item C-x C-b
|
||||
List the existing buffers (@code{list-buffers}).
|
||||
@end table
|
||||
|
||||
@cindex listing current buffers
|
||||
@kindex C-x C-b
|
||||
@findex list-buffers
|
||||
To display a list of existing buffers, type @kbd{C-x C-b}. Each
|
||||
line in the list shows one buffer's name, major mode and visited file.
|
||||
The buffers are listed in the order that they were current; the
|
||||
buffers that were current most recently come first.
|
||||
|
||||
@samp{*} in the first field of a line indicates the buffer is
|
||||
``modified.'' If several buffers are modified, it may be time to save
|
||||
some with @kbd{C-x s} (@pxref{Save Commands}). @samp{%} indicates a
|
||||
read-only buffer. @samp{.} marks the current buffer. Here is an
|
||||
example of a buffer list:@refill
|
||||
|
||||
@smallexample
|
||||
CRM Buffer Size Mode File
|
||||
. * .emacs 3294 Emacs-Lisp ~/.emacs
|
||||
% *Help* 101 Help
|
||||
search.c 86055 C ~/cvs/emacs/src/search.c
|
||||
% src 20959 Dired by name ~/cvs/emacs/src/
|
||||
* *mail* 42 Mail
|
||||
% HELLO 1607 Fundamental ~/cvs/emacs/etc/HELLO
|
||||
% NEWS 481184 Outline ~/cvs/emacs/etc/NEWS
|
||||
*scratch* 191 Lisp Interaction
|
||||
* *Messages* 1554 Fundamental
|
||||
@end smallexample
|
||||
|
||||
@noindent
|
||||
Note that the buffer @samp{*Help*} was made by a help request; it is
|
||||
not visiting any file. The buffer @code{src} was made by Dired on the
|
||||
directory @file{~/cvs/emacs/src/}. You can list only buffers that are
|
||||
visiting files by giving the command a prefix argument, as in
|
||||
@kbd{C-u C-x C-b}.
|
||||
|
||||
@code{list-buffers} omits buffers whose names begin with a space,
|
||||
unless they visit files: such buffers are used internally by Emacs.
|
||||
|
||||
@need 2000
|
||||
@node Misc Buffer
|
||||
@section Miscellaneous Buffer Operations
|
||||
|
||||
@table @kbd
|
||||
@item C-x C-q
|
||||
Toggle read-only status of buffer (@code{toggle-read-only}).
|
||||
@item M-x rename-buffer @key{RET} @var{name} @key{RET}
|
||||
Change the name of the current buffer.
|
||||
@item M-x rename-uniquely
|
||||
Rename the current buffer by adding @samp{<@var{number}>} to the end.
|
||||
@item M-x view-buffer @key{RET} @var{buffer} @key{RET}
|
||||
Scroll through buffer @var{buffer}.
|
||||
@end table
|
||||
|
||||
@kindex C-x C-q
|
||||
@vindex buffer-read-only
|
||||
@cindex read-only buffer
|
||||
A buffer can be @dfn{read-only}, which means that commands to change
|
||||
its contents are not allowed. The mode line indicates read-only
|
||||
buffers with @samp{%%} or @samp{%*} near the left margin. Read-only
|
||||
buffers are usually made by subsystems such as Dired and Rmail that
|
||||
have special commands to operate on the text; also by visiting a file
|
||||
whose access control says you cannot write it.
|
||||
|
||||
@findex toggle-read-only
|
||||
If you wish to make changes in a read-only buffer, use the command
|
||||
@kbd{C-x C-q} (@code{toggle-read-only}). It makes a read-only buffer
|
||||
writable, and makes a writable buffer read-only. This
|
||||
works by setting the variable @code{buffer-read-only}, which has a local
|
||||
value in each buffer and makes the buffer read-only if its value is
|
||||
non-@code{nil}. If you have files under version control, you may find
|
||||
it convenient to bind @kbd{C-x C-q} to @code{vc-toggle-read-only}
|
||||
instead. Then, typing @kbd{C-x C-q} not only changes the read-only
|
||||
flag, but it also checks the file in or out. @xref{Version
|
||||
Control}.
|
||||
|
||||
@findex rename-buffer
|
||||
@kbd{M-x rename-buffer} changes the name of the current buffer. You
|
||||
specify the new name as a minibuffer argument; there is no default.
|
||||
If you specify a name that is in use for some other buffer, an error
|
||||
happens and no renaming is done.
|
||||
|
||||
@findex rename-uniquely
|
||||
@kbd{M-x rename-uniquely} renames the current buffer to a similar
|
||||
name with a numeric suffix added to make it both different and unique.
|
||||
This command does not need an argument. It is useful for creating
|
||||
multiple shell buffers: if you rename the @samp{*shell*} buffer, then
|
||||
do @kbd{M-x shell} again, it makes a new shell buffer named
|
||||
@samp{*shell*}; meanwhile, the old shell buffer continues to exist
|
||||
under its new name. This method is also good for mail buffers,
|
||||
compilation buffers, and most Emacs features that create special
|
||||
buffers with particular names. (With some of these features, such as
|
||||
@kbd{M-x compile}, @kbd{M-x grep} an @kbd{M-x info}, you need to
|
||||
switch to some other buffer before using the command, in order for it
|
||||
to make a different buffer.)
|
||||
|
||||
@findex view-buffer
|
||||
@kbd{M-x view-buffer} is much like @kbd{M-x view-file} (@pxref{Misc
|
||||
File Ops}) except that it examines an already existing Emacs buffer.
|
||||
View mode provides commands for scrolling through the buffer
|
||||
conveniently but not for changing it. When you exit View mode with
|
||||
@kbd{q}, that switches back to the buffer (and the position) which was
|
||||
previously displayed in the window. Alternatively, if you exit View
|
||||
mode with @kbd{e}, the buffer and the value of point that resulted from
|
||||
your perusal remain in effect.
|
||||
|
||||
The commands @kbd{M-x append-to-buffer} and @kbd{M-x insert-buffer}
|
||||
can be used to copy text from one buffer to another. @xref{Accumulating
|
||||
Text}.
|
||||
|
||||
@node Kill Buffer
|
||||
@section Killing Buffers
|
||||
|
||||
@cindex killing buffers
|
||||
If you continue an Emacs session for a while, you may accumulate a
|
||||
large number of buffers. You may then find it convenient to @dfn{kill}
|
||||
the buffers you no longer need. On most operating systems, killing a
|
||||
buffer releases its space back to the operating system so that other
|
||||
programs can use it. Here are some commands for killing buffers:
|
||||
|
||||
@table @kbd
|
||||
@item C-x k @var{bufname} @key{RET}
|
||||
Kill buffer @var{bufname} (@code{kill-buffer}).
|
||||
@item M-x kill-some-buffers
|
||||
Offer to kill each buffer, one by one.
|
||||
@end table
|
||||
|
||||
@findex kill-buffer
|
||||
@findex kill-some-buffers
|
||||
@kindex C-x k
|
||||
|
||||
@kbd{C-x k} (@code{kill-buffer}) kills one buffer, whose name you
|
||||
specify in the minibuffer. The default, used if you type just
|
||||
@key{RET} in the minibuffer, is to kill the current buffer. If you
|
||||
kill the current buffer, another buffer becomes current: one that was
|
||||
current in the recent past but is not displayed in any window now. If
|
||||
you ask to kill a file-visiting buffer that is modified (has unsaved
|
||||
editing), then you must confirm with @kbd{yes} before the buffer is
|
||||
killed.
|
||||
|
||||
The command @kbd{M-x kill-some-buffers} asks about each buffer, one by
|
||||
one. An answer of @kbd{y} means to kill the buffer. Killing the current
|
||||
buffer or a buffer containing unsaved changes selects a new buffer or asks
|
||||
for confirmation just like @code{kill-buffer}.
|
||||
|
||||
The buffer menu feature (@pxref{Several Buffers}) is also convenient
|
||||
for killing various buffers.
|
||||
|
||||
@vindex kill-buffer-hook
|
||||
If you want to do something special every time a buffer is killed, you
|
||||
can add hook functions to the hook @code{kill-buffer-hook} (@pxref{Hooks}).
|
||||
|
||||
@findex clean-buffer-list
|
||||
If you run one Emacs session for a period of days, as many people do,
|
||||
it can fill up with buffers that you used several days ago. The command
|
||||
@kbd{M-x clean-buffer-list} is a convenient way to purge them; it kills
|
||||
all the unmodified buffers that you have not used for a long time. An
|
||||
ordinary buffer is killed if it has not been displayed for three days;
|
||||
however, you can specify certain buffers that should never be killed
|
||||
automatically, and others that should be killed if they have been unused
|
||||
for a mere hour.
|
||||
|
||||
@cindex Midnight mode
|
||||
@vindex midnight-mode
|
||||
@vindex midnight-hook
|
||||
You can also have this buffer purging done for you, every day at
|
||||
midnight, by enabling Midnight mode. Midnight mode operates each day at
|
||||
midnight; at that time, it runs @code{clean-buffer-list}, or whichever
|
||||
functions you have placed in the normal hook @code{midnight-hook}
|
||||
(@pxref{Hooks}).
|
||||
|
||||
To enable Midnight mode, use the Customization buffer to set the
|
||||
variable @code{midnight-mode} to @code{t}. @xref{Easy Customization}.
|
||||
|
||||
@node Several Buffers
|
||||
@section Operating on Several Buffers
|
||||
@cindex buffer menu
|
||||
|
||||
The @dfn{buffer-menu} facility is like a ``Dired for buffers''; it allows
|
||||
you to request operations on various Emacs buffers by editing an Emacs
|
||||
buffer containing a list of them. You can save buffers, kill them
|
||||
(here called @dfn{deleting} them, for consistency with Dired), or display
|
||||
them.
|
||||
|
||||
@table @kbd
|
||||
@item M-x buffer-menu
|
||||
Begin editing a buffer listing all Emacs buffers.
|
||||
@item M-x buffer-menu-other-window.
|
||||
Similar, but do it in another window.
|
||||
@end table
|
||||
|
||||
@findex buffer-menu
|
||||
@findex buffer-menu-other-window
|
||||
The command @code{buffer-menu} writes a list of all Emacs
|
||||
buffers@footnote{Buffers which don't visit files and whose names begin
|
||||
with a space are omitted: these are used internally by Emacs.} into the
|
||||
buffer @samp{*Buffer List*}, and selects that buffer in Buffer Menu
|
||||
mode.
|
||||
|
||||
The buffer is read-only, and can be
|
||||
changed only through the special commands described in this section.
|
||||
The usual Emacs cursor motion commands can be used in the @samp{*Buffer
|
||||
List*} buffer. The following commands apply to the buffer described on
|
||||
the current line.
|
||||
|
||||
@table @kbd
|
||||
@item d
|
||||
Request to delete (kill) the buffer, then move down. The request
|
||||
shows as a @samp{D} on the line, before the buffer name. Requested
|
||||
deletions take place when you type the @kbd{x} command.
|
||||
@item C-d
|
||||
Like @kbd{d} but move up afterwards instead of down.
|
||||
@item s
|
||||
Request to save the buffer. The request shows as an @samp{S} on the
|
||||
line. Requested saves take place when you type the @kbd{x} command.
|
||||
You may request both saving and deletion for the same buffer.
|
||||
@item x
|
||||
Perform previously requested deletions and saves.
|
||||
@item u
|
||||
Remove any request made for the current line, and move down.
|
||||
@item @key{DEL}
|
||||
Move to previous line and remove any request made for that line.
|
||||
@end table
|
||||
|
||||
The @kbd{d}, @kbd{C-d}, @kbd{s} and @kbd{u} commands to add or remove
|
||||
flags also move down (or up) one line. They accept a numeric argument
|
||||
as a repeat count.
|
||||
|
||||
These commands operate immediately on the buffer listed on the current
|
||||
line:
|
||||
|
||||
@table @kbd
|
||||
@item ~
|
||||
Mark the buffer ``unmodified.'' The command @kbd{~} does this
|
||||
immediately when you type it.
|
||||
@item %
|
||||
Toggle the buffer's read-only flag. The command @kbd{%} does
|
||||
this immediately when you type it.
|
||||
@item t
|
||||
Visit the buffer as a tags table. @xref{Select Tags Table}.
|
||||
@end table
|
||||
|
||||
There are also commands to select another buffer or buffers:
|
||||
|
||||
@table @kbd
|
||||
@item q
|
||||
Quit the buffer menu---immediately display the most recent formerly
|
||||
visible buffer in its place.
|
||||
@item @key{RET}
|
||||
@itemx f
|
||||
Immediately select this line's buffer in place of the @samp{*Buffer
|
||||
List*} buffer.
|
||||
@item o
|
||||
Immediately select this line's buffer in another window as if by
|
||||
@kbd{C-x 4 b}, leaving @samp{*Buffer List*} visible.
|
||||
@item C-o
|
||||
Immediately display this line's buffer in another window, but don't
|
||||
select the window.
|
||||
@item 1
|
||||
Immediately select this line's buffer in a full-screen window.
|
||||
@item 2
|
||||
Immediately set up two windows, with this line's buffer selected in
|
||||
one, and the previously current buffer (aside from the buffer
|
||||
@samp{*Buffer List*}) displayed in the other.
|
||||
@item b
|
||||
Bury the buffer listed on this line.
|
||||
@item m
|
||||
Mark this line's buffer to be displayed in another window if you exit
|
||||
with the @kbd{v} command. The request shows as a @samp{>} at the
|
||||
beginning of the line. (A single buffer may not have both a delete
|
||||
request and a display request.)
|
||||
@item v
|
||||
Immediately select this line's buffer, and also display in other windows
|
||||
any buffers previously marked with the @kbd{m} command. If you have not
|
||||
marked any buffers, this command is equivalent to @kbd{1}.
|
||||
@end table
|
||||
|
||||
There is also a command that affects the entire buffer list:
|
||||
|
||||
@table @kbd
|
||||
@item T
|
||||
Delete, or reinsert, lines for non-file buffers. This command toggles
|
||||
the inclusion of such buffers in the buffer list.
|
||||
@end table
|
||||
|
||||
What @code{buffer-menu} actually does is create and switch to a
|
||||
suitable buffer, and turn on Buffer Menu mode in it. Everything else
|
||||
described above is implemented by the special commands provided in
|
||||
Buffer Menu mode. One consequence of this is that you can switch from
|
||||
the @samp{*Buffer List*} buffer to another Emacs buffer, and edit
|
||||
there. You can reselect the @samp{*Buffer List*} buffer later, to
|
||||
perform the operations already requested, or you can kill it, or pay
|
||||
no further attention to it.
|
||||
|
||||
The list in the @samp{*Buffer List*} buffer looks exactly like the
|
||||
buffer list described in @ref{List Buffers}, because they really are
|
||||
the same. The only difference between @code{buffer-menu} and
|
||||
@code{list-buffers} is that @code{buffer-menu} switches to the
|
||||
@samp{*Buffer List*} buffer in the selected window;
|
||||
@code{list-buffers} displays the same buffer in another window. If
|
||||
you run @code{list-buffers} (that is, type @kbd{C-x C-b}) and select
|
||||
the buffer list manually, you can use all of the commands described
|
||||
here.
|
||||
|
||||
Normally, the buffer @samp{*Buffer List*} is not updated
|
||||
automatically when buffers are created and killed; its contents are
|
||||
just text. If you have created, deleted or renamed buffers, the way
|
||||
to update @samp{*Buffer List*} to show what you have done is to type
|
||||
@kbd{g} (@code{revert-buffer}). You can make this happen regularly
|
||||
every @code{auto-revert-interval} seconds if you enable Auto Revert
|
||||
mode in this buffer, as long as it is not marked modified. Global
|
||||
Auto Revert mode applies to the @samp{*Buffer List*} buffer only if
|
||||
@code{global-auto-revert-non-file-buffers} is non-@code{nil}.
|
||||
@iftex
|
||||
@inforef{Autorevert,, emacs-xtra}, for details.
|
||||
@end iftex
|
||||
@ifnottex
|
||||
@xref{Autorevert, global-auto-revert-non-file-buffers}, for details.
|
||||
@end ifnottex
|
||||
|
||||
|
||||
The command @code{buffer-menu-other-window} works the same as
|
||||
@code{buffer-menu}, except that it displays the buffers list in
|
||||
another window.
|
||||
|
||||
@node Indirect Buffers
|
||||
@section Indirect Buffers
|
||||
@cindex indirect buffer
|
||||
@cindex base buffer
|
||||
|
||||
An @dfn{indirect buffer} shares the text of some other buffer, which
|
||||
is called the @dfn{base buffer} of the indirect buffer. In some ways it
|
||||
is the analogue, for buffers, of a symbolic link between files.
|
||||
|
||||
@table @kbd
|
||||
@findex make-indirect-buffer
|
||||
@item M-x make-indirect-buffer @key{RET} @var{base-buffer} @key{RET} @var{indirect-name} @key{RET}
|
||||
Create an indirect buffer named @var{indirect-name} whose base buffer
|
||||
is @var{base-buffer}.
|
||||
@findex clone-indirect-buffer
|
||||
@item M-x clone-indirect-buffer @key{RET}
|
||||
Create an indirect buffer that is a twin copy of the current buffer.
|
||||
@item C-x 4 c
|
||||
@kindex C-x 4 c
|
||||
@findex clone-indirect-buffer-other-window
|
||||
Create an indirect buffer that is a twin copy of the current buffer, and
|
||||
select it in another window (@code{clone-indirect-buffer-other-window}).
|
||||
@end table
|
||||
|
||||
The text of the indirect buffer is always identical to the text of its
|
||||
base buffer; changes made by editing either one are visible immediately
|
||||
in the other. But in all other respects, the indirect buffer and its
|
||||
base buffer are completely separate. They have different names,
|
||||
different values of point, different narrowing, different markers,
|
||||
different major modes, and different local variables.
|
||||
|
||||
An indirect buffer cannot visit a file, but its base buffer can. If
|
||||
you try to save the indirect buffer, that actually works by saving the
|
||||
base buffer. Killing the base buffer effectively kills the indirect
|
||||
buffer, but killing an indirect buffer has no effect on its base buffer.
|
||||
|
||||
One way to use indirect buffers is to display multiple views of an
|
||||
outline. @xref{Outline Views}.
|
||||
|
||||
A quick and handy way to make an indirect buffer is with the command
|
||||
@kbd{M-x clone-indirect-buffer}. It creates and selects an indirect
|
||||
buffer whose base buffer is the current buffer. With a numeric
|
||||
argument, it prompts for the name of the indirect buffer; otherwise it
|
||||
uses the name of the current buffer, with a @samp{<@var{n}>} suffix
|
||||
added. @kbd{C-x 4 c} (@code{clone-indirect-buffer-other-window})
|
||||
works like @kbd{M-x clone-indirect-buffer}, but it selects the new
|
||||
buffer in another window.
|
||||
|
||||
The more general way to make an indirect buffer is with the command
|
||||
@kbd{M-x make-indirect-buffer}. It creates an indirect buffer from
|
||||
buffer @var{base-buffer}, under the name @var{indirect-name}. It
|
||||
prompts for both @var{base-buffer} and @var{indirect-name} using the
|
||||
minibuffer.
|
||||
|
||||
@node Buffer Convenience
|
||||
@section Convenience Features and Customization of Buffer Handling
|
||||
|
||||
This section describes several modes and features that make it more
|
||||
convenient to switch between buffers.
|
||||
|
||||
@menu
|
||||
* Uniquify:: Making buffer names unique with directory parts.
|
||||
* Iswitchb:: Switching between buffers with substrings.
|
||||
* Buffer Menus:: Configurable buffer menu.
|
||||
@end menu
|
||||
|
||||
@node Uniquify
|
||||
@subsection Making Buffer Names Unique
|
||||
|
||||
@cindex unique buffer names
|
||||
@cindex directories in buffer names
|
||||
When several buffers visit identically-named files, Emacs must give
|
||||
the buffers distinct names. The usual method for making buffer names
|
||||
unique adds @samp{<2>}, @samp{<3>}, etc. to the end of the buffer
|
||||
names (all but one of them).
|
||||
|
||||
@vindex uniquify-buffer-name-style
|
||||
Other methods work by adding parts of each file's directory to the
|
||||
buffer name. To select one, customize the variable
|
||||
@code{uniquify-buffer-name-style} (@pxref{Easy Customization}).
|
||||
|
||||
To begin with, the @code{forward} naming method includes part of the
|
||||
file's directory name at the beginning of the buffer name; using this
|
||||
method, buffers visiting the files @file{/u/rms/tmp/Makefile} and
|
||||
@file{/usr/projects/zaphod/Makefile} would be named
|
||||
@samp{tmp/Makefile} and @samp{zaphod/Makefile}, respectively (instead
|
||||
of @samp{Makefile} and @samp{Makefile<2>}).
|
||||
|
||||
In contrast, the @code{post-forward} naming method would call the
|
||||
buffers @samp{Makefile|tmp} and @samp{Makefile|zaphod}, and the
|
||||
@code{reverse} naming method would call them @samp{Makefile\tmp} and
|
||||
@samp{Makefile\zaphod}. The nontrivial difference between
|
||||
@code{post-forward} and @code{reverse} occurs when just one directory
|
||||
name is not enough to distinguish two files; then @code{reverse} puts
|
||||
the directory names in reverse order, so that @file{/top/middle/file}
|
||||
becomes @samp{file\middle\top}, while @code{post-forward} puts them in
|
||||
forward order after the file name, as in @samp{file|top/middle}.
|
||||
|
||||
Which rule to follow for putting the directory names in the buffer
|
||||
name is not very important if you are going to @emph{look} at the
|
||||
buffer names before you type one. But as an experienced user, if you
|
||||
know the rule, you won't have to look. And then you may find that one
|
||||
rule or another is easier for you to remember and apply quickly.
|
||||
|
||||
@node Iswitchb
|
||||
@subsection Switching Between Buffers using Substrings
|
||||
|
||||
@findex iswitchb-mode
|
||||
@cindex Iswitchb mode
|
||||
@cindex mode, Iswitchb
|
||||
@kindex C-x b @r{(Iswitchb mode)}
|
||||
@kindex C-x 4 b @r{(Iswitchb mode)}
|
||||
@kindex C-x 5 b @r{(Iswitchb mode)}
|
||||
@kindex C-x 4 C-o @r{(Iswitchb mode)}
|
||||
|
||||
Iswitchb global minor mode provides convenient switching between
|
||||
buffers using substrings of their names. It replaces the normal
|
||||
definitions of @kbd{C-x b}, @kbd{C-x 4 b}, @kbd{C-x 5 b}, and @kbd{C-x
|
||||
4 C-o} with alternative commands that are somewhat ``smarter.''
|
||||
|
||||
When one of these commands prompts you for a buffer name, you can
|
||||
type in just a substring of the name you want to choose. As you enter
|
||||
the substring, Iswitchb mode continuously displays a list of buffers
|
||||
that match the substring you have typed.
|
||||
|
||||
At any time, you can type @key{RET} to select the first buffer in
|
||||
the list. So the way to select a particular buffer is to make it the
|
||||
first in the list. There are two ways to do this. You can type more
|
||||
of the buffer name and thus narrow down the list, excluding unwanted
|
||||
buffers above the desired one. Alternatively, you can use @kbd{C-s}
|
||||
and @kbd{C-r} to rotate the list until the desired buffer is first.
|
||||
|
||||
@key{TAB} while entering the buffer name performs completion on the
|
||||
string you have entered, based on the displayed list of buffers.
|
||||
|
||||
To enable Iswitchb mode, type @kbd{M-x iswitchb-mode}, or customize
|
||||
the variable @code{iswitchb-mode} to @code{t} (@pxref{Easy
|
||||
Customization}).
|
||||
|
||||
@node Buffer Menus
|
||||
@subsection Customizing Buffer Menus
|
||||
|
||||
@findex bs-show
|
||||
@cindex buffer list, customizable
|
||||
@table @kbd
|
||||
@item M-x bs-show
|
||||
Make a list of buffers similarly to @kbd{M-x list-buffers} but
|
||||
customizable.
|
||||
@end table
|
||||
|
||||
@kbd{M-x bs-show} pops up a buffer list similar to the one normally
|
||||
displayed by @kbd{C-x C-b} but which you can customize. If you prefer
|
||||
this to the usual buffer list, you can bind this command to @kbd{C-x
|
||||
C-b}. To customize this buffer list, use the @code{bs} Custom group
|
||||
(@pxref{Easy Customization}).
|
||||
|
||||
@findex msb-mode
|
||||
@cindex mode, MSB
|
||||
@cindex MSB mode
|
||||
@cindex buffer menu
|
||||
@findex mouse-buffer-menu
|
||||
@kindex C-Down-Mouse-1
|
||||
MSB global minor mode (``MSB'' stands for ``mouse select buffer'')
|
||||
provides a different and customizable mouse buffer menu which you may
|
||||
prefer. It replaces the bindings of @code{mouse-buffer-menu},
|
||||
normally on @kbd{C-Down-Mouse-1}, and the menu bar buffer menu. You
|
||||
can customize the menu in the @code{msb} Custom group.
|
||||
|
||||
@ignore
|
||||
arch-tag: 08c43460-f4f4-4b43-9cb5-1ea9ad991695
|
||||
@end ignore
|
|
@ -824,17 +824,14 @@ unlimited, so it sets the height and width accordingly. For correct
|
|||
operation you must not change these values during the GDB session.
|
||||
|
||||
@vindex gud-gdb-command-name
|
||||
@findex gdba
|
||||
You can also run GDB in text command mode, like other debuggers. To
|
||||
do this, replace the GDB @code{"--annotate=3"} option with
|
||||
@code{"--fullname"} either in the minibuffer for the current Emacs
|
||||
session, or the custom variable @code{gud-gdb-command-name} for all
|
||||
future sessions. You need to use text command mode to debug multiple
|
||||
programs within one Emacs session. If you have customized
|
||||
@code{gud-gdb-command-name} in this way, you can use @kbd{M-x gdba} to
|
||||
invoke GDB in graphical mode. Moreover, this command succeeds where
|
||||
@kbd{M-x gdb} fails, such as when your @file{.gdbinit} file contains
|
||||
executable GDB commands.
|
||||
You can also run GDB in text command mode, like the other debuggers
|
||||
in Emacs. To do this, replace the GDB @code{"--annotate=3"} option
|
||||
with @code{"--fullname"} either in the minibuffer for the current
|
||||
Emacs session, or the custom variable @code{gud-gdb-command-name} for
|
||||
all future sessions. You need to use text command mode to debug
|
||||
multiple programs within one Emacs session. You can also use
|
||||
@kbd{M-x gud-gdb} to invoke GDB in text command mode if you have
|
||||
problems before execution has started.
|
||||
|
||||
@menu
|
||||
* GDB-UI Layout:: Control the number of displayed buffers.
|
838
doc/emacs/cal-xtra.texi
Normal file
838
doc/emacs/cal-xtra.texi
Normal file
|
@ -0,0 +1,838 @@
|
|||
@c This is part of the Emacs manual.
|
||||
@c Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
@c See file emacs.texi for copying conditions.
|
||||
@c
|
||||
@c This file is included either in emacs-xtra.texi (when producing the
|
||||
@c printed version) or in the main Emacs manual (for the on-line version).
|
||||
|
||||
@c Moved here from the Emacs Lisp Reference Manual, 2005-03-26.
|
||||
@node Advanced Calendar/Diary Usage
|
||||
@section Customizing the Calendar and Diary
|
||||
|
||||
There are many customizations that you can use to make the calendar and
|
||||
diary suit your personal tastes.
|
||||
|
||||
@menu
|
||||
* Calendar Customizing:: Defaults you can set.
|
||||
* Holiday Customizing:: Defining your own holidays.
|
||||
* Date Display Format:: Changing the format.
|
||||
* Time Display Format:: Changing the format.
|
||||
* Diary Customizing:: Defaults you can set.
|
||||
* Hebrew/Islamic Entries:: How to obtain them.
|
||||
* Fancy Diary Display:: Enhancing the diary display, sorting entries,
|
||||
using included diary files.
|
||||
* Sexp Diary Entries:: Fancy things you can do.
|
||||
@end menu
|
||||
|
||||
@node Calendar Customizing
|
||||
@subsection Customizing the Calendar
|
||||
@vindex calendar-holiday-marker
|
||||
@vindex diary-entry-marker
|
||||
The variable @code{calendar-holiday-marker} specifies how to mark a
|
||||
date as being a holiday. Its value may be a single-character string
|
||||
to insert next to the date, or a face name to use for displaying the
|
||||
date. Likewise, the variable @code{diary-entry-marker} specifies how
|
||||
to mark a date that has diary entries. The calendar creates faces
|
||||
named @code{holiday-face} and @code{diary-face} for these purposes;
|
||||
those symbols are the default values of these variables.
|
||||
|
||||
@vindex calendar-load-hook
|
||||
The variable @code{calendar-load-hook} is a normal hook run when the
|
||||
calendar package is first loaded (before actually starting to display
|
||||
the calendar).
|
||||
|
||||
@vindex initial-calendar-window-hook
|
||||
Starting the calendar runs the normal hook
|
||||
@code{initial-calendar-window-hook}. Recomputation of the calendar
|
||||
display does not run this hook. But if you leave the calendar with the
|
||||
@kbd{q} command and reenter it, the hook runs again.@refill
|
||||
|
||||
@vindex today-visible-calendar-hook
|
||||
The variable @code{today-visible-calendar-hook} is a normal hook run
|
||||
after the calendar buffer has been prepared with the calendar when the
|
||||
current date is visible in the window. One use of this hook is to
|
||||
replace today's date with asterisks; to do that, use the hook function
|
||||
@code{calendar-star-date}.
|
||||
|
||||
@findex calendar-star-date
|
||||
@example
|
||||
(add-hook 'today-visible-calendar-hook 'calendar-star-date)
|
||||
@end example
|
||||
|
||||
@noindent
|
||||
Another standard hook function marks the current date, either by
|
||||
changing its face or by adding an asterisk. Here's how to use it:
|
||||
|
||||
@findex calendar-mark-today
|
||||
@example
|
||||
(add-hook 'today-visible-calendar-hook 'calendar-mark-today)
|
||||
@end example
|
||||
|
||||
@noindent
|
||||
@vindex calendar-today-marker
|
||||
The variable @code{calendar-today-marker} specifies how to mark
|
||||
today's date. Its value should be a single-character string to insert
|
||||
next to the date or a face name to use for displaying the date. A
|
||||
face named @code{calendar-today-face} is provided for this purpose;
|
||||
that symbol is the default for this variable.
|
||||
|
||||
@vindex today-invisible-calendar-hook
|
||||
@noindent
|
||||
A similar normal hook, @code{today-invisible-calendar-hook} is run if
|
||||
the current date is @emph{not} visible in the window.
|
||||
|
||||
@vindex calendar-move-hook
|
||||
Each of the calendar cursor motion commands runs the hook
|
||||
@code{calendar-move-hook} after it moves the cursor.
|
||||
|
||||
@node Holiday Customizing
|
||||
@subsection Customizing the Holidays
|
||||
|
||||
@vindex calendar-holidays
|
||||
@vindex christian-holidays
|
||||
@vindex hebrew-holidays
|
||||
@vindex islamic-holidays
|
||||
Emacs knows about holidays defined by entries on one of several lists.
|
||||
You can customize these lists of holidays to your own needs, adding or
|
||||
deleting holidays. The lists of holidays that Emacs uses are for
|
||||
general holidays (@code{general-holidays}), local holidays
|
||||
(@code{local-holidays}), Christian holidays (@code{christian-holidays}),
|
||||
Hebrew (Jewish) holidays (@code{hebrew-holidays}), Islamic (Muslim)
|
||||
holidays (@code{islamic-holidays}), and other holidays
|
||||
(@code{other-holidays}).
|
||||
|
||||
@vindex general-holidays
|
||||
The general holidays are, by default, holidays common throughout the
|
||||
United States. To eliminate these holidays, set @code{general-holidays}
|
||||
to @code{nil}.
|
||||
|
||||
@vindex local-holidays
|
||||
There are no default local holidays (but sites may supply some). You
|
||||
can set the variable @code{local-holidays} to any list of holidays, as
|
||||
described below.
|
||||
|
||||
@vindex all-christian-calendar-holidays
|
||||
@vindex all-hebrew-calendar-holidays
|
||||
@vindex all-islamic-calendar-holidays
|
||||
By default, Emacs does not include all the holidays of the religions
|
||||
that it knows, only those commonly found in secular calendars. For a
|
||||
more extensive collection of religious holidays, you can set any (or
|
||||
all) of the variables @code{all-christian-calendar-holidays},
|
||||
@code{all-hebrew-calendar-holidays}, or
|
||||
@code{all-islamic-calendar-holidays} to @code{t}. If you want to
|
||||
eliminate the religious holidays, set any or all of the corresponding
|
||||
variables @code{christian-holidays}, @code{hebrew-holidays}, and
|
||||
@code{islamic-holidays} to @code{nil}.@refill
|
||||
|
||||
@vindex other-holidays
|
||||
You can set the variable @code{other-holidays} to any list of
|
||||
holidays. This list, normally empty, is intended for individual use.
|
||||
|
||||
@cindex holiday forms
|
||||
Each of the lists (@code{general-holidays}, @code{local-holidays},
|
||||
@code{christian-holidays}, @code{hebrew-holidays},
|
||||
@code{islamic-holidays}, and @code{other-holidays}) is a list of
|
||||
@dfn{holiday forms}, each holiday form describing a holiday (or
|
||||
sometimes a list of holidays).
|
||||
|
||||
Here is a table of the possible kinds of holiday form. Day numbers
|
||||
and month numbers count starting from 1, but ``dayname'' numbers
|
||||
count Sunday as 0. The element @var{string} is always the
|
||||
name of the holiday, as a string.
|
||||
|
||||
@table @code
|
||||
@item (holiday-fixed @var{month} @var{day} @var{string})
|
||||
A fixed date on the Gregorian calendar.
|
||||
|
||||
@item (holiday-float @var{month} @var{dayname} @var{k} @var{string})
|
||||
The @var{k}th @var{dayname} in @var{month} on the Gregorian calendar
|
||||
(@var{dayname}=0 for Sunday, and so on); negative @var{k} means count back
|
||||
from the end of the month.
|
||||
|
||||
@item (holiday-hebrew @var{month} @var{day} @var{string})
|
||||
A fixed date on the Hebrew calendar.
|
||||
|
||||
@item (holiday-islamic @var{month} @var{day} @var{string})
|
||||
A fixed date on the Islamic calendar.
|
||||
|
||||
@item (holiday-julian @var{month} @var{day} @var{string})
|
||||
A fixed date on the Julian calendar.
|
||||
|
||||
@item (holiday-sexp @var{sexp} @var{string})
|
||||
A date calculated by the Lisp expression @var{sexp}. The expression
|
||||
should use the variable @code{year} to compute and return the date of a
|
||||
holiday, or @code{nil} if the holiday doesn't happen this year. The
|
||||
value of @var{sexp} must represent the date as a list of the form
|
||||
@code{(@var{month} @var{day} @var{year})}.
|
||||
|
||||
@item (if @var{condition} @var{holiday-form})
|
||||
A holiday that happens only if @var{condition} is true.
|
||||
|
||||
@item (@var{function} @r{[}@var{args}@r{]})
|
||||
A list of dates calculated by the function @var{function}, called with
|
||||
arguments @var{args}.
|
||||
@end table
|
||||
|
||||
For example, suppose you want to add Bastille Day, celebrated in
|
||||
France on July 14. You can do this as follows:
|
||||
|
||||
@smallexample
|
||||
(setq other-holidays '((holiday-fixed 7 14 "Bastille Day")))
|
||||
@end smallexample
|
||||
|
||||
@noindent
|
||||
The holiday form @code{(holiday-fixed 7 14 "Bastille Day")} specifies the
|
||||
fourteenth day of the seventh month (July).
|
||||
|
||||
Many holidays occur on a specific day of the week, at a specific time
|
||||
of month. Here is a holiday form describing Hurricane Supplication Day,
|
||||
celebrated in the Virgin Islands on the fourth Monday in August:
|
||||
|
||||
@smallexample
|
||||
(holiday-float 8 1 4 "Hurricane Supplication Day")
|
||||
@end smallexample
|
||||
|
||||
@noindent
|
||||
Here the 8 specifies August, the 1 specifies Monday (Sunday is 0,
|
||||
Tuesday is 2, and so on), and the 4 specifies the fourth occurrence in
|
||||
the month (1 specifies the first occurrence, 2 the second occurrence,
|
||||
@minus{}1 the last occurrence, @minus{}2 the second-to-last occurrence, and
|
||||
so on).
|
||||
|
||||
You can specify holidays that occur on fixed days of the Hebrew,
|
||||
Islamic, and Julian calendars too. For example,
|
||||
|
||||
@smallexample
|
||||
(setq other-holidays
|
||||
'((holiday-hebrew 10 2 "Last day of Hanukkah")
|
||||
(holiday-islamic 3 12 "Mohammed's Birthday")
|
||||
(holiday-julian 4 2 "Jefferson's Birthday")))
|
||||
@end smallexample
|
||||
|
||||
@noindent
|
||||
adds the last day of Hanukkah (since the Hebrew months are numbered with
|
||||
1 starting from Nisan), the Islamic feast celebrating Mohammed's
|
||||
birthday (since the Islamic months are numbered from 1 starting with
|
||||
Muharram), and Thomas Jefferson's birthday, which is 2 April 1743 on the
|
||||
Julian calendar.
|
||||
|
||||
To include a holiday conditionally, use either Emacs Lisp's @code{if} or the
|
||||
@code{holiday-sexp} form. For example, American presidential elections
|
||||
occur on the first Tuesday after the first Monday in November of years
|
||||
divisible by 4:
|
||||
|
||||
@smallexample
|
||||
(holiday-sexp '(if (= 0 (% year 4))
|
||||
(calendar-gregorian-from-absolute
|
||||
(1+ (calendar-dayname-on-or-before
|
||||
1 (+ 6 (calendar-absolute-from-gregorian
|
||||
(list 11 1 year)))))))
|
||||
"US Presidential Election")
|
||||
@end smallexample
|
||||
|
||||
@noindent
|
||||
or
|
||||
|
||||
@smallexample
|
||||
(if (= 0 (% displayed-year 4))
|
||||
(fixed 11
|
||||
(extract-calendar-day
|
||||
(calendar-gregorian-from-absolute
|
||||
(1+ (calendar-dayname-on-or-before
|
||||
1 (+ 6 (calendar-absolute-from-gregorian
|
||||
(list 11 1 displayed-year)))))))
|
||||
"US Presidential Election"))
|
||||
@end smallexample
|
||||
|
||||
Some holidays just don't fit into any of these forms because special
|
||||
calculations are involved in their determination. In such cases you
|
||||
must write a Lisp function to do the calculation. To include eclipses,
|
||||
for example, add @code{(eclipses)} to @code{other-holidays}
|
||||
and write an Emacs Lisp function @code{eclipses} that returns a
|
||||
(possibly empty) list of the relevant Gregorian dates among the range
|
||||
visible in the calendar window, with descriptive strings, like this:
|
||||
|
||||
@smallexample
|
||||
(((6 27 1991) "Lunar Eclipse") ((7 11 1991) "Solar Eclipse") ... )
|
||||
@end smallexample
|
||||
|
||||
@node Date Display Format
|
||||
@subsection Date Display Format
|
||||
@vindex calendar-date-display-form
|
||||
|
||||
You can customize the manner of displaying dates in the diary, in mode
|
||||
lines, and in messages by setting @code{calendar-date-display-form}.
|
||||
This variable holds a list of expressions that can involve the variables
|
||||
@code{month}, @code{day}, and @code{year}, which are all numbers in
|
||||
string form, and @code{monthname} and @code{dayname}, which are both
|
||||
alphabetic strings. In the American style, the default value of this
|
||||
list is as follows:
|
||||
|
||||
@smallexample
|
||||
((if dayname (concat dayname ", ")) monthname " " day ", " year)
|
||||
@end smallexample
|
||||
|
||||
@noindent
|
||||
while in the European style this value is the default:
|
||||
|
||||
@smallexample
|
||||
((if dayname (concat dayname ", ")) day " " monthname " " year)
|
||||
@end smallexample
|
||||
|
||||
@noindent
|
||||
The ISO standard date representation is this:
|
||||
|
||||
@smallexample
|
||||
(year "-" month "-" day)
|
||||
@end smallexample
|
||||
|
||||
@noindent
|
||||
This specifies a typical American format:
|
||||
|
||||
@smallexample
|
||||
(month "/" day "/" (substring year -2))
|
||||
@end smallexample
|
||||
|
||||
@node Time Display Format
|
||||
@subsection Time Display Format
|
||||
@vindex calendar-time-display-form
|
||||
|
||||
The calendar and diary by default display times of day in the
|
||||
conventional American style with the hours from 1 through 12, minutes,
|
||||
and either @samp{am} or @samp{pm}. If you prefer the European style,
|
||||
also known in the US as military, in which the hours go from 00 to 23,
|
||||
you can alter the variable @code{calendar-time-display-form}. This
|
||||
variable is a list of expressions that can involve the variables
|
||||
@code{12-hours}, @code{24-hours}, and @code{minutes}, which are all
|
||||
numbers in string form, and @code{am-pm} and @code{time-zone}, which are
|
||||
both alphabetic strings. The default value of
|
||||
@code{calendar-time-display-form} is as follows:
|
||||
|
||||
@smallexample
|
||||
(12-hours ":" minutes am-pm
|
||||
(if time-zone " (") time-zone (if time-zone ")"))
|
||||
@end smallexample
|
||||
|
||||
@noindent
|
||||
Here is a value that provides European style times:
|
||||
|
||||
@smallexample
|
||||
(24-hours ":" minutes
|
||||
(if time-zone " (") time-zone (if time-zone ")"))
|
||||
@end smallexample
|
||||
|
||||
@node Diary Customizing
|
||||
@subsection Customizing the Diary
|
||||
|
||||
@vindex holidays-in-diary-buffer
|
||||
Ordinarily, the mode line of the diary buffer window indicates any
|
||||
holidays that fall on the date of the diary entries. The process of
|
||||
checking for holidays can take several seconds, so including holiday
|
||||
information delays the display of the diary buffer noticeably. If you'd
|
||||
prefer to have a faster display of the diary buffer but without the
|
||||
holiday information, set the variable @code{holidays-in-diary-buffer} to
|
||||
@code{nil}.@refill
|
||||
|
||||
@vindex number-of-diary-entries
|
||||
The variable @code{number-of-diary-entries} controls the number of
|
||||
days of diary entries to be displayed at one time. It affects the
|
||||
initial display when @code{view-diary-entries-initially} is @code{t}, as
|
||||
well as the command @kbd{M-x diary}. For example, the default value is
|
||||
1, which says to display only the current day's diary entries. If the
|
||||
value is 2, both the current day's and the next day's entries are
|
||||
displayed. The value can also be a vector of seven elements: for
|
||||
example, if the value is @code{[0 2 2 2 2 4 1]} then no diary entries
|
||||
appear on Sunday, the current date's and the next day's diary entries
|
||||
appear Monday through Thursday, Friday through Monday's entries appear
|
||||
on Friday, while on Saturday only that day's entries appear.
|
||||
|
||||
@vindex print-diary-entries-hook
|
||||
@findex print-diary-entries
|
||||
The variable @code{print-diary-entries-hook} is a normal hook run
|
||||
after preparation of a temporary buffer containing just the diary
|
||||
entries currently visible in the diary buffer. (The other, irrelevant
|
||||
diary entries are really absent from the temporary buffer; in the diary
|
||||
buffer, they are merely hidden.) The default value of this hook does
|
||||
the printing with the command @code{lpr-buffer}. If you want to use a
|
||||
different command to do the printing, just change the value of this
|
||||
hook. Other uses might include, for example, rearranging the lines into
|
||||
order by day and time.
|
||||
|
||||
@vindex diary-date-forms
|
||||
You can customize the form of dates in your diary file, if neither the
|
||||
standard American nor European styles suits your needs, by setting the
|
||||
variable @code{diary-date-forms}. This variable is a list of patterns
|
||||
for recognizing a date. Each date pattern is a list whose elements may
|
||||
be regular expressions (@pxref{Regular Expressions,,, elisp, the Emacs
|
||||
Lisp Reference Manual}) or the symbols @code{month}, @code{day},
|
||||
@code{year}, @code{monthname}, and @code{dayname}. All these elements
|
||||
serve as patterns that match certain kinds of text in the diary file.
|
||||
In order for the date pattern, as a whole, to match, all of its elements
|
||||
must match consecutively.
|
||||
|
||||
A regular expression in a date pattern matches in its usual fashion,
|
||||
using the standard syntax table altered so that @samp{*} is a word
|
||||
constituent.
|
||||
|
||||
The symbols @code{month}, @code{day}, @code{year}, @code{monthname},
|
||||
and @code{dayname} match the month number, day number, year number,
|
||||
month name, and day name of the date being considered. The symbols that
|
||||
match numbers allow leading zeros; those that match names allow
|
||||
three-letter abbreviations and capitalization. All the symbols can
|
||||
match @samp{*}; since @samp{*} in a diary entry means ``any day'', ``any
|
||||
month'', and so on, it should match regardless of the date being
|
||||
considered.
|
||||
|
||||
The default value of @code{diary-date-forms} in the American style is
|
||||
this:
|
||||
|
||||
@example
|
||||
((month "/" day "[^/0-9]")
|
||||
(month "/" day "/" year "[^0-9]")
|
||||
(monthname " *" day "[^,0-9]")
|
||||
(monthname " *" day ", *" year "[^0-9]")
|
||||
(dayname "\\W"))
|
||||
@end example
|
||||
|
||||
The date patterns in the list must be @emph{mutually exclusive} and
|
||||
must not match any portion of the diary entry itself, just the date and
|
||||
one character of whitespace. If, to be mutually exclusive, the pattern
|
||||
must match a portion of the diary entry text---beyond the whitespace
|
||||
that ends the date---then the first element of the date pattern
|
||||
@emph{must} be @code{backup}. This causes the date recognizer to back
|
||||
up to the beginning of the current word of the diary entry, after
|
||||
finishing the match. Even if you use @code{backup}, the date pattern
|
||||
must absolutely not match more than a portion of the first word of the
|
||||
diary entry. The default value of @code{diary-date-forms} in the
|
||||
European style is this list:
|
||||
|
||||
@example
|
||||
((day "/" month "[^/0-9]")
|
||||
(day "/" month "/" year "[^0-9]")
|
||||
(backup day " *" monthname "\\W+\\<[^*0-9]")
|
||||
(day " *" monthname " *" year "[^0-9]")
|
||||
(dayname "\\W"))
|
||||
@end example
|
||||
|
||||
@noindent
|
||||
Notice the use of @code{backup} in the third pattern, because it needs
|
||||
to match part of a word beyond the date itself to distinguish it from
|
||||
the fourth pattern.
|
||||
|
||||
@node Hebrew/Islamic Entries
|
||||
@subsection Hebrew- and Islamic-Date Diary Entries
|
||||
|
||||
Your diary file can have entries based on Hebrew or Islamic dates, as
|
||||
well as entries based on the world-standard Gregorian calendar.
|
||||
However, because recognition of such entries is time-consuming and most
|
||||
people don't use them, you must explicitly enable their use. If you
|
||||
want the diary to recognize Hebrew-date diary entries, for example,
|
||||
you must do this:
|
||||
|
||||
@vindex nongregorian-diary-listing-hook
|
||||
@vindex nongregorian-diary-marking-hook
|
||||
@findex list-hebrew-diary-entries
|
||||
@findex mark-hebrew-diary-entries
|
||||
@smallexample
|
||||
(add-hook 'nongregorian-diary-listing-hook 'list-hebrew-diary-entries)
|
||||
(add-hook 'nongregorian-diary-marking-hook 'mark-hebrew-diary-entries)
|
||||
@end smallexample
|
||||
|
||||
@noindent
|
||||
If you want Islamic-date entries, do this:
|
||||
|
||||
@findex list-islamic-diary-entries
|
||||
@findex mark-islamic-diary-entries
|
||||
@smallexample
|
||||
(add-hook 'nongregorian-diary-listing-hook 'list-islamic-diary-entries)
|
||||
(add-hook 'nongregorian-diary-marking-hook 'mark-islamic-diary-entries)
|
||||
@end smallexample
|
||||
|
||||
Hebrew- and Islamic-date diary entries have the same formats as
|
||||
Gregorian-date diary entries, except that @samp{H} precedes a Hebrew
|
||||
date and @samp{I} precedes an Islamic date. Moreover, because the
|
||||
Hebrew and Islamic month names are not uniquely specified by the first
|
||||
three letters, you may not abbreviate them. For example, a diary entry
|
||||
for the Hebrew date Heshvan 25 could look like this:
|
||||
|
||||
@smallexample
|
||||
HHeshvan 25 Happy Hebrew birthday!
|
||||
@end smallexample
|
||||
|
||||
@noindent
|
||||
and would appear in the diary for any date that corresponds to Heshvan 25
|
||||
on the Hebrew calendar. And here is an Islamic-date diary entry that matches
|
||||
Dhu al-Qada 25:
|
||||
|
||||
@smallexample
|
||||
IDhu al-Qada 25 Happy Islamic birthday!
|
||||
@end smallexample
|
||||
|
||||
As with Gregorian-date diary entries, Hebrew- and Islamic-date entries
|
||||
are nonmarking if they are preceded with an ampersand (@samp{&}).
|
||||
|
||||
Here is a table of commands used in the calendar to create diary entries
|
||||
that match the selected date and other dates that are similar in the Hebrew
|
||||
or Islamic calendar:
|
||||
|
||||
@table @kbd
|
||||
@item i h d
|
||||
Add a diary entry for the Hebrew date corresponding to the selected date
|
||||
(@code{insert-hebrew-diary-entry}).
|
||||
@item i h m
|
||||
Add a diary entry for the day of the Hebrew month corresponding to the
|
||||
selected date (@code{insert-monthly-hebrew-diary-entry}). This diary
|
||||
entry matches any date that has the same Hebrew day-within-month as the
|
||||
selected date.
|
||||
@item i h y
|
||||
Add a diary entry for the day of the Hebrew year corresponding to the
|
||||
selected date (@code{insert-yearly-hebrew-diary-entry}). This diary
|
||||
entry matches any date which has the same Hebrew month and day-within-month
|
||||
as the selected date.
|
||||
@item i i d
|
||||
Add a diary entry for the Islamic date corresponding to the selected date
|
||||
(@code{insert-islamic-diary-entry}).
|
||||
@item i i m
|
||||
Add a diary entry for the day of the Islamic month corresponding to the
|
||||
selected date (@code{insert-monthly-islamic-diary-entry}).
|
||||
@item i i y
|
||||
Add a diary entry for the day of the Islamic year corresponding to the
|
||||
selected date (@code{insert-yearly-islamic-diary-entry}).
|
||||
@end table
|
||||
|
||||
@findex insert-hebrew-diary-entry
|
||||
@findex insert-monthly-hebrew-diary-entry
|
||||
@findex insert-yearly-hebrew-diary-entry
|
||||
@findex insert-islamic-diary-entry
|
||||
@findex insert-monthly-islamic-diary-entry
|
||||
@findex insert-yearly-islamic-diary-entry
|
||||
These commands work much like the corresponding commands for ordinary
|
||||
diary entries: they apply to the date that point is on in the calendar
|
||||
window, and what they do is insert just the date portion of a diary entry
|
||||
at the end of your diary file. You must then insert the rest of the
|
||||
diary entry.
|
||||
|
||||
@node Fancy Diary Display
|
||||
@subsection Fancy Diary Display
|
||||
@vindex diary-display-hook
|
||||
@findex simple-diary-display
|
||||
|
||||
Diary display works by preparing the diary buffer and then running the
|
||||
hook @code{diary-display-hook}. The default value of this hook
|
||||
(@code{simple-diary-display}) hides the irrelevant diary entries and
|
||||
then displays the buffer. However, if you specify the hook as follows,
|
||||
|
||||
@cindex diary buffer
|
||||
@findex fancy-diary-display
|
||||
@example
|
||||
(add-hook 'diary-display-hook 'fancy-diary-display)
|
||||
@end example
|
||||
|
||||
@noindent
|
||||
this enables fancy diary display. It displays diary entries and
|
||||
holidays by copying them into a special buffer that exists only for the
|
||||
sake of display. Copying to a separate buffer provides an opportunity
|
||||
to change the displayed text to make it prettier---for example, to sort
|
||||
the entries by the dates they apply to.
|
||||
|
||||
As with simple diary display, you can print a hard copy of the buffer
|
||||
with @code{print-diary-entries}. To print a hard copy of a day-by-day
|
||||
diary for a week, position point on Sunday of that week, type
|
||||
@kbd{7 d}, and then do @kbd{M-x print-diary-entries}. As usual, the
|
||||
inclusion of the holidays slows down the display slightly; you can speed
|
||||
things up by setting the variable @code{holidays-in-diary-buffer} to
|
||||
@code{nil}.
|
||||
|
||||
@vindex diary-list-include-blanks
|
||||
Ordinarily, the fancy diary buffer does not show days for which there are
|
||||
no diary entries, even if that day is a holiday. If you want such days to be
|
||||
shown in the fancy diary buffer, set the variable
|
||||
@code{diary-list-include-blanks} to @code{t}.@refill
|
||||
|
||||
@cindex sorting diary entries
|
||||
If you use the fancy diary display, you can use the normal hook
|
||||
@code{list-diary-entries-hook} to sort each day's diary entries by their
|
||||
time of day. Here's how:
|
||||
|
||||
@findex sort-diary-entries
|
||||
@example
|
||||
(add-hook 'list-diary-entries-hook 'sort-diary-entries t)
|
||||
@end example
|
||||
|
||||
@noindent
|
||||
For each day, this sorts diary entries that begin with a recognizable
|
||||
time of day according to their times. Diary entries without times come
|
||||
first within each day.
|
||||
|
||||
Fancy diary display also has the ability to process included diary
|
||||
files. This permits a group of people to share a diary file for events
|
||||
that apply to all of them. Lines in the diary file of this form:
|
||||
|
||||
@smallexample
|
||||
#include "@var{filename}"
|
||||
@end smallexample
|
||||
|
||||
@noindent
|
||||
includes the diary entries from the file @var{filename} in the fancy
|
||||
diary buffer. The include mechanism is recursive, so that included files
|
||||
can include other files, and so on; you must be careful not to have a
|
||||
cycle of inclusions, of course. Here is how to enable the include
|
||||
facility:
|
||||
|
||||
@vindex list-diary-entries-hook
|
||||
@vindex mark-diary-entries-hook
|
||||
@findex include-other-diary-files
|
||||
@findex mark-included-diary-files
|
||||
@smallexample
|
||||
(add-hook 'list-diary-entries-hook 'include-other-diary-files)
|
||||
(add-hook 'mark-diary-entries-hook 'mark-included-diary-files)
|
||||
@end smallexample
|
||||
|
||||
The include mechanism works only with the fancy diary display, because
|
||||
ordinary diary display shows the entries directly from your diary file.
|
||||
|
||||
@node Sexp Diary Entries
|
||||
@subsection Sexp Entries and the Fancy Diary Display
|
||||
@cindex sexp diary entries
|
||||
|
||||
Sexp diary entries allow you to do more than just have complicated
|
||||
conditions under which a diary entry applies. If you use the fancy
|
||||
diary display, sexp entries can generate the text of the entry depending
|
||||
on the date itself. For example, an anniversary diary entry can insert
|
||||
the number of years since the anniversary date into the text of the
|
||||
diary entry. Thus the @samp{%d} in this diary entry:
|
||||
|
||||
@findex diary-anniversary
|
||||
@smallexample
|
||||
%%(diary-anniversary 10 31 1948) Arthur's birthday (%d years old)
|
||||
@end smallexample
|
||||
|
||||
@noindent
|
||||
gets replaced by the age, so on October 31, 1990 the entry appears in
|
||||
the fancy diary buffer like this:
|
||||
|
||||
@smallexample
|
||||
Arthur's birthday (42 years old)
|
||||
@end smallexample
|
||||
|
||||
@noindent
|
||||
If the diary file instead contains this entry:
|
||||
|
||||
@smallexample
|
||||
%%(diary-anniversary 10 31 1948) Arthur's %d%s birthday
|
||||
@end smallexample
|
||||
|
||||
@noindent
|
||||
the entry in the fancy diary buffer for October 31, 1990 appears like this:
|
||||
|
||||
@smallexample
|
||||
Arthur's 42nd birthday
|
||||
@end smallexample
|
||||
|
||||
Similarly, cyclic diary entries can interpolate the number of repetitions
|
||||
that have occurred:
|
||||
|
||||
@findex diary-cyclic
|
||||
@smallexample
|
||||
%%(diary-cyclic 50 1 1 1990) Renew medication (%d%s time)
|
||||
@end smallexample
|
||||
|
||||
@noindent
|
||||
looks like this:
|
||||
|
||||
@smallexample
|
||||
Renew medication (5th time)
|
||||
@end smallexample
|
||||
|
||||
@noindent
|
||||
in the fancy diary display on September 8, 1990.
|
||||
|
||||
There is an early reminder diary sexp that includes its entry in the
|
||||
diary not only on the date of occurrence, but also on earlier dates.
|
||||
For example, if you want a reminder a week before your anniversary, you
|
||||
can use
|
||||
|
||||
@findex diary-remind
|
||||
@smallexample
|
||||
%%(diary-remind '(diary-anniversary 12 22 1968) 7) Ed's anniversary
|
||||
@end smallexample
|
||||
|
||||
@noindent
|
||||
and the fancy diary will show
|
||||
@smallexample
|
||||
Ed's anniversary
|
||||
@end smallexample
|
||||
@noindent
|
||||
both on December 15 and on December 22.
|
||||
|
||||
@findex diary-date
|
||||
The function @code{diary-date} applies to dates described by a month,
|
||||
day, year combination, each of which can be an integer, a list of
|
||||
integers, or @code{t}. The value @code{t} means all values. For
|
||||
example,
|
||||
|
||||
@smallexample
|
||||
%%(diary-date '(10 11 12) 22 t) Rake leaves
|
||||
@end smallexample
|
||||
|
||||
@noindent
|
||||
causes the fancy diary to show
|
||||
|
||||
@smallexample
|
||||
Rake leaves
|
||||
@end smallexample
|
||||
|
||||
@noindent
|
||||
on October 22, November 22, and December 22 of every year.
|
||||
|
||||
@findex diary-float
|
||||
The function @code{diary-float} allows you to describe diary entries
|
||||
that apply to dates like the third Friday of November, or the last
|
||||
Tuesday in April. The parameters are the @var{month}, @var{dayname},
|
||||
and an index @var{n}. The entry appears on the @var{n}th @var{dayname}
|
||||
of @var{month}, where @var{dayname}=0 means Sunday, 1 means Monday, and
|
||||
so on. If @var{n} is negative it counts backward from the end of
|
||||
@var{month}. The value of @var{month} can be a list of months, a single
|
||||
month, or @code{t} to specify all months. You can also use an optional
|
||||
parameter @var{day} to specify the @var{n}th @var{dayname} of
|
||||
@var{month} on or after/before @var{day}; the value of @var{day} defaults
|
||||
to 1 if @var{n} is positive and to the last day of @var{month} if
|
||||
@var{n} is negative. For example,
|
||||
|
||||
@smallexample
|
||||
%%(diary-float t 1 -1) Pay rent
|
||||
@end smallexample
|
||||
|
||||
@noindent
|
||||
causes the fancy diary to show
|
||||
|
||||
@smallexample
|
||||
Pay rent
|
||||
@end smallexample
|
||||
|
||||
@noindent
|
||||
on the last Monday of every month.
|
||||
|
||||
The generality of sexp diary entries lets you specify any diary
|
||||
entry that you can describe algorithmically. A sexp diary entry
|
||||
contains an expression that computes whether the entry applies to any
|
||||
given date. If its value is non-@code{nil}, the entry applies to that
|
||||
date; otherwise, it does not. The expression can use the variable
|
||||
@code{date} to find the date being considered; its value is a list
|
||||
(@var{month} @var{day} @var{year}) that refers to the Gregorian
|
||||
calendar.
|
||||
|
||||
The sexp diary entry applies to a date when the expression's value
|
||||
is non-@code{nil}, but some values have more specific meanings. If
|
||||
the value is a string, that string is a description of the event which
|
||||
occurs on that date. The value can also have the form
|
||||
@code{(@var{mark} . @var{string})}; then @var{mark} specifies how to
|
||||
mark the date in the calendar, and @var{string} is the description of
|
||||
the event. If @var{mark} is a single-character string, that character
|
||||
appears next to the date in the calendar. If @var{mark} is a face
|
||||
name, the date is displayed in that face. If @var{mark} is
|
||||
@code{nil}, that specifies no particular highlighting for the date.
|
||||
|
||||
Suppose you get paid on the 21st of the month if it is a weekday, and
|
||||
on the Friday before if the 21st is on a weekend. Here is how to write
|
||||
a sexp diary entry that matches those dates:
|
||||
|
||||
@smallexample
|
||||
&%%(let ((dayname (calendar-day-of-week date))
|
||||
(day (car (cdr date))))
|
||||
(or (and (= day 21) (memq dayname '(1 2 3 4 5)))
|
||||
(and (memq day '(19 20)) (= dayname 5)))
|
||||
) Pay check deposited
|
||||
@end smallexample
|
||||
|
||||
The following sexp diary entries take advantage of the ability (in the fancy
|
||||
diary display) to concoct diary entries whose text varies based on the date:
|
||||
|
||||
@findex diary-sunrise-sunset
|
||||
@findex diary-phases-of-moon
|
||||
@findex diary-day-of-year
|
||||
@findex diary-iso-date
|
||||
@findex diary-julian-date
|
||||
@findex diary-astro-day-number
|
||||
@findex diary-hebrew-date
|
||||
@findex diary-islamic-date
|
||||
@findex diary-french-date
|
||||
@findex diary-mayan-date
|
||||
@table @code
|
||||
@item %%(diary-sunrise-sunset)
|
||||
Make a diary entry for the local times of today's sunrise and sunset.
|
||||
@item %%(diary-phases-of-moon)
|
||||
Make a diary entry for the phases (quarters) of the moon.
|
||||
@item %%(diary-day-of-year)
|
||||
Make a diary entry with today's day number in the current year and the number
|
||||
of days remaining in the current year.
|
||||
@item %%(diary-iso-date)
|
||||
Make a diary entry with today's equivalent ISO commercial date.
|
||||
@item %%(diary-julian-date)
|
||||
Make a diary entry with today's equivalent date on the Julian calendar.
|
||||
@item %%(diary-astro-day-number)
|
||||
Make a diary entry with today's equivalent astronomical (Julian) day number.
|
||||
@item %%(diary-hebrew-date)
|
||||
Make a diary entry with today's equivalent date on the Hebrew calendar.
|
||||
@item %%(diary-islamic-date)
|
||||
Make a diary entry with today's equivalent date on the Islamic calendar.
|
||||
@item %%(diary-french-date)
|
||||
Make a diary entry with today's equivalent date on the French Revolutionary
|
||||
calendar.
|
||||
@item %%(diary-mayan-date)
|
||||
Make a diary entry with today's equivalent date on the Mayan calendar.
|
||||
@end table
|
||||
|
||||
@noindent
|
||||
Thus including the diary entry
|
||||
|
||||
@example
|
||||
&%%(diary-hebrew-date)
|
||||
@end example
|
||||
|
||||
@noindent
|
||||
causes every day's diary display to contain the equivalent date on the
|
||||
Hebrew calendar, if you are using the fancy diary display. (With simple
|
||||
diary display, the line @samp{&%%(diary-hebrew-date)} appears in the
|
||||
diary for any date, but does nothing particularly useful.)
|
||||
|
||||
These functions can be used to construct sexp diary entries based on
|
||||
the Hebrew calendar in certain standard ways:
|
||||
|
||||
@cindex rosh hodesh
|
||||
@findex diary-rosh-hodesh
|
||||
@cindex parasha, weekly
|
||||
@findex diary-parasha
|
||||
@cindex candle lighting times
|
||||
@findex diary-sabbath-candles
|
||||
@cindex omer count
|
||||
@findex diary-omer
|
||||
@cindex yahrzeits
|
||||
@findex diary-yahrzeit
|
||||
@table @code
|
||||
@item %%(diary-rosh-hodesh)
|
||||
Make a diary entry that tells the occurrence and ritual announcement of each
|
||||
new Hebrew month.
|
||||
@item %%(diary-parasha)
|
||||
Make a Saturday diary entry that tells the weekly synagogue scripture reading.
|
||||
@item %%(diary-sabbath-candles)
|
||||
Make a Friday diary entry that tells the @emph{local time} of Sabbath
|
||||
candle lighting.
|
||||
@item %%(diary-omer)
|
||||
Make a diary entry that gives the omer count, when appropriate.
|
||||
@item %%(diary-yahrzeit @var{month} @var{day} @var{year}) @var{name}
|
||||
Make a diary entry marking the anniversary of a date of death. The date
|
||||
is the @emph{Gregorian} (civil) date of death. The diary entry appears
|
||||
on the proper Hebrew calendar anniversary and on the day before. (In
|
||||
the European style, the order of the parameters is changed to @var{day},
|
||||
@var{month}, @var{year}.)
|
||||
@end table
|
||||
|
||||
All the functions documented above take an optional argument
|
||||
@var{mark} which specifies how to mark the date in the calendar display.
|
||||
If one of these functions decides that it applies to a certain date,
|
||||
it returns a value that contains @var{mark}.
|
||||
|
||||
@ignore
|
||||
arch-tag: 52cb299f-fd1f-4616-bfe6-91b988669431
|
||||
@end ignore
|
|
@ -457,12 +457,12 @@ Display holidays for the selected date
|
|||
@item Mouse-2 Holidays
|
||||
Display any holidays for the date you click on.
|
||||
@item x
|
||||
Mark holidays in the calendar window (@code{mark-calendar-holidays}).
|
||||
Mark holidays in the calendar window (@code{calendar-mark-holidays}).
|
||||
@item u
|
||||
Unmark calendar window (@code{calendar-unmark}).
|
||||
@item a
|
||||
List all holidays for the displayed three months in another window
|
||||
(@code{list-calendar-holidays}).
|
||||
(@code{calendar-list-holidays}).
|
||||
@item M-x holidays
|
||||
List all holidays for three months around today's date in another
|
||||
window.
|
||||
|
@ -481,7 +481,7 @@ that date, in the echo area if they fit there, otherwise in a separate
|
|||
window.
|
||||
|
||||
@kindex x @r{(Calendar mode)}
|
||||
@findex mark-calendar-holidays
|
||||
@findex calendar-mark-holidays
|
||||
@kindex u @r{(Calendar mode)}
|
||||
@findex calendar-unmark
|
||||
@vindex mark-holidays-in-calendar
|
||||
|
@ -503,7 +503,7 @@ erases any diary marks (@pxref{Diary}). If the variable
|
|||
updating the calendar marks holidays automatically.
|
||||
|
||||
@kindex a @r{(Calendar mode)}
|
||||
@findex list-calendar-holidays
|
||||
@findex calendar-list-holidays
|
||||
To get even more detailed information, use the @kbd{a} command, which
|
||||
displays a separate buffer containing a list of all holidays in the
|
||||
current three-month range. You can use @key{SPC} and @key{DEL} in the
|
1263
doc/emacs/cmdargs.texi
Normal file
1263
doc/emacs/cmdargs.texi
Normal file
File diff suppressed because it is too large
Load diff
2516
doc/emacs/custom.texi
Normal file
2516
doc/emacs/custom.texi
Normal file
File diff suppressed because it is too large
Load diff
1259
doc/emacs/display.texi
Normal file
1259
doc/emacs/display.texi
Normal file
File diff suppressed because it is too large
Load diff
416
doc/emacs/doclicense.texi
Normal file
416
doc/emacs/doclicense.texi
Normal file
|
@ -0,0 +1,416 @@
|
|||
@c -*-texinfo-*-
|
||||
@center Version 1.2, November 2002
|
||||
|
||||
@display
|
||||
Copyright (C) 2000,2001,2002 Free Software Foundation, Inc.
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
@end display
|
||||
@sp 1
|
||||
@enumerate 0
|
||||
@item
|
||||
PREAMBLE
|
||||
|
||||
The purpose of this License is to make a manual, textbook, or other
|
||||
functional and useful document ``free'' in the sense of freedom: to
|
||||
assure everyone the effective freedom to copy and redistribute it,
|
||||
with or without modifying it, either commercially or noncommercially.
|
||||
Secondarily, this License preserves for the author and publisher a way
|
||||
to get credit for their work, while not being considered responsible
|
||||
for modifications made by others.
|
||||
|
||||
This License is a kind of ``copyleft,'' which means that derivative
|
||||
works of the document must themselves be free in the same sense. It
|
||||
complements the GNU General Public License, which is a copyleft
|
||||
license designed for free software.
|
||||
|
||||
We have designed this License in order to use it for manuals for free
|
||||
software, because free software needs free documentation: a free
|
||||
program should come with manuals providing the same freedoms that the
|
||||
software does. But this License is not limited to software manuals;
|
||||
it can be used for any textual work, regardless of subject matter or
|
||||
whether it is published as a printed book. We recommend this License
|
||||
principally for works whose purpose is instruction or reference.
|
||||
|
||||
@sp 1
|
||||
@item
|
||||
APPLICABILITY AND DEFINITIONS
|
||||
|
||||
This License applies to any manual or other work, in any medium, that
|
||||
contains a notice placed by the copyright holder saying it can be
|
||||
distributed under the terms of this License. Such a notice grants a
|
||||
world-wide, royalty-free license, unlimited in duration, to use that
|
||||
work under the conditions stated herein. The ``Document,'' below,
|
||||
refers to any such manual or work. Any member of the public is a
|
||||
licensee, and is addressed as ``you.'' You accept the license if you
|
||||
copy, modify or distribute the work in a way requiring permission
|
||||
under copyright law.
|
||||
|
||||
A ``Modified Version'' of the Document means any work containing the
|
||||
Document or a portion of it, either copied verbatim, or with
|
||||
modifications and/or translated into another language.
|
||||
|
||||
A ``Secondary Section'' is a named appendix or a front-matter section of
|
||||
the Document that deals exclusively with the relationship of the
|
||||
publishers or authors of the Document to the Document's overall subject
|
||||
(or to related matters) and contains nothing that could fall directly
|
||||
within that overall subject. (Thus, if the Document is in part a
|
||||
textbook of mathematics, a Secondary Section may not explain any
|
||||
mathematics.) The relationship could be a matter of historical
|
||||
connection with the subject or with related matters, or of legal,
|
||||
commercial, philosophical, ethical or political position regarding
|
||||
them.
|
||||
|
||||
The ``Invariant Sections'' are certain Secondary Sections whose titles
|
||||
are designated, as being those of Invariant Sections, in the notice
|
||||
that says that the Document is released under this License. If a
|
||||
section does not fit the above definition of Secondary then it is not
|
||||
allowed to be designated as Invariant. The Document may contain zero
|
||||
Invariant Sections. If the Document does not identify any Invariant
|
||||
Sections then there are none.
|
||||
|
||||
The ``Cover Texts'' are certain short passages of text that are listed,
|
||||
as Front-Cover Texts or Back-Cover Texts, in the notice that says that
|
||||
the Document is released under this License. A Front-Cover Text may
|
||||
be at most 5 words, and a Back-Cover Text may be at most 25 words.
|
||||
|
||||
A ``Transparent'' copy of the Document means a machine-readable copy,
|
||||
represented in a format whose specification is available to the
|
||||
general public, that is suitable for revising the document
|
||||
straightforwardly with generic text editors or (for images composed of
|
||||
pixels) generic paint programs or (for drawings) some widely available
|
||||
drawing editor, and that is suitable for input to text formatters or
|
||||
for automatic translation to a variety of formats suitable for input
|
||||
to text formatters. A copy made in an otherwise Transparent file
|
||||
format whose markup, or absence of markup, has been arranged to thwart
|
||||
or discourage subsequent modification by readers is not Transparent.
|
||||
An image format is not Transparent if used for any substantial amount
|
||||
of text. A copy that is not ``Transparent'' is called ``Opaque.''
|
||||
|
||||
|
||||
Examples of suitable formats for Transparent copies include plain
|
||||
ASCII without markup, Texinfo input format, LaTeX input format, SGML
|
||||
or XML using a publicly available DTD, and standard-conforming simple
|
||||
HTML, PostScript or PDF designed for human modification. Examples of
|
||||
transparent image formats include PNG, XCF and JPG. Opaque formats
|
||||
include proprietary formats that can be read and edited only by
|
||||
proprietary word processors, SGML or XML for which the DTD and/or
|
||||
processing tools are not generally available, and the
|
||||
machine-generated HTML, PostScript or PDF produced by some word
|
||||
processors for output purposes only.
|
||||
|
||||
The ``Title Page'' means, for a printed book, the title page itself,
|
||||
plus such following pages as are needed to hold, legibly, the material
|
||||
this License requires to appear in the title page. For works in
|
||||
formats which do not have any title page as such, ``Title Page'' means
|
||||
the text near the most prominent appearance of the work's title,
|
||||
preceding the beginning of the body of the text.
|
||||
|
||||
A section ``Entitled XYZ'' means a named subunit of the Document whose
|
||||
title either is precisely XYZ or contains XYZ in parentheses following
|
||||
text that translates XYZ in another language. (Here XYZ stands for a
|
||||
specific section name mentioned below, such as ``Acknowledgements,''
|
||||
``Dedications,'' ``Endorsements,'' or ``History.'') To ``Preserve the Title''
|
||||
of such a section when you modify the Document means that it remains a
|
||||
section ``Entitled XYZ'' according to this definition.
|
||||
|
||||
The Document may include Warranty Disclaimers next to the notice which
|
||||
states that this License applies to the Document. These Warranty
|
||||
Disclaimers are considered to be included by reference in this
|
||||
License, but only as regards disclaiming warranties: any other
|
||||
implication that these Warranty Disclaimers may have is void and has
|
||||
no effect on the meaning of this License.
|
||||
@sp 1
|
||||
@item
|
||||
VERBATIM COPYING
|
||||
|
||||
You may copy and distribute the Document in any medium, either
|
||||
commercially or noncommercially, provided that this License, the
|
||||
copyright notices, and the license notice saying this License applies
|
||||
to the Document are reproduced in all copies, and that you add no other
|
||||
conditions whatsoever to those of this License. You may not use
|
||||
technical measures to obstruct or control the reading or further
|
||||
copying of the copies you make or distribute. However, you may accept
|
||||
compensation in exchange for copies. If you distribute a large enough
|
||||
number of copies you must also follow the conditions in section 3.
|
||||
|
||||
You may also lend copies, under the same conditions stated above, and
|
||||
you may publicly display copies.
|
||||
@sp 1
|
||||
@item
|
||||
COPYING IN QUANTITY
|
||||
|
||||
If you publish printed copies (or copies in media that commonly have
|
||||
printed covers) of the Document, numbering more than 100, and the
|
||||
Document's license notice requires Cover Texts, you must enclose the
|
||||
copies in covers that carry, clearly and legibly, all these Cover
|
||||
Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
|
||||
the back cover. Both covers must also clearly and legibly identify
|
||||
you as the publisher of these copies. The front cover must present
|
||||
the full title with all words of the title equally prominent and
|
||||
visible. You may add other material on the covers in addition.
|
||||
Copying with changes limited to the covers, as long as they preserve
|
||||
the title of the Document and satisfy these conditions, can be treated
|
||||
as verbatim copying in other respects.
|
||||
|
||||
If the required texts for either cover are too voluminous to fit
|
||||
legibly, you should put the first ones listed (as many as fit
|
||||
reasonably) on the actual cover, and continue the rest onto adjacent
|
||||
pages.
|
||||
|
||||
If you publish or distribute Opaque copies of the Document numbering
|
||||
more than 100, you must either include a machine-readable Transparent
|
||||
copy along with each Opaque copy, or state in or with each Opaque copy
|
||||
a computer-network location from which the general network-using
|
||||
public has access to download using public-standard network protocols
|
||||
a complete Transparent copy of the Document, free of added material.
|
||||
If you use the latter option, you must take reasonably prudent steps,
|
||||
when you begin distribution of Opaque copies in quantity, to ensure
|
||||
that this Transparent copy will remain thus accessible at the stated
|
||||
location until at least one year after the last time you distribute an
|
||||
Opaque copy (directly or through your agents or retailers) of that
|
||||
edition to the public.
|
||||
|
||||
It is requested, but not required, that you contact the authors of the
|
||||
Document well before redistributing any large number of copies, to give
|
||||
them a chance to provide you with an updated version of the Document.
|
||||
@sp 1
|
||||
@item
|
||||
MODIFICATIONS
|
||||
|
||||
You may copy and distribute a Modified Version of the Document under
|
||||
the conditions of sections 2 and 3 above, provided that you release
|
||||
the Modified Version under precisely this License, with the Modified
|
||||
Version filling the role of the Document, thus licensing distribution
|
||||
and modification of the Modified Version to whoever possesses a copy
|
||||
of it. In addition, you must do these things in the Modified Version:
|
||||
|
||||
A. Use in the Title Page (and on the covers, if any) a title distinct
|
||||
from that of the Document, and from those of previous versions
|
||||
(which should, if there were any, be listed in the History section
|
||||
of the Document). You may use the same title as a previous version
|
||||
if the original publisher of that version gives permission.@*
|
||||
B. List on the Title Page, as authors, one or more persons or entities
|
||||
responsible for authorship of the modifications in the Modified
|
||||
Version, together with at least five of the principal authors of the
|
||||
Document (all of its principal authors, if it has fewer than five),
|
||||
unless they release you from this requirement.@*
|
||||
C. State on the Title page the name of the publisher of the
|
||||
Modified Version, as the publisher.@*
|
||||
D. Preserve all the copyright notices of the Document.@*
|
||||
E. Add an appropriate copyright notice for your modifications
|
||||
adjacent to the other copyright notices.@*
|
||||
F. Include, immediately after the copyright notices, a license notice
|
||||
giving the public permission to use the Modified Version under the
|
||||
terms of this License, in the form shown in the Addendum below.@*
|
||||
G. Preserve in that license notice the full lists of Invariant Sections
|
||||
and required Cover Texts given in the Document's license notice.@*
|
||||
H. Include an unaltered copy of this License.@*
|
||||
I. Preserve the section Entitled ``History,'' Preserve its Title, and add
|
||||
to it an item stating at least the title, year, new authors, and
|
||||
publisher of the Modified Version as given on the Title Page. If
|
||||
there is no section Entitled ``History'' in the Document, create one
|
||||
stating the title, year, authors, and publisher of the Document as
|
||||
given on its Title Page, then add an item describing the Modified
|
||||
Version as stated in the previous sentence.@*
|
||||
J. Preserve the network location, if any, given in the Document for
|
||||
public access to a Transparent copy of the Document, and likewise
|
||||
the network locations given in the Document for previous versions
|
||||
it was based on. These may be placed in the ``History'' section.
|
||||
You may omit a network location for a work that was published at
|
||||
least four years before the Document itself, or if the original
|
||||
publisher of the version it refers to gives permission.@*
|
||||
K. For any section Entitled ``Acknowledgements'' or ``Dedications,''
|
||||
Preserve the Title of the section, and preserve in the section all
|
||||
the substance and tone of each of the contributor acknowledgements
|
||||
and/or dedications given therein.@*
|
||||
L. Preserve all the Invariant Sections of the Document,
|
||||
unaltered in their text and in their titles. Section numbers
|
||||
or the equivalent are not considered part of the section titles.@*
|
||||
M. Delete any section Entitled ``Endorsements.'' Such a section
|
||||
may not be included in the Modified Version.@*
|
||||
N. Do not retitle any existing section to be Entitled ``Endorsements''
|
||||
or to conflict in title with any Invariant Section.@*
|
||||
O. Preserve any Warranty Disclaimers.@*
|
||||
@sp 1
|
||||
If the Modified Version includes new front-matter sections or
|
||||
appendices that qualify as Secondary Sections and contain no material
|
||||
copied from the Document, you may at your option designate some or all
|
||||
of these sections as invariant. To do this, add their titles to the
|
||||
list of Invariant Sections in the Modified Version's license notice.
|
||||
These titles must be distinct from any other section titles.
|
||||
|
||||
You may add a section Entitled ``Endorsements,'' provided it contains
|
||||
nothing but endorsements of your Modified Version by various
|
||||
parties--for example, statements of peer review or that the text has
|
||||
been approved by an organization as the authoritative definition of a
|
||||
standard.
|
||||
|
||||
You may add a passage of up to five words as a Front-Cover Text, and a
|
||||
passage of up to 25 words as a Back-Cover Text, to the end of the list
|
||||
of Cover Texts in the Modified Version. Only one passage of
|
||||
Front-Cover Text and one of Back-Cover Text may be added by (or
|
||||
through arrangements made by) any one entity. If the Document already
|
||||
includes a cover text for the same cover, previously added by you or
|
||||
by arrangement made by the same entity you are acting on behalf of,
|
||||
you may not add another; but you may replace the old one, on explicit
|
||||
permission from the previous publisher that added the old one.
|
||||
|
||||
The author(s) and publisher(s) of the Document do not by this License
|
||||
give permission to use their names for publicity for or to assert or
|
||||
imply endorsement of any Modified Version.
|
||||
@sp 1
|
||||
@item
|
||||
COMBINING DOCUMENTS
|
||||
|
||||
You may combine the Document with other documents released under this
|
||||
License, under the terms defined in section 4 above for modified
|
||||
versions, provided that you include in the combination all of the
|
||||
Invariant Sections of all of the original documents, unmodified, and
|
||||
list them all as Invariant Sections of your combined work in its
|
||||
license notice, and that you preserve all their Warranty Disclaimers.
|
||||
|
||||
The combined work need only contain one copy of this License, and
|
||||
multiple identical Invariant Sections may be replaced with a single
|
||||
copy. If there are multiple Invariant Sections with the same name but
|
||||
different contents, make the title of each such section unique by
|
||||
adding at the end of it, in parentheses, the name of the original
|
||||
author or publisher of that section if known, or else a unique number.
|
||||
Make the same adjustment to the section titles in the list of
|
||||
Invariant Sections in the license notice of the combined work.
|
||||
|
||||
In the combination, you must combine any sections Entitled ``History''
|
||||
in the various original documents, forming one section Entitled
|
||||
``History''; likewise combine any sections Entitled ``Acknowledgements,''
|
||||
and any sections Entitled ``Dedications.'' You must delete all sections
|
||||
Entitled ``Endorsements.''
|
||||
@sp 1
|
||||
@item
|
||||
COLLECTIONS OF DOCUMENTS
|
||||
|
||||
You may make a collection consisting of the Document and other documents
|
||||
released under this License, and replace the individual copies of this
|
||||
License in the various documents with a single copy that is included in
|
||||
the collection, provided that you follow the rules of this License for
|
||||
verbatim copying of each of the documents in all other respects.
|
||||
|
||||
You may extract a single document from such a collection, and distribute
|
||||
it individually under this License, provided you insert a copy of this
|
||||
License into the extracted document, and follow this License in all
|
||||
other respects regarding verbatim copying of that document.
|
||||
@sp 1
|
||||
@item
|
||||
AGGREGATION WITH INDEPENDENT WORKS
|
||||
|
||||
A compilation of the Document or its derivatives with other separate
|
||||
and independent documents or works, in or on a volume of a storage or
|
||||
distribution medium, is called an ``aggregate'' if the copyright
|
||||
resulting from the compilation is not used to limit the legal rights
|
||||
of the compilation's users beyond what the individual works permit.
|
||||
When the Document is included in an aggregate, this License does not
|
||||
apply to the other works in the aggregate which are not themselves
|
||||
derivative works of the Document.
|
||||
|
||||
If the Cover Text requirement of section 3 is applicable to these
|
||||
copies of the Document, then if the Document is less than one half of
|
||||
the entire aggregate, the Document's Cover Texts may be placed on
|
||||
covers that bracket the Document within the aggregate, or the
|
||||
electronic equivalent of covers if the Document is in electronic form.
|
||||
Otherwise they must appear on printed covers that bracket the whole
|
||||
aggregate.
|
||||
@sp 1
|
||||
@item
|
||||
TRANSLATION
|
||||
|
||||
Translation is considered a kind of modification, so you may
|
||||
distribute translations of the Document under the terms of section 4.
|
||||
Replacing Invariant Sections with translations requires special
|
||||
permission from their copyright holders, but you may include
|
||||
translations of some or all Invariant Sections in addition to the
|
||||
original versions of these Invariant Sections. You may include a
|
||||
translation of this License, and all the license notices in the
|
||||
Document, and any Warranty Disclaimers, provided that you also include
|
||||
the original English version of this License and the original versions
|
||||
of those notices and disclaimers. In case of a disagreement between
|
||||
the translation and the original version of this License or a notice
|
||||
or disclaimer, the original version will prevail.
|
||||
|
||||
If a section in the Document is Entitled ``Acknowledgements,''
|
||||
``Dedications,'' or ``History,'' the requirement (section 4) to Preserve
|
||||
its Title (section 1) will typically require changing the actual
|
||||
title.
|
||||
@sp 1
|
||||
@item
|
||||
TERMINATION
|
||||
|
||||
You may not copy, modify, sublicense, or distribute the Document except
|
||||
as expressly provided for under this License. Any other attempt to
|
||||
copy, modify, sublicense or distribute the Document is void, and will
|
||||
automatically terminate your rights under this License. However,
|
||||
parties who have received copies, or rights, from you under this
|
||||
License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
@sp 1
|
||||
@item
|
||||
FUTURE REVISIONS OF THIS LICENSE
|
||||
|
||||
The Free Software Foundation may publish new, revised versions
|
||||
of the GNU Free Documentation License from time to time. Such new
|
||||
versions will be similar in spirit to the present version, but may
|
||||
differ in detail to address new problems or concerns. See
|
||||
http://www.gnu.org/copyleft/.
|
||||
|
||||
Each version of the License is given a distinguishing version number.
|
||||
If the Document specifies that a particular numbered version of this
|
||||
License ``or any later version'' applies to it, you have the option of
|
||||
following the terms and conditions either of that specified version or
|
||||
of any later version that has been published (not as a draft) by the
|
||||
Free Software Foundation. If the Document does not specify a version
|
||||
number of this License, you may choose any version ever published (not
|
||||
as a draft) by the Free Software Foundation.
|
||||
|
||||
@end enumerate
|
||||
|
||||
@unnumberedsec ADDENDUM: How to use this License for your documents
|
||||
|
||||
To use this License in a document you have written, include a copy of
|
||||
the License in the document and put the following copyright and
|
||||
license notices just after the title page:
|
||||
|
||||
@smallexample
|
||||
@group
|
||||
Copyright (C) @var{year} @var{your name}.
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.2
|
||||
or any later version published by the Free Software Foundation;
|
||||
with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
|
||||
A copy of the license is included in the section entitled ``GNU
|
||||
Free Documentation License.''
|
||||
@end group
|
||||
@end smallexample
|
||||
|
||||
If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts,
|
||||
replace the ``with...Texts.'' line with this:
|
||||
|
||||
@smallexample
|
||||
@group
|
||||
with the Invariant Sections being @var{list their titles}, with the
|
||||
Front-Cover Texts being @var{list}, and with the Back-Cover Texts being
|
||||
@var{list}.
|
||||
@end group
|
||||
@end smallexample
|
||||
|
||||
If you have Invariant Sections without Cover Texts, or some other
|
||||
combination of the three, merge those two alternatives to suit the
|
||||
situation.
|
||||
|
||||
If your document contains nontrivial examples of program code, we
|
||||
recommend releasing these examples in parallel under your choice of
|
||||
free software license, such as the GNU General Public License,
|
||||
to permit their use in free software.
|
||||
|
||||
@ignore
|
||||
arch-tag: d68e7b7a-0c7c-4c15-905b-a9482214e25a
|
||||
@end ignore
|
126
doc/emacs/emacs-xtra.texi
Normal file
126
doc/emacs/emacs-xtra.texi
Normal file
|
@ -0,0 +1,126 @@
|
|||
\input texinfo @c -*-texinfo-*-
|
||||
@comment %**start of header
|
||||
@setfilename ../../info/emacs-xtra
|
||||
@settitle Specialized Emacs Features
|
||||
@syncodeindex fn cp
|
||||
@syncodeindex vr cp
|
||||
@syncodeindex ky cp
|
||||
@comment %**end of header
|
||||
|
||||
@copying
|
||||
This manual describes specialized features of Emacs.
|
||||
|
||||
Copyright @copyright{} 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
@quotation
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.2 or
|
||||
any later version published by the Free Software Foundation; with no
|
||||
Invariant Sections, with the Front-Cover texts being ``A GNU
|
||||
Manual,'' and with the Back-Cover Texts as in (a) below. A copy of the
|
||||
license is included in the section entitled ``GNU Free Documentation
|
||||
License'' in the Emacs manual.
|
||||
|
||||
(a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
|
||||
this GNU Manual, like GNU software. Copies published by the Free
|
||||
Software Foundation raise funds for GNU development.''
|
||||
|
||||
This document is part of a collection distributed under the GNU Free
|
||||
Documentation License. If you want to distribute this document
|
||||
separately from the collection, you can do so by adding a copy of the
|
||||
license to the document, as described in section 6 of the license.
|
||||
@end quotation
|
||||
@end copying
|
||||
|
||||
@dircategory Emacs
|
||||
@direntry
|
||||
* Emacs-Xtra: (emacs-xtra). Specialized Emacs features.
|
||||
@end direntry
|
||||
|
||||
@titlepage
|
||||
@title Specialized Emacs Features
|
||||
@page
|
||||
@vskip 0pt plus 1filll
|
||||
@insertcopying
|
||||
@end titlepage
|
||||
|
||||
@contents
|
||||
|
||||
@ifnottex
|
||||
@node Top
|
||||
@top Specialized Emacs Features
|
||||
|
||||
@insertcopying
|
||||
|
||||
@end ifnottex
|
||||
|
||||
@menu
|
||||
* Introduction:: What documentation belongs here?
|
||||
@iftex
|
||||
* Picture Mode:: Editing pictures made up of characters using
|
||||
the quarter-plane screen model.
|
||||
|
||||
* Autorevert:: Auto Reverting non-file buffers.
|
||||
* Subdir Switches:: Subdirectory switches in Dired.
|
||||
* Advanced Calendar/Diary Usage:: Advanced Calendar/Diary customization.
|
||||
* Emerge:: A convenient way of merging two versions of a program.
|
||||
* Advanced VC Usage:: Advanced VC (version control) features.
|
||||
* Fortran:: Fortran mode and its special features.
|
||||
* MS-DOS:: Using Emacs on MS-DOS (otherwise known as @dfn{MS-DOG}).
|
||||
@end iftex
|
||||
* Index::
|
||||
@end menu
|
||||
|
||||
@node Introduction
|
||||
@unnumbered Introduction
|
||||
|
||||
This manual contains detailed information about various features that
|
||||
are too specialized to be included in the printed Emacs manual. It is
|
||||
intended to be readable by anyone having a basic knowledge of Emacs.
|
||||
However, certain sections may be intended for a more specialized
|
||||
audience, such as Elisp authors. This should be clearly pointed out
|
||||
at the beginning of these sections.
|
||||
|
||||
Certain packages, or collections of related features, have their own
|
||||
manuals, separate from the main Emacs User's manual. This manual is
|
||||
intended as a complement, rather than an alternative, to reading those
|
||||
additional manuals; in a nutshell, it is a collection of smaller
|
||||
specialized features, too small or too obscure to justify their own
|
||||
manual.
|
||||
|
||||
Sections intended specifically for Elisp programmers can follow the
|
||||
style of the Elisp manual. Other sections should follow the style of
|
||||
the Emacs manual.
|
||||
|
||||
@iftex
|
||||
@c ``Picture Mode'' is a chapter, not a section, so it's outside @raisesections.
|
||||
@include picture-xtra.texi
|
||||
|
||||
@raisesections
|
||||
@include arevert-xtra.texi
|
||||
|
||||
@include dired-xtra.texi
|
||||
|
||||
@include cal-xtra.texi
|
||||
|
||||
@include emerge-xtra.texi
|
||||
|
||||
@include vc-xtra.texi
|
||||
|
||||
@include fortran-xtra.texi
|
||||
|
||||
@include msdog-xtra.texi
|
||||
|
||||
@lowersections
|
||||
@end iftex
|
||||
|
||||
@node Index
|
||||
@unnumbered Index
|
||||
|
||||
@printindex cp
|
||||
|
||||
@bye
|
||||
|
||||
@ignore
|
||||
arch-tag: 75c33f13-32c6-41b6-9537-847a312e2e49
|
||||
@end ignore
|
1365
doc/emacs/emacs.texi
Normal file
1365
doc/emacs/emacs.texi
Normal file
File diff suppressed because it is too large
Load diff
414
doc/emacs/emerge-xtra.texi
Normal file
414
doc/emacs/emerge-xtra.texi
Normal file
|
@ -0,0 +1,414 @@
|
|||
@c This is part of the Emacs manual.
|
||||
@c Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
@c See file emacs.texi for copying conditions.
|
||||
@c
|
||||
@c This file is included either in emacs-xtra.texi (when producing the
|
||||
@c printed version) or in the main Emacs manual (for the on-line version).
|
||||
@node Emerge
|
||||
@section Merging Files with Emerge
|
||||
@cindex Emerge
|
||||
@cindex merging files
|
||||
|
||||
It's not unusual for programmers to get their signals crossed and
|
||||
modify the same program in two different directions. To recover from
|
||||
this confusion, you need to merge the two versions. Emerge makes this
|
||||
easier. For other ways to compare files, see
|
||||
@iftex
|
||||
@ref{Comparing Files,,, emacs, the Emacs Manual},
|
||||
@end iftex
|
||||
@ifnottex
|
||||
@ref{Comparing Files},
|
||||
@end ifnottex
|
||||
and @ref{Top, Ediff,, ediff, The Ediff Manual}.
|
||||
|
||||
@menu
|
||||
* Overview of Emerge:: How to start Emerge. Basic concepts.
|
||||
* Submodes of Emerge:: Fast mode vs. Edit mode.
|
||||
Skip Prefers mode and Auto Advance mode.
|
||||
* State of Difference:: You do the merge by specifying state A or B
|
||||
for each difference.
|
||||
* Merge Commands:: Commands for selecting a difference,
|
||||
changing states of differences, etc.
|
||||
* Exiting Emerge:: What to do when you've finished the merge.
|
||||
* Combining in Emerge:: How to keep both alternatives for a difference.
|
||||
* Fine Points of Emerge:: Misc.
|
||||
@end menu
|
||||
|
||||
@node Overview of Emerge
|
||||
@subsection Overview of Emerge
|
||||
|
||||
To start Emerge, run one of these four commands:
|
||||
|
||||
@table @kbd
|
||||
@item M-x emerge-files
|
||||
@findex emerge-files
|
||||
Merge two specified files.
|
||||
|
||||
@item M-x emerge-files-with-ancestor
|
||||
@findex emerge-files-with-ancestor
|
||||
Merge two specified files, with reference to a common ancestor.
|
||||
|
||||
@item M-x emerge-buffers
|
||||
@findex emerge-buffers
|
||||
Merge two buffers.
|
||||
|
||||
@item M-x emerge-buffers-with-ancestor
|
||||
@findex emerge-buffers-with-ancestor
|
||||
Merge two buffers with reference to a common ancestor in a third
|
||||
buffer.
|
||||
@end table
|
||||
|
||||
@cindex merge buffer (Emerge)
|
||||
@cindex A and B buffers (Emerge)
|
||||
The Emerge commands compare two files or buffers, and display the
|
||||
comparison in three buffers: one for each input text (the @dfn{A buffer}
|
||||
and the @dfn{B buffer}), and one (the @dfn{merge buffer}) where merging
|
||||
takes place. The merge buffer shows the full merged text, not just the
|
||||
differences. Wherever the two input texts differ, you can choose which
|
||||
one of them to include in the merge buffer.
|
||||
|
||||
The Emerge commands that take input from existing buffers use only
|
||||
the accessible portions of those buffers, if they are narrowed.
|
||||
@iftex
|
||||
@xref{Narrowing,,, emacs, the Emacs Manual}.
|
||||
@end iftex
|
||||
@ifnottex
|
||||
@xref{Narrowing}.
|
||||
@end ifnottex
|
||||
|
||||
|
||||
If a common ancestor version is available, from which the two texts to
|
||||
be merged were both derived, Emerge can use it to guess which
|
||||
alternative is right. Wherever one current version agrees with the
|
||||
ancestor, Emerge presumes that the other current version is a deliberate
|
||||
change which should be kept in the merged version. Use the
|
||||
@samp{with-ancestor} commands if you want to specify a common ancestor
|
||||
text. These commands read three file or buffer names---variant A,
|
||||
variant B, and the common ancestor.
|
||||
|
||||
After the comparison is done and the buffers are prepared, the
|
||||
interactive merging starts. You control the merging by typing special
|
||||
@dfn{merge commands} in the merge buffer (@pxref{Merge Commands}).
|
||||
For each run of differences between the input texts, you can choose
|
||||
which one of them to keep, or edit them both together.
|
||||
|
||||
The merge buffer uses a special major mode, Emerge mode, with commands
|
||||
for making these choices. But you can also edit the buffer with
|
||||
ordinary Emacs commands.
|
||||
|
||||
At any given time, the attention of Emerge is focused on one
|
||||
particular difference, called the @dfn{selected} difference. This
|
||||
difference is marked off in the three buffers like this:
|
||||
|
||||
@example
|
||||
vvvvvvvvvvvvvvvvvvvv
|
||||
@var{text that differs}
|
||||
^^^^^^^^^^^^^^^^^^^^
|
||||
@end example
|
||||
|
||||
@noindent
|
||||
Emerge numbers all the differences sequentially and the mode
|
||||
line always shows the number of the selected difference.
|
||||
|
||||
Normally, the merge buffer starts out with the A version of the text.
|
||||
But when the A version of a difference agrees with the common ancestor,
|
||||
then the B version is initially preferred for that difference.
|
||||
|
||||
Emerge leaves the merged text in the merge buffer when you exit. At
|
||||
that point, you can save it in a file with @kbd{C-x C-w}. If you give a
|
||||
numeric argument to @code{emerge-files} or
|
||||
@code{emerge-files-with-ancestor}, it reads the name of the output file
|
||||
using the minibuffer. (This is the last file name those commands read.)
|
||||
Then exiting from Emerge saves the merged text in the output file.
|
||||
|
||||
Normally, Emerge commands save the output buffer in its file when you
|
||||
exit. If you abort Emerge with @kbd{C-]}, the Emerge command does not
|
||||
save the output buffer, but you can save it yourself if you wish.
|
||||
|
||||
@node Submodes of Emerge
|
||||
@subsection Submodes of Emerge
|
||||
|
||||
You can choose between two modes for giving merge commands: Fast mode
|
||||
and Edit mode. In Fast mode, basic merge commands are single
|
||||
characters, but ordinary Emacs commands are disabled. This is
|
||||
convenient if you use only merge commands. In Edit mode, all merge
|
||||
commands start with the prefix key @kbd{C-c C-c}, and the normal Emacs
|
||||
commands are also available. This allows editing the merge buffer, but
|
||||
slows down Emerge operations.
|
||||
|
||||
Use @kbd{e} to switch to Edit mode, and @kbd{C-c C-c f} to switch to
|
||||
Fast mode. The mode line indicates Edit and Fast modes with @samp{E}
|
||||
and @samp{F}.
|
||||
|
||||
Emerge has two additional submodes that affect how particular merge
|
||||
commands work: Auto Advance mode and Skip Prefers mode.
|
||||
|
||||
If Auto Advance mode is in effect, the @kbd{a} and @kbd{b} commands
|
||||
advance to the next difference. This lets you go through the merge
|
||||
faster as long as you simply choose one of the alternatives from the
|
||||
input. The mode line indicates Auto Advance mode with @samp{A}.
|
||||
|
||||
If Skip Prefers mode is in effect, the @kbd{n} and @kbd{p} commands
|
||||
skip over differences in states prefer-A and prefer-B (@pxref{State of
|
||||
Difference}). Thus you see only differences for which neither version
|
||||
is presumed ``correct.'' The mode line indicates Skip Prefers mode with
|
||||
@samp{S}.
|
||||
|
||||
@findex emerge-auto-advance-mode
|
||||
@findex emerge-skip-prefers-mode
|
||||
Use the command @kbd{s a} (@code{emerge-auto-advance-mode}) to set or
|
||||
clear Auto Advance mode. Use @kbd{s s}
|
||||
(@code{emerge-skip-prefers-mode}) to set or clear Skip Prefers mode.
|
||||
These commands turn on the mode with a positive argument, turns it off
|
||||
with a negative or zero argument, and toggle the mode with no argument.
|
||||
|
||||
@node State of Difference
|
||||
@subsection State of a Difference
|
||||
|
||||
In the merge buffer, a difference is marked with lines of @samp{v} and
|
||||
@samp{^} characters. Each difference has one of these seven states:
|
||||
|
||||
@table @asis
|
||||
@item A
|
||||
The difference is showing the A version. The @kbd{a} command always
|
||||
produces this state; the mode line indicates it with @samp{A}.
|
||||
|
||||
@item B
|
||||
The difference is showing the B version. The @kbd{b} command always
|
||||
produces this state; the mode line indicates it with @samp{B}.
|
||||
|
||||
@item default-A
|
||||
@itemx default-B
|
||||
The difference is showing the A or the B state by default, because you
|
||||
haven't made a choice. All differences start in the default-A state
|
||||
(and thus the merge buffer is a copy of the A buffer), except those for
|
||||
which one alternative is ``preferred'' (see below).
|
||||
|
||||
When you select a difference, its state changes from default-A or
|
||||
default-B to plain A or B. Thus, the selected difference never has
|
||||
state default-A or default-B, and these states are never displayed in
|
||||
the mode line.
|
||||
|
||||
The command @kbd{d a} chooses default-A as the default state, and @kbd{d
|
||||
b} chooses default-B. This chosen default applies to all differences
|
||||
which you haven't ever selected and for which no alternative is preferred.
|
||||
If you are moving through the merge sequentially, the differences you
|
||||
haven't selected are those following the selected one. Thus, while
|
||||
moving sequentially, you can effectively make the A version the default
|
||||
for some sections of the merge buffer and the B version the default for
|
||||
others by using @kbd{d a} and @kbd{d b} between sections.
|
||||
|
||||
@item prefer-A
|
||||
@itemx prefer-B
|
||||
The difference is showing the A or B state because it is
|
||||
@dfn{preferred}. This means that you haven't made an explicit choice,
|
||||
but one alternative seems likely to be right because the other
|
||||
alternative agrees with the common ancestor. Thus, where the A buffer
|
||||
agrees with the common ancestor, the B version is preferred, because
|
||||
chances are it is the one that was actually changed.
|
||||
|
||||
These two states are displayed in the mode line as @samp{A*} and @samp{B*}.
|
||||
|
||||
@item combined
|
||||
The difference is showing a combination of the A and B states, as a
|
||||
result of the @kbd{x c} or @kbd{x C} commands.
|
||||
|
||||
Once a difference is in this state, the @kbd{a} and @kbd{b} commands
|
||||
don't do anything to it unless you give them a numeric argument.
|
||||
|
||||
The mode line displays this state as @samp{comb}.
|
||||
@end table
|
||||
|
||||
@node Merge Commands
|
||||
@subsection Merge Commands
|
||||
|
||||
Here are the Merge commands for Fast mode; in Edit mode, precede them
|
||||
with @kbd{C-c C-c}:
|
||||
|
||||
@table @kbd
|
||||
@item p
|
||||
Select the previous difference.
|
||||
|
||||
@item n
|
||||
Select the next difference.
|
||||
|
||||
@item a
|
||||
Choose the A version of this difference.
|
||||
|
||||
@item b
|
||||
Choose the B version of this difference.
|
||||
|
||||
@item C-u @var{n} j
|
||||
Select difference number @var{n}.
|
||||
|
||||
@item .
|
||||
Select the difference containing point. You can use this command in the
|
||||
merge buffer or in the A or B buffer.
|
||||
|
||||
@item q
|
||||
Quit---finish the merge.
|
||||
|
||||
@item C-]
|
||||
Abort---exit merging and do not save the output.
|
||||
|
||||
@item f
|
||||
Go into Fast mode. (In Edit mode, this is actually @kbd{C-c C-c f}.)
|
||||
|
||||
@item e
|
||||
Go into Edit mode.
|
||||
|
||||
@item l
|
||||
Recenter (like @kbd{C-l}) all three windows.
|
||||
|
||||
@item -
|
||||
Specify part of a prefix numeric argument.
|
||||
|
||||
@item @var{digit}
|
||||
Also specify part of a prefix numeric argument.
|
||||
|
||||
@item d a
|
||||
Choose the A version as the default from here down in
|
||||
the merge buffer.
|
||||
|
||||
@item d b
|
||||
Choose the B version as the default from here down in
|
||||
the merge buffer.
|
||||
|
||||
@item c a
|
||||
Copy the A version of this difference into the kill ring.
|
||||
|
||||
@item c b
|
||||
Copy the B version of this difference into the kill ring.
|
||||
|
||||
@item i a
|
||||
Insert the A version of this difference at point.
|
||||
|
||||
@item i b
|
||||
Insert the B version of this difference at point.
|
||||
|
||||
@item m
|
||||
Put point and mark around the difference.
|
||||
|
||||
@item ^
|
||||
Scroll all three windows down (like @kbd{M-v}).
|
||||
|
||||
@item v
|
||||
Scroll all three windows up (like @kbd{C-v}).
|
||||
|
||||
@item <
|
||||
Scroll all three windows left (like @kbd{C-x <}).
|
||||
|
||||
@item >
|
||||
Scroll all three windows right (like @kbd{C-x >}).
|
||||
|
||||
@item |
|
||||
Reset horizontal scroll on all three windows.
|
||||
|
||||
@item x 1
|
||||
Shrink the merge window to one line. (Use @kbd{C-u l} to restore it
|
||||
to full size.)
|
||||
|
||||
@item x c
|
||||
Combine the two versions of this difference (@pxref{Combining in
|
||||
Emerge}).
|
||||
|
||||
@item x f
|
||||
Show the names of the files/buffers Emerge is operating on, in a Help
|
||||
window. (Use @kbd{C-u l} to restore windows.)
|
||||
|
||||
@item x j
|
||||
Join this difference with the following one.
|
||||
(@kbd{C-u x j} joins this difference with the previous one.)
|
||||
|
||||
@item x s
|
||||
Split this difference into two differences. Before you use this
|
||||
command, position point in each of the three buffers at the place where
|
||||
you want to split the difference.
|
||||
|
||||
@item x t
|
||||
Trim identical lines off the top and bottom of the difference.
|
||||
Such lines occur when the A and B versions are
|
||||
identical but differ from the ancestor version.
|
||||
@end table
|
||||
|
||||
@node Exiting Emerge
|
||||
@subsection Exiting Emerge
|
||||
|
||||
The @kbd{q} command (@code{emerge-quit}) finishes the merge, storing
|
||||
the results into the output file if you specified one. It restores the
|
||||
A and B buffers to their proper contents, or kills them if they were
|
||||
created by Emerge and you haven't changed them. It also disables the
|
||||
Emerge commands in the merge buffer, since executing them later could
|
||||
damage the contents of the various buffers.
|
||||
|
||||
@kbd{C-]} aborts the merge. This means exiting without writing the
|
||||
output file. If you didn't specify an output file, then there is no
|
||||
real difference between aborting and finishing the merge.
|
||||
|
||||
If the Emerge command was called from another Lisp program, then its
|
||||
return value is @code{t} for successful completion, or @code{nil} if you
|
||||
abort.
|
||||
|
||||
@node Combining in Emerge
|
||||
@subsection Combining the Two Versions
|
||||
|
||||
Sometimes you want to keep @emph{both} alternatives for a particular
|
||||
difference. To do this, use @kbd{x c}, which edits the merge buffer
|
||||
like this:
|
||||
|
||||
@example
|
||||
@group
|
||||
#ifdef NEW
|
||||
@var{version from A buffer}
|
||||
#else /* not NEW */
|
||||
@var{version from B buffer}
|
||||
#endif /* not NEW */
|
||||
@end group
|
||||
@end example
|
||||
|
||||
@noindent
|
||||
@vindex emerge-combine-versions-template
|
||||
While this example shows C preprocessor conditionals delimiting the two
|
||||
alternative versions, you can specify the strings to use by setting
|
||||
the variable @code{emerge-combine-versions-template} to a string of your
|
||||
choice. In the string, @samp{%a} says where to put version A, and
|
||||
@samp{%b} says where to put version B. The default setting, which
|
||||
produces the results shown above, looks like this:
|
||||
|
||||
@example
|
||||
@group
|
||||
"#ifdef NEW\n%a#else /* not NEW */\n%b#endif /* not NEW */\n"
|
||||
@end group
|
||||
@end example
|
||||
|
||||
@node Fine Points of Emerge
|
||||
@subsection Fine Points of Emerge
|
||||
|
||||
During the merge, you mustn't try to edit the A and B buffers yourself.
|
||||
Emerge modifies them temporarily, but ultimately puts them back the way
|
||||
they were.
|
||||
|
||||
You can have any number of merges going at once---just don't use any one
|
||||
buffer as input to more than one merge at once, since the temporary
|
||||
changes made in these buffers would get in each other's way.
|
||||
|
||||
Starting Emerge can take a long time because it needs to compare the
|
||||
files fully. Emacs can't do anything else until @code{diff} finishes.
|
||||
Perhaps in the future someone will change Emerge to do the comparison in
|
||||
the background when the input files are large---then you could keep on
|
||||
doing other things with Emacs until Emerge is ready to accept
|
||||
commands.
|
||||
|
||||
@vindex emerge-startup-hook
|
||||
After setting up the merge, Emerge runs the hook
|
||||
@code{emerge-startup-hook}.
|
||||
@iftex
|
||||
@xref{Hooks,,, emacs, the Emacs Manual}.
|
||||
@end iftex
|
||||
@ifnottex
|
||||
@xref{Hooks}.
|
||||
@end ifnottex
|
||||
|
||||
@ignore
|
||||
arch-tag: cda63f09-9c5f-4ea1-adb9-4a820fdfb24e
|
||||
@end ignore
|
|
@ -1248,9 +1248,12 @@ customizable variable @code{vc-handled-backends} to @code{nil}
|
|||
@subsection Introduction to Version Control
|
||||
|
||||
VC allows you to use a version control system from within Emacs,
|
||||
integrating the version control operations smoothly with editing. VC
|
||||
provides a uniform interface to version control, so that regardless of
|
||||
which version control system is in use, you can use it the same way.
|
||||
integrating the version control operations smoothly with editing.
|
||||
Though VC cannot completely bridge the gaps between version-control
|
||||
systems with widely differing capabilities, it does provide
|
||||
a uniform interface to many version control operations. Regardless of
|
||||
which version control system is in use, you will be able to do basic
|
||||
operations in much the same way.
|
||||
|
||||
This section provides a general overview of version control, and
|
||||
describes the version control systems that VC supports. You can skip
|
||||
|
@ -1268,7 +1271,7 @@ you want to use.
|
|||
@subsubsection Understanding the problems it addresses
|
||||
|
||||
Version control systems provide you with three important capabilities:
|
||||
reversibility, concurrency, and history.
|
||||
@dfn{reversibility}. @dfn{concurrency}, and @dfn{history}.
|
||||
|
||||
The most basic capability you get from a version-control system is
|
||||
reversibility, the ability to back up to a saved, known-good state when
|
||||
|
@ -1289,18 +1292,54 @@ become a vitally important form of communication among developers.
|
|||
|
||||
@cindex back end (version control)
|
||||
VC currently works with six different version control systems or
|
||||
``back ends'': CVS, GNU Arch, RCS, Meta-CVS, Subversion, and SCCS.
|
||||
``back ends'': SCCS, RCS, CVS, Meta-CVS, Subversion, GNU Arch,
|
||||
git, and Mercurial.
|
||||
@comment Omitting bzr because support is very scratchy and incomplete.
|
||||
|
||||
@cindex SCCS
|
||||
SCCS was the first version-control system ever built, and was long ago
|
||||
superseded by later and more advanced ones; Emacs supports it only for
|
||||
backward compatibility and historical reasons. VC compensates for
|
||||
certain features missing in SCCS (snapshots, for example) by
|
||||
implementing them itself, but some other VC features, such as multiple
|
||||
branches, are not available with SCCS. Since SCCS is non-free you
|
||||
should not use it; use its free replacement CSSC instead. But you
|
||||
should use CSSC only if for some reason you cannot use a more
|
||||
recent and better-designed version-control system.
|
||||
|
||||
@cindex RCS
|
||||
RCS is the free version control system around which VC was initially
|
||||
built. Almost everything you can do with RCS can be done through VC. You
|
||||
cannot use RCS over the network, though, and it only works at the level
|
||||
of individual files, rather than projects. You should use it if you
|
||||
want a simple, yet reliable tool for handling individual files.
|
||||
|
||||
@cindex CVS
|
||||
CVS is a free version control system that is used for the majority
|
||||
of free software projects today. It allows concurrent multi-user
|
||||
development either locally or over the network. Some of its
|
||||
shortcomings, corrected by newer systems such as GNU Arch, are that it
|
||||
lacks atomic commits or support for renaming files. VC supports all
|
||||
basic editing operations under CVS, but for some less common tasks you
|
||||
still need to call CVS from the command line. Note also that before
|
||||
using CVS you must set up a repository, which is a subject too complex
|
||||
to treat here.
|
||||
CVS is the free version control system that was until recently (as of
|
||||
2007) used for the majority of free software projects, though it is now
|
||||
being superseded by other systems. It allows concurrent
|
||||
multi-user development either locally or over the network. Some of its
|
||||
shortcomings, corrected by newer systems such as Subversion or GNU Arch,
|
||||
are that it lacks atomic commits or support for renaming files. VC
|
||||
supports all basic editing operations under CVS, but for some less
|
||||
common tasks you still need to call CVS from the command line. Note
|
||||
also that before using CVS you must set up a repository, which is a
|
||||
subject too complex to treat here.
|
||||
|
||||
@cindex Meta-CVS
|
||||
Meta-CVS uses CVS repositories, but has an enhanced client that
|
||||
uses client-side information to solve various of the known problems
|
||||
with CVS. It is not widely used, having been overtaken by Subversion.
|
||||
The Emacs support for it is rudimentary, and may be removed in a
|
||||
future version.
|
||||
|
||||
@cindex SVN
|
||||
@cindex Subversion
|
||||
Subversion is a free version control system designed to be similar
|
||||
to CVS but without CVS's problems, and is now (2007) rapidly
|
||||
superseding CVS. Subversion supports atomic commits of filesets, and
|
||||
versions directories, symbolic links, meta-data, renames, copies, and
|
||||
deletes. It can be used via http or via its own protocol.
|
||||
|
||||
@cindex GNU Arch
|
||||
@cindex Arch
|
||||
|
@ -1308,69 +1347,51 @@ to treat here.
|
|||
distributed work. It differs in many ways from old well-known
|
||||
systems, such as CVS and RCS. It supports different transports for
|
||||
interoperating between users, offline operations, and it has good
|
||||
branching and merging features. It also supports atomic commits, and
|
||||
history of file renaming and moving. VC does not support all
|
||||
operations provided by GNU Arch, so you must sometimes invoke it from
|
||||
the command line, or use a specialized module.
|
||||
branching and merging features. It also supports atomic commits of
|
||||
fileset changes, and keeps a history of file renaming and moving. VC
|
||||
does not support all operations provided by GNU Arch, so you must
|
||||
sometimes invoke it from the command line, or use a specialized
|
||||
module.
|
||||
|
||||
@cindex RCS
|
||||
RCS is the free version control system around which VC was initially
|
||||
built. The VC commands are therefore conceptually closest to RCS.
|
||||
Almost everything you can do with RCS can be done through VC. You
|
||||
cannot use RCS over the network though, and it only works at the level
|
||||
of individual files, rather than projects. You should use it if you
|
||||
want a simple, yet reliable tool for handling individual files.
|
||||
@cindex git
|
||||
git is a version-control system invented by Linus Torvalds to
|
||||
support Linux kernel development. Like GNU Arch, it supports atomic
|
||||
commits of fileset changes, and keeps a history of file renaming and
|
||||
moving. One significant feature of git is that it largely abolishes
|
||||
the notion of a single centralized repository; instead, each working
|
||||
copy of a git project is its own repository and coordination is done
|
||||
through repository-sync operations. VC fully supports git, except
|
||||
that it doesn't do news merges and repository sync operations must
|
||||
be done from the command line.
|
||||
|
||||
@cindex SVN
|
||||
@cindex Subversion
|
||||
Subversion is a free version control system designed to be similar
|
||||
to CVS but without CVS's problems. Subversion supports atomic commits,
|
||||
and versions directories, symbolic links, meta-data, renames, copies,
|
||||
and deletes. It can be used via http or via its own protocol.
|
||||
|
||||
@cindex MCVS
|
||||
@cindex Meta-CVS
|
||||
Meta-CVS is another attempt to solve problems arising in CVS. It
|
||||
supports directory structure versioning, improved branching and
|
||||
merging, and use of symbolic links and meta-data in repositories.
|
||||
|
||||
@cindex SCCS
|
||||
SCCS is a proprietary but widely used version control system. In
|
||||
terms of capabilities, it is the weakest of the six that VC supports.
|
||||
VC compensates for certain features missing in SCCS (snapshots, for
|
||||
example) by implementing them itself, but some other VC features, such
|
||||
as multiple branches, are not available with SCCS. Since SCCS is
|
||||
non-free, not respecting its users freedom, you should not use it;
|
||||
use its free replacement CSSC instead. But you should use CSSC only
|
||||
if for some reason you cannot use RCS, or one of the higher-level
|
||||
systems such as CVS or GNU Arch.
|
||||
|
||||
In the following, we discuss mainly RCS, SCCS and CVS. Nearly
|
||||
everything said about CVS applies to GNU Arch, Subversion and Meta-CVS
|
||||
as well.
|
||||
@cindex hg
|
||||
@cindex Mercurial
|
||||
Mercurial is a distributed version-control systems broadly
|
||||
resembling GNU Arch and git, with atomic fileset commits and
|
||||
rename/move histories. Like git it is fully decventralized.
|
||||
VC fully supports Mercurial, except for repository sync operations
|
||||
which still need to be done from the command line.
|
||||
|
||||
@node VC Concepts
|
||||
@subsubsection Concepts of Version Control
|
||||
|
||||
@cindex master file
|
||||
@cindex repository
|
||||
@cindex registered file
|
||||
When a file is under version control, we also say that it is
|
||||
@dfn{registered} in the version control system. Each registered file
|
||||
has a corresponding @dfn{master file} which represents the file's
|
||||
present state plus its change history---enough to reconstruct the
|
||||
current version or any earlier version. Usually the master file also
|
||||
records a @dfn{log entry} for each version, describing in words what was
|
||||
changed in that version.
|
||||
@dfn{registered} in the version control system. The system has a
|
||||
@dfn{repository} which stores both the file's present state plus its
|
||||
change history---enough to reconstruct the current version or any
|
||||
earlier version. The repository will also contain a @dfn{log entry} for
|
||||
each change to the file, describing in words what was modified in that
|
||||
revision.
|
||||
|
||||
@cindex work file
|
||||
@cindex checking out files
|
||||
The file that is maintained under version control is sometimes called
|
||||
the @dfn{work file} corresponding to its master file. You edit the work
|
||||
file and make changes in it, as you would with an ordinary file. (With
|
||||
SCCS and RCS, you must @dfn{lock} the file before you start to edit it.)
|
||||
After you are done with a set of changes, you @dfn{check the file in},
|
||||
which records the changes in the master file, along with a log entry for
|
||||
them.
|
||||
A file checked out of a version-control repository is sometimes called
|
||||
the @dfn{work file}. You edit the work file and make changes in it, as
|
||||
you would with an ordinary file. After you are done with a set of
|
||||
changes, you @dfn{check the file in}, which records the changes in the
|
||||
repository, along with a log entry for them.
|
||||
|
||||
To go beyond these basic concepts, you will need to understand three
|
||||
ways in which version-control systems can differ from each other. They
|
||||
|
@ -1427,7 +1448,7 @@ both locking and merging version control and tries to hide the differences
|
|||
between them as much as possible.
|
||||
|
||||
@cindex files versus changesets.
|
||||
On SCCS, RCS, CVS, and other early version-control systems, checkins
|
||||
On SCCS. RCS, CVS, and other early version-control systems, checkins
|
||||
and other operations are @dfn{file-based}; each file has its own
|
||||
@dfn{master file} with its own comment- and revision history separate
|
||||
from that of all other files in the system. Later systems, beginning
|
||||
|
@ -1439,14 +1460,18 @@ one file, but is attached to the changeset itself.
|
|||
Changeset-based version control is in general both more flexible and
|
||||
more powerful than file-based version control; usually, when a change to
|
||||
multiple files has to be backed out, it's good to be able to easily
|
||||
identify and remove all of it.
|
||||
identify and remove all of it. But it took some years for designers to
|
||||
figure that out, and while file-based systems are passing out of use
|
||||
there are lots of legacy repositories still to be dealt with at time of
|
||||
writing in 2007.
|
||||
|
||||
@cindex centralized vs. decentralized
|
||||
|
||||
Early version-control systems were designed around a @dfn{centralized}
|
||||
model in which each project has only one repository used by all
|
||||
developers. SCCS, RCS, CVS, and Subversion share this kind of model.
|
||||
It has two important problems. One is that a single repository is a
|
||||
single point of failure---if the repository server is down all work
|
||||
single point of failure--if the repository server is down all work
|
||||
stops. The other is that you need to be connected live to the server to
|
||||
do checkins and checkouts; if you're offline, you can't work.
|
||||
|
||||
|
@ -1478,7 +1503,7 @@ version-control system is invisible to VC mode.
|
|||
@cindex version control log
|
||||
|
||||
Projects that use a revision control system can have @emph{two}
|
||||
types of log for changes. One is the per-file log maintained by the
|
||||
types of log for changes. One is the log maintained by the
|
||||
revision control system: each time you check in a change, you must
|
||||
fill out a @dfn{log entry} for the change (@pxref{Log Buffer}). This
|
||||
kind of log is called the @dfn{version control log}, also the
|
||||
|
@ -1491,10 +1516,22 @@ A small program would use one @file{ChangeLog} file; a large program
|
|||
may well merit a @file{ChangeLog} file in each major directory.
|
||||
@xref{Change Log}.
|
||||
|
||||
A project maintained with version control can use just the per-file
|
||||
log, or it can use both kinds of logs. It can handle some files one
|
||||
way and some files the other way. Each project has its policy, which
|
||||
you should follow.
|
||||
Actually, the fact that both kinds of log exist is partly a legacy from
|
||||
file-based version control. Changelogs are a GNU convention, later
|
||||
more widely adopted, that help developers to get a changeset-based
|
||||
view of a project even when its version-control system has that
|
||||
information split up in multiple file-based logs.
|
||||
|
||||
Changeset-based version systems, on the other hand, often maintain
|
||||
a changeset-based modification log for the entire system that makes
|
||||
ChangeLogs mostly redundant. The only advantage ChangeLogs retain is that
|
||||
it may be useful to be able to view the transaction history of a
|
||||
single directory separately from those of other directories.
|
||||
|
||||
A project maintained with version control can use just the
|
||||
version-control log, or it can use both kinds of logs. It can
|
||||
handle some files one way and some files the other way. Each project
|
||||
has its policy, which you should follow.
|
||||
|
||||
When the policy is to use both, you typically want to write an entry
|
||||
for each change just once, then put it into both logs. You can write
|
||||
|
@ -1509,7 +1546,6 @@ to copy it to @file{ChangeLog}
|
|||
(@pxref{Change Logs and VC}).
|
||||
@end ifnottex
|
||||
|
||||
|
||||
@node VC Mode Line
|
||||
@subsection Version Control and the Mode Line
|
||||
|
||||
|
@ -1550,8 +1586,10 @@ Perform the next logical version control operation on this file.
|
|||
@findex vc-next-action
|
||||
@kindex C-x v v
|
||||
The precise action of this command depends on the state of the file,
|
||||
and whether the version control system uses locking or not. SCCS and
|
||||
RCS normally use locking; CVS normally does not use locking.
|
||||
and whether the version control system uses locking or merging. SCCS and
|
||||
RCS normally use locking; CVS and Subversion normally use
|
||||
merging but can be configured to do locking. Later systems such as
|
||||
GNU Arch and Mercurial always use merging.
|
||||
|
||||
@findex vc-toggle-read-only
|
||||
@kindex C-x C-q @r{(Version Control)}
|
||||
|
@ -1603,25 +1641,27 @@ that there is no such thing as stealing a lock.
|
|||
@node Without Locking
|
||||
@subsubsection Basic Version Control without Locking
|
||||
|
||||
When there is no locking---the default for CVS---work files are always
|
||||
writable; you do not need to do anything before you begin to edit a
|
||||
file. The status indicator on the mode line is @samp{-} if the file is
|
||||
unmodified; it flips to @samp{:} as soon as you save any changes in the
|
||||
work file.
|
||||
When your version-control system is merging-based rather than
|
||||
locking-based---the default for CVS and Subversion, and the way GNU
|
||||
Arch always works---work files are always writable; you do not need to
|
||||
do anything before you begin to edit a file. The status indicator on
|
||||
the mode line is @samp{-} if the file is unmodified; it flips to
|
||||
@samp{:} as soon as you save any changes in the work file.
|
||||
|
||||
Here is what @kbd{C-x v v} does when using CVS:
|
||||
Here is what @kbd{C-x v v} does when using a merging-based system
|
||||
(such as CVS or Subversion in their defaiult merging mode):
|
||||
|
||||
@itemize @bullet
|
||||
@item
|
||||
If some other user has checked in changes into the master file, Emacs
|
||||
If some other user has checked in changes into the repository, Emacs
|
||||
asks you whether you want to merge those changes into your own work
|
||||
file. You must do this before you can check in your own changes. (To
|
||||
pick up any recent changes from the master file @emph{without} trying
|
||||
pick up any recent changes from the repository @emph{without} trying
|
||||
to commit your own changes, type @kbd{C-x v m @key{RET}}.)
|
||||
@xref{Merging}.
|
||||
|
||||
@item
|
||||
If there are no new changes in the master file, but you have made
|
||||
If there are no new changes in the repository, but you have made
|
||||
modifications in your work file, @kbd{C-x v v} checks in your changes.
|
||||
In order to do this, it first reads the log entry for the new version.
|
||||
@xref{Log Buffer}.
|
||||
|
@ -1632,19 +1672,21 @@ If the file is not modified, the @kbd{C-x v v} does nothing.
|
|||
|
||||
These rules also apply when you use RCS in the mode that does not
|
||||
require locking, except that automatic merging of changes from the
|
||||
master file is not implemented. Unfortunately, this means that nothing
|
||||
repository is not implemented. Unfortunately, this means that nothing
|
||||
informs you if another user has checked in changes in the same file
|
||||
since you began editing it, and when this happens, his changes will be
|
||||
effectively removed when you check in your version (though they will
|
||||
remain in the master file, so they will not be entirely lost). You must
|
||||
remain in the repository, so they will not be entirely lost). You must
|
||||
therefore verify that the current version is unchanged, before you
|
||||
check in your changes. We hope to eliminate this risk and provide
|
||||
automatic merging with RCS in a future Emacs version.
|
||||
check in your changes.
|
||||
|
||||
In addition, locking is possible with RCS even in this mode, although
|
||||
it is not required; @kbd{C-x v v} with an unmodified file locks the
|
||||
file, just as it does with RCS in its normal (locking) mode.
|
||||
|
||||
Later systems like CVS, Subversion and Arch will notice conflicting
|
||||
changes in the repository automatically and notify you when they occur.
|
||||
|
||||
@node Advanced C-x v v
|
||||
@subsubsection Advanced Control in @kbd{C-x v v}
|
||||
|
||||
|
@ -1714,7 +1756,7 @@ the revision control log.
|
|||
In the @samp{*VC-Log*} buffer, @kbd{C-c C-f} (@kbd{M-x
|
||||
log-edit-show-files}) shows the list of files to be committed in case
|
||||
you need to check that. (This can be a list of more than one file if
|
||||
you use VC Dired mode or PCL-CVS.
|
||||
you use VC Dired mode or PCL-CVS.)
|
||||
@iftex
|
||||
@xref{VC Dired Mode,,,emacs-xtra, Specialized Emacs Features},
|
||||
@end iftex
|
||||
|
@ -1740,8 +1782,15 @@ this, use the history of previous log entries. The commands @kbd{M-n},
|
|||
minibuffer history commands (except that these versions are used outside
|
||||
the minibuffer).
|
||||
|
||||
However, you can also browse the history of previous log entries to
|
||||
duplicate a checkin comment. This can be useful when you want several
|
||||
files to have checkin comments that vary only slightly from each
|
||||
other. The commands @kbd{M-n}, @kbd{M-p}, @kbd{M-s} and @kbd{M-r} for
|
||||
doing this work just like the minibuffer history commands (except that
|
||||
these versions are used outside the minibuffer).
|
||||
|
||||
@vindex vc-log-mode-hook
|
||||
Each time you check in a file, the log entry buffer is put into VC Log
|
||||
Each time you check in a change, the log entry buffer is put into VC Log
|
||||
mode, which involves running two hooks: @code{text-mode-hook} and
|
||||
@code{vc-log-mode-hook}. @xref{Hooks}.
|
||||
|
||||
|
@ -1757,7 +1806,7 @@ Examine version @var{version} of the visited file, in a buffer of its
|
|||
own.
|
||||
|
||||
@item C-x v =
|
||||
Compare the current buffer contents with the master version from which
|
||||
Compare the current buffer contents with the focus version from which
|
||||
you started editing.
|
||||
|
||||
@item C-u C-x v = @var{file} @key{RET} @var{oldvers} @key{RET} @var{newvers} @key{RET}
|
||||
|
@ -1870,7 +1919,7 @@ the author's description of the changes in the revision on the current
|
|||
line.
|
||||
|
||||
@item W
|
||||
Annotate the workfile version--the one you are editing. If you used
|
||||
Annotate the focus version--the one you are editing. If you used
|
||||
@kbd{P} and @kbd{N} to browse to other revisions, use this key to
|
||||
return to your current version.
|
||||
@end table
|
||||
|
@ -2116,10 +2165,10 @@ example above have branch numbers 1.2.1 and 1.2.2.
|
|||
@subsubsection Switching between Branches
|
||||
|
||||
To switch between branches, type @kbd{C-u C-x v v} and specify the
|
||||
version number you want to select. This version is then visited
|
||||
@emph{unlocked} (write-protected), so you can examine it before locking
|
||||
it. Switching branches in this way is allowed only when the file is not
|
||||
locked.
|
||||
version number you want to select. On a locking-based system, this
|
||||
version is then visited @emph{unlocked} (write-protected), so you can
|
||||
examine it before locking it. Switching branches in this way is allowed
|
||||
only when the file is not locked.
|
||||
|
||||
You can omit the minor version number, thus giving only the branch
|
||||
number; this takes you to the head version on the chosen branch. If you
|
||||
|
@ -2144,10 +2193,14 @@ that point.
|
|||
|
||||
To create a new branch at an older version (one that is no longer the
|
||||
head of a branch), first select that version (@pxref{Switching
|
||||
Branches}), then lock it with @kbd{C-x v v}. You'll be asked to
|
||||
confirm, when you lock the old version, that you really mean to create a
|
||||
new branch---if you say no, you'll be offered a chance to lock the
|
||||
latest version instead.
|
||||
Branches}). Your procedure will then differ depending on whether you
|
||||
are using a locking or merging-based VCS.
|
||||
|
||||
On a locking VCS, you will need to lock the old version branch with
|
||||
@kbd{C-x v v}. You'll be asked to confirm, when you lock the old
|
||||
version, that you really mean to create a new branch---if you say no,
|
||||
you'll be offered a chance to lock the latest version instead. On
|
||||
a merging-based VCS you will skip this step.
|
||||
|
||||
Then make your changes and type @kbd{C-x v v} again to check in a new
|
||||
version. This automatically creates a new branch starting from the
|
548
doc/emacs/fortran-xtra.texi
Normal file
548
doc/emacs/fortran-xtra.texi
Normal file
|
@ -0,0 +1,548 @@
|
|||
@c This is part of the Emacs manual.
|
||||
@c Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
@c See file emacs.texi for copying conditions.
|
||||
@c
|
||||
@c This file is included either in emacs-xtra.texi (when producing the
|
||||
@c printed version) or in the main Emacs manual (for the on-line version).
|
||||
@node Fortran
|
||||
@section Fortran Mode
|
||||
@cindex Fortran mode
|
||||
@cindex mode, Fortran
|
||||
|
||||
Fortran mode provides special motion commands for Fortran statements
|
||||
and subprograms, and indentation commands that understand Fortran
|
||||
conventions of nesting, line numbers and continuation statements.
|
||||
Fortran mode has support for Auto Fill mode that breaks long lines into
|
||||
proper Fortran continuation lines.
|
||||
|
||||
Special commands for comments are provided because Fortran comments
|
||||
are unlike those of other languages. Built-in abbrevs optionally save
|
||||
typing when you insert Fortran keywords.
|
||||
|
||||
Use @kbd{M-x fortran-mode} to switch to this major mode. This
|
||||
command runs the hook @code{fortran-mode-hook}.
|
||||
@iftex
|
||||
@xref{Hooks,,, emacs, the Emacs Manual}.
|
||||
@end iftex
|
||||
@ifnottex
|
||||
@xref{Hooks}.
|
||||
@end ifnottex
|
||||
|
||||
@cindex Fortran77 and Fortran90
|
||||
@findex f90-mode
|
||||
@findex fortran-mode
|
||||
Fortran mode is meant for editing Fortran77 ``fixed format'' (and also
|
||||
``tab format'') source code. For editing the modern Fortran90 or
|
||||
Fortran95 ``free format'' source code, use F90 mode (@code{f90-mode}).
|
||||
Emacs normally uses Fortran mode for files with extension @samp{.f},
|
||||
@samp{.F} or @samp{.for}, and F90 mode for the extension @samp{.f90} and
|
||||
@samp{.f95}. GNU Fortran supports both kinds of format.
|
||||
|
||||
@menu
|
||||
* Motion: Fortran Motion. Moving point by statements or subprograms.
|
||||
* Indent: Fortran Indent. Indentation commands for Fortran.
|
||||
* Comments: Fortran Comments. Inserting and aligning comments.
|
||||
* Autofill: Fortran Autofill. Auto fill support for Fortran.
|
||||
* Columns: Fortran Columns. Measuring columns for valid Fortran.
|
||||
* Abbrev: Fortran Abbrev. Built-in abbrevs for Fortran keywords.
|
||||
@end menu
|
||||
|
||||
@node Fortran Motion
|
||||
@subsection Motion Commands
|
||||
|
||||
In addition to the normal commands for moving by and operating on
|
||||
``defuns'' (Fortran subprograms---functions and subroutines, as well as
|
||||
modules for F90 mode), Fortran mode provides special commands to move by
|
||||
statements and other program units.
|
||||
|
||||
@table @kbd
|
||||
@kindex C-c C-n @r{(Fortran mode)}
|
||||
@findex fortran-next-statement
|
||||
@findex f90-next-statement
|
||||
@item C-c C-n
|
||||
Move to the beginning of the next statement
|
||||
(@code{fortran-next-statement}/@code{f90-next-statement}).
|
||||
|
||||
@kindex C-c C-p @r{(Fortran mode)}
|
||||
@findex fortran-previous-statement
|
||||
@findex f90-previous-statement
|
||||
@item C-c C-p
|
||||
Move to the beginning of the previous statement
|
||||
(@code{fortran-previous-statement}/@code{f90-previous-statement}).
|
||||
If there is no previous statement (i.e. if called from the first
|
||||
statement in the buffer), move to the start of the buffer.
|
||||
|
||||
@kindex C-c C-e @r{(F90 mode)}
|
||||
@findex f90-next-block
|
||||
@item C-c C-e
|
||||
Move point forward to the start of the next code block
|
||||
(@code{f90-next-block}). A code block is a subroutine,
|
||||
@code{if}--@code{endif} statement, and so forth. This command exists
|
||||
for F90 mode only, not Fortran mode. With a numeric argument, this
|
||||
moves forward that many blocks.
|
||||
|
||||
@kindex C-c C-a @r{(F90 mode)}
|
||||
@findex f90-previous-block
|
||||
@item C-c C-a
|
||||
Move point backward to the previous code block
|
||||
(@code{f90-previous-block}). This is like @code{f90-next-block}, but
|
||||
moves backwards.
|
||||
|
||||
@kindex C-M-n @r{(Fortran mode)}
|
||||
@findex fortran-end-of-block
|
||||
@findex f90-end-of-block
|
||||
@item C-M-n
|
||||
Move to the end of the current code block
|
||||
(@code{fortran-end-of-block}/@code{f90-end-of-block}). With a numeric
|
||||
argument, move forward that number of blocks. The mark is set before
|
||||
moving point. The F90 mode version of this command checks for
|
||||
consistency of block types and labels (if present), but it does not
|
||||
check the outermost block since that may be incomplete.
|
||||
|
||||
@kindex C-M-p @r{(Fortran mode)}
|
||||
@findex fortran-beginning-of-block
|
||||
@findex f90-beginning-of-block
|
||||
@item C-M-p
|
||||
Move to the start of the current code block
|
||||
(@code{fortran-beginning-of-block}/@code{f90-beginning-of-block}). This
|
||||
is like @code{fortran-end-of-block}, but moves backwards.
|
||||
@end table
|
||||
|
||||
@node Fortran Indent
|
||||
@subsection Fortran Indentation
|
||||
|
||||
Special commands and features are needed for indenting Fortran code in
|
||||
order to make sure various syntactic entities (line numbers, comment line
|
||||
indicators and continuation line flags) appear in the columns that are
|
||||
required for standard, fixed (or tab) format Fortran.
|
||||
|
||||
@menu
|
||||
* Commands: ForIndent Commands. Commands for indenting and filling Fortran.
|
||||
* Contline: ForIndent Cont. How continuation lines indent.
|
||||
* Numbers: ForIndent Num. How line numbers auto-indent.
|
||||
* Conv: ForIndent Conv. Conventions you must obey to avoid trouble.
|
||||
* Vars: ForIndent Vars. Variables controlling Fortran indent style.
|
||||
@end menu
|
||||
|
||||
@node ForIndent Commands
|
||||
@subsubsection Fortran Indentation and Filling Commands
|
||||
|
||||
@table @kbd
|
||||
@item C-M-j
|
||||
Break the current line at point and set up a continuation line
|
||||
(@code{fortran-split-line}).
|
||||
@item M-^
|
||||
Join this line to the previous line (@code{fortran-join-line}).
|
||||
@item C-M-q
|
||||
Indent all the lines of the subprogram point is in
|
||||
(@code{fortran-indent-subprogram}).
|
||||
@item M-q
|
||||
Fill a comment block or statement.
|
||||
@end table
|
||||
|
||||
@kindex C-M-q @r{(Fortran mode)}
|
||||
@findex fortran-indent-subprogram
|
||||
The key @kbd{C-M-q} runs @code{fortran-indent-subprogram}, a command
|
||||
to reindent all the lines of the Fortran subprogram (function or
|
||||
subroutine) containing point.
|
||||
|
||||
@kindex C-M-j @r{(Fortran mode)}
|
||||
@findex fortran-split-line
|
||||
The key @kbd{C-M-j} runs @code{fortran-split-line}, which splits
|
||||
a line in the appropriate fashion for Fortran. In a non-comment line,
|
||||
the second half becomes a continuation line and is indented
|
||||
accordingly. In a comment line, both halves become separate comment
|
||||
lines.
|
||||
|
||||
@kindex M-^ @r{(Fortran mode)}
|
||||
@kindex C-c C-d @r{(Fortran mode)}
|
||||
@findex fortran-join-line
|
||||
@kbd{M-^} or @kbd{C-c C-d} runs the command @code{fortran-join-line},
|
||||
which joins a continuation line back to the previous line, roughly as
|
||||
the inverse of @code{fortran-split-line}. The point must be on a
|
||||
continuation line when this command is invoked.
|
||||
|
||||
@kindex M-q @r{(Fortran mode)}
|
||||
@kbd{M-q} in Fortran mode fills the comment block or statement that
|
||||
point is in. This removes any excess statement continuations.
|
||||
|
||||
@node ForIndent Cont
|
||||
@subsubsection Continuation Lines
|
||||
@cindex Fortran continuation lines
|
||||
|
||||
@vindex fortran-continuation-string
|
||||
Most Fortran77 compilers allow two ways of writing continuation lines.
|
||||
If the first non-space character on a line is in column 5, then that
|
||||
line is a continuation of the previous line. We call this @dfn{fixed
|
||||
format}. (In GNU Emacs we always count columns from 0; but note that
|
||||
the Fortran standard counts from 1.) The variable
|
||||
@code{fortran-continuation-string} specifies what character to put in
|
||||
column 5. A line that starts with a tab character followed by any digit
|
||||
except @samp{0} is also a continuation line. We call this style of
|
||||
continuation @dfn{tab format}. (Fortran90 introduced ``free format,''
|
||||
with another style of continuation lines).
|
||||
|
||||
@vindex indent-tabs-mode @r{(Fortran mode)}
|
||||
@vindex fortran-analyze-depth
|
||||
@vindex fortran-tab-mode-default
|
||||
Fortran mode can use either style of continuation line. When you
|
||||
enter Fortran mode, it tries to deduce the proper continuation style
|
||||
automatically from the buffer contents. It does this by scanning up to
|
||||
@code{fortran-analyze-depth} (default 100) lines from the start of the
|
||||
buffer. The first line that begins with either a tab character or six
|
||||
spaces determines the choice. If the scan fails (for example, if the
|
||||
buffer is new and therefore empty), the value of
|
||||
@code{fortran-tab-mode-default} (@code{nil} for fixed format, and
|
||||
non-@code{nil} for tab format) is used. @samp{/t} in the mode line
|
||||
indicates tab format is selected. Fortran mode sets the value of
|
||||
@code{indent-tabs-mode} accordingly.
|
||||
|
||||
If the text on a line starts with the Fortran continuation marker
|
||||
@samp{$}, or if it begins with any non-whitespace character in column
|
||||
5, Fortran mode treats it as a continuation line. When you indent a
|
||||
continuation line with @key{TAB}, it converts the line to the current
|
||||
continuation style. When you split a Fortran statement with
|
||||
@kbd{C-M-j}, the continuation marker on the newline is created according
|
||||
to the continuation style.
|
||||
|
||||
The setting of continuation style affects several other aspects of
|
||||
editing in Fortran mode. In fixed format mode, the minimum column
|
||||
number for the body of a statement is 6. Lines inside of Fortran
|
||||
blocks that are indented to larger column numbers always use only the
|
||||
space character for whitespace. In tab format mode, the minimum
|
||||
column number for the statement body is 8, and the whitespace before
|
||||
column 8 must always consist of one tab character.
|
||||
|
||||
@node ForIndent Num
|
||||
@subsubsection Line Numbers
|
||||
|
||||
If a number is the first non-whitespace in the line, Fortran
|
||||
indentation assumes it is a line number and moves it to columns 0
|
||||
through 4. (Columns always count from 0 in GNU Emacs.)
|
||||
|
||||
@vindex fortran-line-number-indent
|
||||
Line numbers of four digits or less are normally indented one space.
|
||||
The variable @code{fortran-line-number-indent} controls this; it
|
||||
specifies the maximum indentation a line number can have. The default
|
||||
value of the variable is 1. Fortran mode tries to prevent line number
|
||||
digits passing column 4, reducing the indentation below the specified
|
||||
maximum if necessary. If @code{fortran-line-number-indent} has the
|
||||
value 5, line numbers are right-justified to end in column 4.
|
||||
|
||||
@vindex fortran-electric-line-number
|
||||
Simply inserting a line number is enough to indent it according to
|
||||
these rules. As each digit is inserted, the indentation is recomputed.
|
||||
To turn off this feature, set the variable
|
||||
@code{fortran-electric-line-number} to @code{nil}.
|
||||
|
||||
|
||||
@node ForIndent Conv
|
||||
@subsubsection Syntactic Conventions
|
||||
|
||||
Fortran mode assumes that you follow certain conventions that simplify
|
||||
the task of understanding a Fortran program well enough to indent it
|
||||
properly:
|
||||
|
||||
@itemize @bullet
|
||||
@item
|
||||
Two nested @samp{do} loops never share a @samp{continue} statement.
|
||||
|
||||
@item
|
||||
Fortran keywords such as @samp{if}, @samp{else}, @samp{then}, @samp{do}
|
||||
and others are written without embedded whitespace or line breaks.
|
||||
|
||||
Fortran compilers generally ignore whitespace outside of string
|
||||
constants, but Fortran mode does not recognize these keywords if they
|
||||
are not contiguous. Constructs such as @samp{else if} or @samp{end do}
|
||||
are acceptable, but the second word should be on the same line as the
|
||||
first and not on a continuation line.
|
||||
@end itemize
|
||||
|
||||
@noindent
|
||||
If you fail to follow these conventions, the indentation commands may
|
||||
indent some lines unaesthetically. However, a correct Fortran program
|
||||
retains its meaning when reindented even if the conventions are not
|
||||
followed.
|
||||
|
||||
@node ForIndent Vars
|
||||
@subsubsection Variables for Fortran Indentation
|
||||
|
||||
@vindex fortran-do-indent
|
||||
@vindex fortran-if-indent
|
||||
@vindex fortran-structure-indent
|
||||
@vindex fortran-continuation-indent
|
||||
@vindex fortran-check-all-num@dots{}
|
||||
@vindex fortran-minimum-statement-indent@dots{}
|
||||
Several additional variables control how Fortran indentation works:
|
||||
|
||||
@table @code
|
||||
@item fortran-do-indent
|
||||
Extra indentation within each level of @samp{do} statement (default 3).
|
||||
|
||||
@item fortran-if-indent
|
||||
Extra indentation within each level of @samp{if}, @samp{select case}, or
|
||||
@samp{where} statements (default 3).
|
||||
|
||||
@item fortran-structure-indent
|
||||
Extra indentation within each level of @samp{structure}, @samp{union},
|
||||
@samp{map}, or @samp{interface} statements (default 3).
|
||||
|
||||
@item fortran-continuation-indent
|
||||
Extra indentation for bodies of continuation lines (default 5).
|
||||
|
||||
@item fortran-check-all-num-for-matching-do
|
||||
In Fortran77, a numbered @samp{do} statement is ended by any statement
|
||||
with a matching line number. It is common (but not compulsory) to use a
|
||||
@samp{continue} statement for this purpose. If this variable has a
|
||||
non-@code{nil} value, indenting any numbered statement must check for a
|
||||
@samp{do} that ends there. If you always end @samp{do} statements with
|
||||
a @samp{continue} line (or if you use the more modern @samp{enddo}),
|
||||
then you can speed up indentation by setting this variable to
|
||||
@code{nil}. The default is @code{nil}.
|
||||
|
||||
@item fortran-blink-matching-if
|
||||
If this is @code{t}, indenting an @samp{endif} (or @samp{enddo}
|
||||
statement moves the cursor momentarily to the matching @samp{if} (or
|
||||
@samp{do}) statement to show where it is. The default is @code{nil}.
|
||||
|
||||
@item fortran-minimum-statement-indent-fixed
|
||||
Minimum indentation for Fortran statements when using fixed format
|
||||
continuation line style. Statement bodies are never indented less than
|
||||
this much. The default is 6.
|
||||
|
||||
@item fortran-minimum-statement-indent-tab
|
||||
Minimum indentation for Fortran statements for tab format continuation line
|
||||
style. Statement bodies are never indented less than this much. The
|
||||
default is 8.
|
||||
@end table
|
||||
|
||||
The variables controlling the indentation of comments are described in
|
||||
the following section.
|
||||
|
||||
@node Fortran Comments
|
||||
@subsection Fortran Comments
|
||||
|
||||
The usual Emacs comment commands assume that a comment can follow a
|
||||
line of code. In Fortran77, the standard comment syntax requires an
|
||||
entire line to be just a comment. Therefore, Fortran mode replaces the
|
||||
standard Emacs comment commands and defines some new variables.
|
||||
|
||||
@vindex fortran-comment-line-start
|
||||
Fortran mode can also handle the Fortran90 comment syntax where comments
|
||||
start with @samp{!} and can follow other text. Because only some Fortran77
|
||||
compilers accept this syntax, Fortran mode will not insert such comments
|
||||
unless you have said in advance to do so. To do this, set the variable
|
||||
@code{fortran-comment-line-start} to @samp{"!"}.
|
||||
|
||||
@table @kbd
|
||||
@item M-;
|
||||
Align comment or insert new comment (@code{fortran-indent-comment}).
|
||||
|
||||
@item C-x ;
|
||||
Applies to nonstandard @samp{!} comments only.
|
||||
|
||||
@item C-c ;
|
||||
Turn all lines of the region into comments, or (with argument) turn them back
|
||||
into real code (@code{fortran-comment-region}).
|
||||
@end table
|
||||
|
||||
@findex fortran-indent-comment
|
||||
@kbd{M-;} in Fortran mode is redefined as the command
|
||||
@code{fortran-indent-comment}. Like the usual @kbd{M-;} command, this
|
||||
recognizes any kind of existing comment and aligns its text appropriately;
|
||||
if there is no existing comment, a comment is inserted and aligned. But
|
||||
inserting and aligning comments are not the same in Fortran mode as in
|
||||
other modes.
|
||||
|
||||
When a new comment must be inserted, if the current line is blank, a
|
||||
full-line comment is inserted. On a non-blank line, a nonstandard @samp{!}
|
||||
comment is inserted if you have said you want to use them. Otherwise a
|
||||
full-line comment is inserted on a new line before the current line.
|
||||
|
||||
Nonstandard @samp{!} comments are aligned like comments in other
|
||||
languages, but full-line comments are different. In a standard full-line
|
||||
comment, the comment delimiter itself must always appear in column zero.
|
||||
What can be aligned is the text within the comment. You can choose from
|
||||
three styles of alignment by setting the variable
|
||||
@code{fortran-comment-indent-style} to one of these values:
|
||||
|
||||
@vindex fortran-comment-indent-style
|
||||
@vindex fortran-comment-line-extra-indent
|
||||
@table @code
|
||||
@item fixed
|
||||
Align the text at a fixed column, which is the sum of
|
||||
@code{fortran-comment-line-extra-indent} and the minimum statement
|
||||
indentation. This is the default.
|
||||
|
||||
The minimum statement indentation is
|
||||
@code{fortran-minimum-statement-indent-fixed} for fixed format
|
||||
continuation line style and @code{fortran-minimum-statement-indent-tab}
|
||||
for tab format style.
|
||||
|
||||
@item relative
|
||||
Align the text as if it were a line of code, but with an additional
|
||||
@code{fortran-comment-line-extra-indent} columns of indentation.
|
||||
|
||||
@item nil
|
||||
Don't move text in full-line comments automatically.
|
||||
@end table
|
||||
|
||||
@vindex fortran-comment-indent-char
|
||||
In addition, you can specify the character to be used to indent within
|
||||
full-line comments by setting the variable
|
||||
@code{fortran-comment-indent-char} to the single-character string you want
|
||||
to use.
|
||||
|
||||
@vindex fortran-directive-re
|
||||
Compiler directive lines, or preprocessor lines, have much the same
|
||||
appearance as comment lines. It is important, though, that such lines
|
||||
never be indented at all, no matter what the value of
|
||||
@code{fortran-comment-indent-style}. The variable
|
||||
@code{fortran-directive-re} is a regular expression that specifies which
|
||||
lines are directives. Matching lines are never indented, and receive
|
||||
distinctive font-locking.
|
||||
|
||||
The normal Emacs comment command @kbd{C-x ;} has not been redefined. If
|
||||
you use @samp{!} comments, this command can be used with them. Otherwise
|
||||
it is useless in Fortran mode.
|
||||
|
||||
@kindex C-c ; @r{(Fortran mode)}
|
||||
@findex fortran-comment-region
|
||||
@vindex fortran-comment-region
|
||||
The command @kbd{C-c ;} (@code{fortran-comment-region}) turns all the
|
||||
lines of the region into comments by inserting the string @samp{C$$$} at
|
||||
the front of each one. With a numeric argument, it turns the region
|
||||
back into live code by deleting @samp{C$$$} from the front of each line
|
||||
in it. The string used for these comments can be controlled by setting
|
||||
the variable @code{fortran-comment-region}. Note that here we have an
|
||||
example of a command and a variable with the same name; these two uses
|
||||
of the name never conflict because in Lisp and in Emacs it is always
|
||||
clear from the context which one is meant.
|
||||
|
||||
@node Fortran Autofill
|
||||
@subsection Auto Fill in Fortran Mode
|
||||
|
||||
Fortran mode has specialized support for Auto Fill mode, which is a
|
||||
minor mode that automatically splits statements as you insert them
|
||||
when they become too wide. Splitting a statement involves making
|
||||
continuation lines using @code{fortran-continuation-string}
|
||||
(@pxref{ForIndent Cont}). This splitting happens when you type
|
||||
@key{SPC}, @key{RET}, or @key{TAB}, and also in the Fortran
|
||||
indentation commands. You activate Auto Fill in Fortran mode in the
|
||||
normal way.
|
||||
@iftex
|
||||
@xref{Auto Fill,,, emacs, the Emacs Manual}.
|
||||
@end iftex
|
||||
@ifnottex
|
||||
@xref{Auto Fill}.
|
||||
@end ifnottex
|
||||
|
||||
@vindex fortran-break-before-delimiters
|
||||
Auto Fill breaks lines at spaces or delimiters when the lines get
|
||||
longer than the desired width (the value of @code{fill-column}). The
|
||||
delimiters (besides whitespace) that Auto Fill can break at are
|
||||
@samp{+}, @samp{-}, @samp{/}, @samp{*}, @samp{=}, @samp{<}, @samp{>},
|
||||
and @samp{,}. The line break comes after the delimiter if the
|
||||
variable @code{fortran-break-before-delimiters} is @code{nil}.
|
||||
Otherwise (and by default), the break comes before the delimiter.
|
||||
|
||||
To enable Auto Fill in all Fortran buffers, add
|
||||
@code{turn-on-auto-fill} to @code{fortran-mode-hook}.
|
||||
@iftex
|
||||
@xref{Hooks,,, emacs, the Emacs Manual}.
|
||||
@end iftex
|
||||
@ifnottex
|
||||
@xref{Hooks}.
|
||||
@end ifnottex
|
||||
|
||||
@node Fortran Columns
|
||||
@subsection Checking Columns in Fortran
|
||||
|
||||
@table @kbd
|
||||
@item C-c C-r
|
||||
Display a ``column ruler'' momentarily above the current line
|
||||
(@code{fortran-column-ruler}).
|
||||
@item C-c C-w
|
||||
Split the current window horizontally temporarily so that it is 72
|
||||
columns wide (@code{fortran-window-create-momentarily}). This may
|
||||
help you avoid making lines longer than the 72-character limit that
|
||||
some Fortran compilers impose.
|
||||
@item C-u C-c C-w
|
||||
Split the current window horizontally so that it is 72 columns wide
|
||||
(@code{fortran-window-create}). You can then continue editing.
|
||||
@item M-x fortran-strip-sequence-nos
|
||||
Delete all text in column 72 and beyond.
|
||||
@end table
|
||||
|
||||
@kindex C-c C-r @r{(Fortran mode)}
|
||||
@findex fortran-column-ruler
|
||||
The command @kbd{C-c C-r} (@code{fortran-column-ruler}) shows a column
|
||||
ruler momentarily above the current line. The comment ruler is two lines
|
||||
of text that show you the locations of columns with special significance in
|
||||
Fortran programs. Square brackets show the limits of the columns for line
|
||||
numbers, and curly brackets show the limits of the columns for the
|
||||
statement body. Column numbers appear above them.
|
||||
|
||||
Note that the column numbers count from zero, as always in GNU Emacs.
|
||||
As a result, the numbers may be one less than those you are familiar
|
||||
with; but the positions they indicate in the line are standard for
|
||||
Fortran.
|
||||
|
||||
@vindex fortran-column-ruler-fixed
|
||||
@vindex fortran-column-ruler-tabs
|
||||
The text used to display the column ruler depends on the value of the
|
||||
variable @code{indent-tabs-mode}. If @code{indent-tabs-mode} is
|
||||
@code{nil}, then the value of the variable
|
||||
@code{fortran-column-ruler-fixed} is used as the column ruler.
|
||||
Otherwise, the value of the variable @code{fortran-column-ruler-tab} is
|
||||
displayed. By changing these variables, you can change the column ruler
|
||||
display.
|
||||
|
||||
@kindex C-c C-w @r{(Fortran mode)}
|
||||
@findex fortran-window-create-momentarily
|
||||
@kbd{C-c C-w} (@code{fortran-window-create-momentarily}) temporarily
|
||||
splits the current window horizontally, making a window 72 columns
|
||||
wide, so you can see any lines that are too long. Type a space to
|
||||
restore the normal width.
|
||||
|
||||
@kindex C-u C-c C-w @r{(Fortran mode)}
|
||||
@findex fortran-window-create
|
||||
You can also split the window horizontally and continue editing with
|
||||
the split in place. To do this, use @kbd{C-u C-c C-w} (@code{M-x
|
||||
fortran-window-create}). By editing in this window you can
|
||||
immediately see when you make a line too wide to be correct Fortran.
|
||||
|
||||
@findex fortran-strip-sequence-nos
|
||||
The command @kbd{M-x fortran-strip-sequence-nos} deletes all text in
|
||||
column 72 and beyond, on all lines in the current buffer. This is the
|
||||
easiest way to get rid of old sequence numbers.
|
||||
|
||||
@node Fortran Abbrev
|
||||
@subsection Fortran Keyword Abbrevs
|
||||
|
||||
Fortran mode provides many built-in abbrevs for common keywords and
|
||||
declarations. These are the same sort of abbrev that you can define
|
||||
yourself. To use them, you must turn on Abbrev mode.
|
||||
@iftex
|
||||
@xref{Abbrevs,,, emacs, the Emacs Manual}.
|
||||
@end iftex
|
||||
@ifnottex
|
||||
@xref{Abbrevs}.
|
||||
@end ifnottex
|
||||
|
||||
The built-in abbrevs are unusual in one way: they all start with a
|
||||
semicolon. You cannot normally use semicolon in an abbrev, but Fortran
|
||||
mode makes this possible by changing the syntax of semicolon to ``word
|
||||
constituent.''
|
||||
|
||||
For example, one built-in Fortran abbrev is @samp{;c} for
|
||||
@samp{continue}. If you insert @samp{;c} and then insert a punctuation
|
||||
character such as a space or a newline, the @samp{;c} expands automatically
|
||||
to @samp{continue}, provided Abbrev mode is enabled.@refill
|
||||
|
||||
Type @samp{;?} or @samp{;C-h} to display a list of all the built-in
|
||||
Fortran abbrevs and what they stand for.
|
||||
|
||||
@ignore
|
||||
arch-tag: 23ed7c36-1517-4646-9235-2d5ade5f06f6
|
||||
@end ignore
|
567
doc/emacs/gnu.texi
Normal file
567
doc/emacs/gnu.texi
Normal file
|
@ -0,0 +1,567 @@
|
|||
@c This is part of the Emacs manual.
|
||||
@c Copyright (C) 1985, 1986, 1987, 1993, 1995, 2001, 2002, 2003, 2004,
|
||||
@c 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
@ifclear justgnu
|
||||
@node Manifesto,, Microsoft Windows, Top
|
||||
@unnumbered The GNU Manifesto
|
||||
@end ifclear
|
||||
@ifset justgnu
|
||||
Copyright @copyright{} 1985, 1993, 2001, 2002, 2003, 2004,
|
||||
2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.2 or
|
||||
any later version published by the Free Software Foundation; with no
|
||||
Invariant Sections, with the Front-Cover texts being ``A GNU
|
||||
Manual'', and with the Back-Cover Texts as in (a) below. A copy of the
|
||||
license is included in the section entitled ``GNU Free Documentation
|
||||
License'' in the Emacs manual.
|
||||
|
||||
(a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
|
||||
this GNU Manual, like GNU software. Copies published by the Free
|
||||
Software Foundation raise funds for GNU development.''
|
||||
|
||||
This document is part of a collection distributed under the GNU Free
|
||||
Documentation License. If you want to distribute this document
|
||||
separately from the collection, you can do so by adding a copy of the
|
||||
license to the document, as described in section 6 of the license.
|
||||
|
||||
@node Top
|
||||
@top The GNU Manifesto
|
||||
@end ifset
|
||||
|
||||
@quotation
|
||||
The GNU Manifesto which appears below was written by Richard Stallman at
|
||||
the beginning of the GNU project, to ask for participation and support.
|
||||
For the first few years, it was updated in minor ways to account for
|
||||
developments, but now it seems best to leave it unchanged as most people
|
||||
have seen it.
|
||||
|
||||
Since that time, we have learned about certain common misunderstandings
|
||||
that different wording could help avoid. Footnotes added in 1993 help
|
||||
clarify these points.
|
||||
|
||||
For up-to-date information about available GNU software, please see
|
||||
our web site, @uref{http://www.gnu.org}. For software tasks and other
|
||||
ways to contribute, see @uref{http://www.gnu.org/help}.
|
||||
@end quotation
|
||||
|
||||
@unnumberedsec What's GNU? Gnu's Not Unix!
|
||||
|
||||
GNU, which stands for Gnu's Not Unix, is the name for the complete
|
||||
Unix-compatible software system which I am writing so that I can give it
|
||||
away free to everyone who can use it.@footnote{The wording here was
|
||||
careless. The intention was that nobody would have to pay for
|
||||
@emph{permission} to use the GNU system. But the words don't make this
|
||||
clear, and people often interpret them as saying that copies of GNU
|
||||
should always be distributed at little or no charge. That was never the
|
||||
intent; later on, the manifesto mentions the possibility of companies
|
||||
providing the service of distribution for a profit. Subsequently I have
|
||||
learned to distinguish carefully between ``free'' in the sense of
|
||||
freedom and ``free'' in the sense of price. Free software is software
|
||||
that users have the freedom to distribute and change. Some users may
|
||||
obtain copies at no charge, while others pay to obtain copies---and if
|
||||
the funds help support improving the software, so much the better. The
|
||||
important thing is that everyone who has a copy has the freedom to
|
||||
cooperate with others in using it.} Several other volunteers are helping
|
||||
me. Contributions of time, money, programs and equipment are greatly
|
||||
needed.
|
||||
|
||||
So far we have an Emacs text editor with Lisp for writing editor commands,
|
||||
a source level debugger, a yacc-compatible parser generator, a linker, and
|
||||
around 35 utilities. A shell (command interpreter) is nearly completed. A
|
||||
new portable optimizing C compiler has compiled itself and may be released
|
||||
this year. An initial kernel exists but many more features are needed to
|
||||
emulate Unix. When the kernel and compiler are finished, it will be
|
||||
possible to distribute a GNU system suitable for program development. We
|
||||
will use @TeX{} as our text formatter, but an nroff is being worked on. We
|
||||
will use the free, portable X window system as well. After this we will
|
||||
add a portable Common Lisp, an Empire game, a spreadsheet, and hundreds of
|
||||
other things, plus on-line documentation. We hope to supply, eventually,
|
||||
everything useful that normally comes with a Unix system, and more.
|
||||
|
||||
GNU will be able to run Unix programs, but will not be identical to Unix.
|
||||
We will make all improvements that are convenient, based on our experience
|
||||
with other operating systems. In particular, we plan to have longer
|
||||
file names, file version numbers, a crashproof file system, file name
|
||||
completion perhaps, terminal-independent display support, and perhaps
|
||||
eventually a Lisp-based window system through which several Lisp programs
|
||||
and ordinary Unix programs can share a screen. Both C and Lisp will be
|
||||
available as system programming languages. We will try to support UUCP,
|
||||
MIT Chaosnet, and Internet protocols for communication.
|
||||
|
||||
GNU is aimed initially at machines in the 68000/16000 class with virtual
|
||||
memory, because they are the easiest machines to make it run on. The extra
|
||||
effort to make it run on smaller machines will be left to someone who wants
|
||||
to use it on them.
|
||||
|
||||
To avoid horrible confusion, please pronounce the `G' in the word `GNU'
|
||||
when it is the name of this project.
|
||||
|
||||
@unnumberedsec Why I Must Write GNU
|
||||
|
||||
I consider that the golden rule requires that if I like a program I must
|
||||
share it with other people who like it. Software sellers want to divide
|
||||
the users and conquer them, making each user agree not to share with
|
||||
others. I refuse to break solidarity with other users in this way. I
|
||||
cannot in good conscience sign a nondisclosure agreement or a software
|
||||
license agreement. For years I worked within the Artificial Intelligence
|
||||
Lab to resist such tendencies and other inhospitalities, but eventually
|
||||
they had gone too far: I could not remain in an institution where such
|
||||
things are done for me against my will.
|
||||
|
||||
So that I can continue to use computers without dishonor, I have decided to
|
||||
put together a sufficient body of free software so that I will be able to
|
||||
get along without any software that is not free. I have resigned from the
|
||||
AI lab to deny MIT any legal excuse to prevent me from giving GNU away.
|
||||
|
||||
@unnumberedsec Why GNU Will Be Compatible with Unix
|
||||
|
||||
Unix is not my ideal system, but it is not too bad. The essential features
|
||||
of Unix seem to be good ones, and I think I can fill in what Unix lacks
|
||||
without spoiling them. And a system compatible with Unix would be
|
||||
convenient for many other people to adopt.
|
||||
|
||||
@unnumberedsec How GNU Will Be Available
|
||||
|
||||
GNU is not in the public domain. Everyone will be permitted to modify and
|
||||
redistribute GNU, but no distributor will be allowed to restrict its
|
||||
further redistribution. That is to say, proprietary modifications will not
|
||||
be allowed. I want to make sure that all versions of GNU remain free.
|
||||
|
||||
@unnumberedsec Why Many Other Programmers Want to Help
|
||||
|
||||
I have found many other programmers who are excited about GNU and want to
|
||||
help.
|
||||
|
||||
Many programmers are unhappy about the commercialization of system
|
||||
software. It may enable them to make more money, but it requires them to
|
||||
feel in conflict with other programmers in general rather than feel as
|
||||
comrades. The fundamental act of friendship among programmers is the
|
||||
sharing of programs; marketing arrangements now typically used essentially
|
||||
forbid programmers to treat others as friends. The purchaser of software
|
||||
must choose between friendship and obeying the law. Naturally, many decide
|
||||
that friendship is more important. But those who believe in law often do
|
||||
not feel at ease with either choice. They become cynical and think that
|
||||
programming is just a way of making money.
|
||||
|
||||
By working on and using GNU rather than proprietary programs, we can be
|
||||
hospitable to everyone and obey the law. In addition, GNU serves as an
|
||||
example to inspire and a banner to rally others to join us in sharing.
|
||||
This can give us a feeling of harmony which is impossible if we use
|
||||
software that is not free. For about half the programmers I talk to, this
|
||||
is an important happiness that money cannot replace.
|
||||
|
||||
@unnumberedsec How You Can Contribute
|
||||
|
||||
I am asking computer manufacturers for donations of machines and money.
|
||||
I'm asking individuals for donations of programs and work.
|
||||
|
||||
One consequence you can expect if you donate machines is that GNU will run
|
||||
on them at an early date. The machines should be complete, ready to use
|
||||
systems, approved for use in a residential area, and not in need of
|
||||
sophisticated cooling or power.
|
||||
|
||||
I have found very many programmers eager to contribute part-time work for
|
||||
GNU. For most projects, such part-time distributed work would be very hard
|
||||
to coordinate; the independently-written parts would not work together.
|
||||
But for the particular task of replacing Unix, this problem is absent. A
|
||||
complete Unix system contains hundreds of utility programs, each of which
|
||||
is documented separately. Most interface specifications are fixed by Unix
|
||||
compatibility. If each contributor can write a compatible replacement for
|
||||
a single Unix utility, and make it work properly in place of the original
|
||||
on a Unix system, then these utilities will work right when put together.
|
||||
Even allowing for Murphy to create a few unexpected problems, assembling
|
||||
these components will be a feasible task. (The kernel will require closer
|
||||
communication and will be worked on by a small, tight group.)
|
||||
|
||||
If I get donations of money, I may be able to hire a few people full or
|
||||
part time. The salary won't be high by programmers' standards, but I'm
|
||||
looking for people for whom building community spirit is as important as
|
||||
making money. I view this as a way of enabling dedicated people to devote
|
||||
their full energies to working on GNU by sparing them the need to make a
|
||||
living in another way.
|
||||
|
||||
@unnumberedsec Why All Computer Users Will Benefit
|
||||
|
||||
Once GNU is written, everyone will be able to obtain good system
|
||||
software free, just like air.@footnote{This is another place I failed to
|
||||
distinguish carefully between the two different meanings of ``free.''
|
||||
The statement as it stands is not false---you can get copies of GNU
|
||||
software at no charge, from your friends or over the net. But it does
|
||||
suggest the wrong idea.}
|
||||
|
||||
This means much more than just saving everyone the price of a Unix license.
|
||||
It means that much wasteful duplication of system programming effort will
|
||||
be avoided. This effort can go instead into advancing the state of the
|
||||
art.
|
||||
|
||||
Complete system sources will be available to everyone. As a result, a user
|
||||
who needs changes in the system will always be free to make them himself,
|
||||
or hire any available programmer or company to make them for him. Users
|
||||
will no longer be at the mercy of one programmer or company which owns the
|
||||
sources and is in sole position to make changes.
|
||||
|
||||
Schools will be able to provide a much more educational environment by
|
||||
encouraging all students to study and improve the system code. Harvard's
|
||||
computer lab used to have the policy that no program could be installed on
|
||||
the system if its sources were not on public display, and upheld it by
|
||||
actually refusing to install certain programs. I was very much inspired by
|
||||
this.
|
||||
|
||||
Finally, the overhead of considering who owns the system software and what
|
||||
one is or is not entitled to do with it will be lifted.
|
||||
|
||||
Arrangements to make people pay for using a program, including licensing of
|
||||
copies, always incur a tremendous cost to society through the cumbersome
|
||||
mechanisms necessary to figure out how much (that is, which programs) a
|
||||
person must pay for. And only a police state can force everyone to obey
|
||||
them. Consider a space station where air must be manufactured at great
|
||||
cost: charging each breather per liter of air may be fair, but wearing the
|
||||
metered gas mask all day and all night is intolerable even if everyone can
|
||||
afford to pay the air bill. And the TV cameras everywhere to see if you
|
||||
ever take the mask off are outrageous. It's better to support the air
|
||||
plant with a head tax and chuck the masks.
|
||||
|
||||
Copying all or parts of a program is as natural to a programmer as
|
||||
breathing, and as productive. It ought to be as free.
|
||||
|
||||
@unnumberedsec Some Easily Rebutted Objections to GNU's Goals
|
||||
|
||||
@quotation
|
||||
``Nobody will use it if it is free, because that means they can't rely
|
||||
on any support.''
|
||||
|
||||
``You have to charge for the program to pay for providing the
|
||||
support.''
|
||||
@end quotation
|
||||
|
||||
If people would rather pay for GNU plus service than get GNU free without
|
||||
service, a company to provide just service to people who have obtained GNU
|
||||
free ought to be profitable.@footnote{Several such companies now exist.}
|
||||
|
||||
We must distinguish between support in the form of real programming work
|
||||
and mere handholding. The former is something one cannot rely on from a
|
||||
software vendor. If your problem is not shared by enough people, the
|
||||
vendor will tell you to get lost.
|
||||
|
||||
If your business needs to be able to rely on support, the only way is to
|
||||
have all the necessary sources and tools. Then you can hire any available
|
||||
person to fix your problem; you are not at the mercy of any individual.
|
||||
With Unix, the price of sources puts this out of consideration for most
|
||||
businesses. With GNU this will be easy. It is still possible for there to
|
||||
be no available competent person, but this problem cannot be blamed on
|
||||
distribution arrangements. GNU does not eliminate all the world's problems,
|
||||
only some of them.
|
||||
|
||||
Meanwhile, the users who know nothing about computers need handholding:
|
||||
doing things for them which they could easily do themselves but don't know
|
||||
how.
|
||||
|
||||
Such services could be provided by companies that sell just hand-holding
|
||||
and repair service. If it is true that users would rather spend money and
|
||||
get a product with service, they will also be willing to buy the service
|
||||
having got the product free. The service companies will compete in quality
|
||||
and price; users will not be tied to any particular one. Meanwhile, those
|
||||
of us who don't need the service should be able to use the program without
|
||||
paying for the service.
|
||||
|
||||
@quotation
|
||||
``You cannot reach many people without advertising,
|
||||
and you must charge for the program to support that.''
|
||||
|
||||
``It's no use advertising a program people can get free.''
|
||||
@end quotation
|
||||
|
||||
There are various forms of free or very cheap publicity that can be used to
|
||||
inform numbers of computer users about something like GNU. But it may be
|
||||
true that one can reach more microcomputer users with advertising. If this
|
||||
is really so, a business which advertises the service of copying and
|
||||
mailing GNU for a fee ought to be successful enough to pay for its
|
||||
advertising and more. This way, only the users who benefit from the
|
||||
advertising pay for it.
|
||||
|
||||
On the other hand, if many people get GNU from their friends, and such
|
||||
companies don't succeed, this will show that advertising was not really
|
||||
necessary to spread GNU. Why is it that free market advocates don't
|
||||
want to let the free market decide this?@footnote{The Free Software
|
||||
Foundation raises most of its funds from a distribution service,
|
||||
although it is a charity rather than a company. If @emph{no one}
|
||||
chooses to obtain copies by ordering from the FSF, it will be unable
|
||||
to do its work. But this does not mean that proprietary restrictions
|
||||
are justified to force every user to pay. If a small fraction of all
|
||||
the users order copies from the FSF, that is sufficient to keep the FSF
|
||||
afloat. So we ask users to choose to support us in this way. Have you
|
||||
done your part?}
|
||||
|
||||
@quotation
|
||||
``My company needs a proprietary operating system
|
||||
to get a competitive edge.''
|
||||
@end quotation
|
||||
|
||||
GNU will remove operating system software from the realm of competition.
|
||||
You will not be able to get an edge in this area, but neither will your
|
||||
competitors be able to get an edge over you. You and they will compete in
|
||||
other areas, while benefiting mutually in this one. If your business is
|
||||
selling an operating system, you will not like GNU, but that's tough on
|
||||
you. If your business is something else, GNU can save you from being
|
||||
pushed into the expensive business of selling operating systems.
|
||||
|
||||
I would like to see GNU development supported by gifts from many
|
||||
manufacturers and users, reducing the cost to each.@footnote{A group of
|
||||
computer companies recently pooled funds to support maintenance of the
|
||||
GNU C Compiler.}
|
||||
|
||||
@quotation
|
||||
``Don't programmers deserve a reward for their creativity?''
|
||||
@end quotation
|
||||
|
||||
If anything deserves a reward, it is social contribution. Creativity can
|
||||
be a social contribution, but only in so far as society is free to use the
|
||||
results. If programmers deserve to be rewarded for creating innovative
|
||||
programs, by the same token they deserve to be punished if they restrict
|
||||
the use of these programs.
|
||||
|
||||
@quotation
|
||||
``Shouldn't a programmer be able to ask for a reward for his creativity?''
|
||||
@end quotation
|
||||
|
||||
There is nothing wrong with wanting pay for work, or seeking to maximize
|
||||
one's income, as long as one does not use means that are destructive. But
|
||||
the means customary in the field of software today are based on
|
||||
destruction.
|
||||
|
||||
Extracting money from users of a program by restricting their use of it is
|
||||
destructive because the restrictions reduce the amount and the ways that
|
||||
the program can be used. This reduces the amount of wealth that humanity
|
||||
derives from the program. When there is a deliberate choice to restrict,
|
||||
the harmful consequences are deliberate destruction.
|
||||
|
||||
The reason a good citizen does not use such destructive means to become
|
||||
wealthier is that, if everyone did so, we would all become poorer from the
|
||||
mutual destructiveness. This is Kantian ethics; or, the Golden Rule.
|
||||
Since I do not like the consequences that result if everyone hoards
|
||||
information, I am required to consider it wrong for one to do so.
|
||||
Specifically, the desire to be rewarded for one's creativity does not
|
||||
justify depriving the world in general of all or part of that creativity.
|
||||
|
||||
@quotation
|
||||
``Won't programmers starve?''
|
||||
@end quotation
|
||||
|
||||
I could answer that nobody is forced to be a programmer. Most of us cannot
|
||||
manage to get any money for standing on the street and making faces. But
|
||||
we are not, as a result, condemned to spend our lives standing on the
|
||||
street making faces, and starving. We do something else.
|
||||
|
||||
But that is the wrong answer because it accepts the questioner's implicit
|
||||
assumption: that without ownership of software, programmers cannot possibly
|
||||
be paid a cent. Supposedly it is all or nothing.
|
||||
|
||||
The real reason programmers will not starve is that it will still be
|
||||
possible for them to get paid for programming; just not paid as much as
|
||||
now.
|
||||
|
||||
Restricting copying is not the only basis for business in software. It is
|
||||
the most common basis because it brings in the most money. If it were
|
||||
prohibited, or rejected by the customer, software business would move to
|
||||
other bases of organization which are now used less often. There are
|
||||
always numerous ways to organize any kind of business.
|
||||
|
||||
Probably programming will not be as lucrative on the new basis as it is
|
||||
now. But that is not an argument against the change. It is not considered
|
||||
an injustice that sales clerks make the salaries that they now do. If
|
||||
programmers made the same, that would not be an injustice either. (In
|
||||
practice they would still make considerably more than that.)
|
||||
|
||||
@quotation
|
||||
``Don't people have a right to control how their creativity is used?''
|
||||
@end quotation
|
||||
|
||||
``Control over the use of one's ideas'' really constitutes control over
|
||||
other people's lives; and it is usually used to make their lives more
|
||||
difficult.
|
||||
|
||||
People who have studied the issue of intellectual property
|
||||
rights@footnote{In the 80s I had not yet realized how confusing it was
|
||||
to speak of ``the issue'' of ``intellectual property.'' That term is
|
||||
obviously biased; more subtle is the fact that it lumps together
|
||||
various disparate laws which raise very different issues. Nowadays I
|
||||
urge people to reject the term ``intellectual property'' entirely,
|
||||
lest it lead others to suppose that those laws form one coherent
|
||||
issue. The way to be clear is to discuss patents, copyrights, and
|
||||
trademarks separately. See
|
||||
@uref{http://www.gnu.org/philosophy/not-ipr.xhtml} for more
|
||||
explanation of how this term spreads confusion and bias.} carefully
|
||||
(such as lawyers) say that there is no intrinsic right to intellectual
|
||||
property. The kinds of supposed intellectual property rights that the
|
||||
government recognizes were created by specific acts of legislation for
|
||||
specific purposes.
|
||||
|
||||
For example, the patent system was established to encourage inventors to
|
||||
disclose the details of their inventions. Its purpose was to help society
|
||||
rather than to help inventors. At the time, the life span of 17 years for
|
||||
a patent was short compared with the rate of advance of the state of the
|
||||
art. Since patents are an issue only among manufacturers, for whom the
|
||||
cost and effort of a license agreement are small compared with setting up
|
||||
production, the patents often do not do much harm. They do not obstruct
|
||||
most individuals who use patented products.
|
||||
|
||||
The idea of copyright did not exist in ancient times, when authors
|
||||
frequently copied other authors at length in works of non-fiction. This
|
||||
practice was useful, and is the only way many authors' works have survived
|
||||
even in part. The copyright system was created expressly for the purpose
|
||||
of encouraging authorship. In the domain for which it was
|
||||
invented---books, which could be copied economically only on a printing
|
||||
press---it did little harm, and did not obstruct most of the individuals
|
||||
who read the books.
|
||||
|
||||
All intellectual property rights are just licenses granted by society
|
||||
because it was thought, rightly or wrongly, that society as a whole would
|
||||
benefit by granting them. But in any particular situation, we have to ask:
|
||||
are we really better off granting such license? What kind of act are we
|
||||
licensing a person to do?
|
||||
|
||||
The case of programs today is very different from that of books a hundred
|
||||
years ago. The fact that the easiest way to copy a program is from one
|
||||
neighbor to another, the fact that a program has both source code and
|
||||
object code which are distinct, and the fact that a program is used rather
|
||||
than read and enjoyed, combine to create a situation in which a person who
|
||||
enforces a copyright is harming society as a whole both materially and
|
||||
spiritually; in which a person should not do so regardless of whether the
|
||||
law enables him to.
|
||||
|
||||
@quotation
|
||||
``Competition makes things get done better.''
|
||||
@end quotation
|
||||
|
||||
The paradigm of competition is a race: by rewarding the winner, we
|
||||
encourage everyone to run faster. When capitalism really works this way,
|
||||
it does a good job; but its defenders are wrong in assuming it always works
|
||||
this way. If the runners forget why the reward is offered and become
|
||||
intent on winning, no matter how, they may find other strategies---such as,
|
||||
attacking other runners. If the runners get into a fist fight, they will
|
||||
all finish late.
|
||||
|
||||
Proprietary and secret software is the moral equivalent of runners in a
|
||||
fist fight. Sad to say, the only referee we've got does not seem to
|
||||
object to fights; he just regulates them (``For every ten yards you run,
|
||||
you can fire one shot''). He really ought to break them up, and penalize
|
||||
runners for even trying to fight.
|
||||
|
||||
@quotation
|
||||
``Won't everyone stop programming without a monetary incentive?''
|
||||
@end quotation
|
||||
|
||||
Actually, many people will program with absolutely no monetary incentive.
|
||||
Programming has an irresistible fascination for some people, usually the
|
||||
people who are best at it. There is no shortage of professional musicians
|
||||
who keep at it even though they have no hope of making a living that way.
|
||||
|
||||
But really this question, though commonly asked, is not appropriate to the
|
||||
situation. Pay for programmers will not disappear, only become less. So
|
||||
the right question is, will anyone program with a reduced monetary
|
||||
incentive? My experience shows that they will.
|
||||
|
||||
For more than ten years, many of the world's best programmers worked at the
|
||||
Artificial Intelligence Lab for far less money than they could have had
|
||||
anywhere else. They got many kinds of non-monetary rewards: fame and
|
||||
appreciation, for example. And creativity is also fun, a reward in itself.
|
||||
|
||||
Then most of them left when offered a chance to do the same interesting
|
||||
work for a lot of money.
|
||||
|
||||
What the facts show is that people will program for reasons other than
|
||||
riches; but if given a chance to make a lot of money as well, they will
|
||||
come to expect and demand it. Low-paying organizations do poorly in
|
||||
competition with high-paying ones, but they do not have to do badly if the
|
||||
high-paying ones are banned.
|
||||
|
||||
@quotation
|
||||
``We need the programmers desperately. If they demand that we
|
||||
stop helping our neighbors, we have to obey.''
|
||||
@end quotation
|
||||
|
||||
You're never so desperate that you have to obey this sort of demand.
|
||||
Remember: millions for defense, but not a cent for tribute!
|
||||
|
||||
@quotation
|
||||
``Programmers need to make a living somehow.''
|
||||
@end quotation
|
||||
|
||||
In the short run, this is true. However, there are plenty of ways that
|
||||
programmers could make a living without selling the right to use a program.
|
||||
This way is customary now because it brings programmers and businessmen the
|
||||
most money, not because it is the only way to make a living. It is easy to
|
||||
find other ways if you want to find them. Here are a number of examples.
|
||||
|
||||
A manufacturer introducing a new computer will pay for the porting of
|
||||
operating systems onto the new hardware.
|
||||
|
||||
The sale of teaching, hand-holding and maintenance services could also
|
||||
employ programmers.
|
||||
|
||||
People with new ideas could distribute programs as
|
||||
freeware@footnote{Subsequently we have discovered the need to
|
||||
distinguish between ``free software'' and ``freeware''. The term
|
||||
``freeware'' means software you are free to redistribute, but usually
|
||||
you are not free to study and change the source code, so most of it is
|
||||
not free software. See
|
||||
@uref{http://www.gnu.org/philosophy/words-to-avoid.html} for more
|
||||
explanation.}, asking for donations from satisfied users, or selling
|
||||
hand-holding services. I have met people who are already working this
|
||||
way successfully.
|
||||
|
||||
Users with related needs can form users' groups, and pay dues. A group
|
||||
would contract with programming companies to write programs that the
|
||||
group's members would like to use.
|
||||
|
||||
All sorts of development can be funded with a Software Tax:
|
||||
|
||||
@quotation
|
||||
Suppose everyone who buys a computer has to pay x percent of
|
||||
the price as a software tax. The government gives this to
|
||||
an agency like the NSF to spend on software development.
|
||||
|
||||
But if the computer buyer makes a donation to software development
|
||||
himself, he can take a credit against the tax. He can donate to
|
||||
the project of his own choosing---often, chosen because he hopes to
|
||||
use the results when it is done. He can take a credit for any amount
|
||||
of donation up to the total tax he had to pay.
|
||||
|
||||
The total tax rate could be decided by a vote of the payers of
|
||||
the tax, weighted according to the amount they will be taxed on.
|
||||
|
||||
The consequences:
|
||||
|
||||
@itemize @bullet
|
||||
@item
|
||||
The computer-using community supports software development.
|
||||
@item
|
||||
This community decides what level of support is needed.
|
||||
@item
|
||||
Users who care which projects their share is spent on
|
||||
can choose this for themselves.
|
||||
@end itemize
|
||||
@end quotation
|
||||
|
||||
In the long run, making programs free is a step toward the post-scarcity
|
||||
world, where nobody will have to work very hard just to make a living.
|
||||
People will be free to devote themselves to activities that are fun, such
|
||||
as programming, after spending the necessary ten hours a week on required
|
||||
tasks such as legislation, family counseling, robot repair and asteroid
|
||||
prospecting. There will be no need to be able to make a living from
|
||||
programming.
|
||||
|
||||
We have already greatly reduced the amount of work that the whole society
|
||||
must do for its actual productivity, but only a little of this has
|
||||
translated itself into leisure for workers because much nonproductive
|
||||
activity is required to accompany productive activity. The main causes of
|
||||
this are bureaucracy and isometric struggles against competition. Free
|
||||
software will greatly reduce these drains in the area of software
|
||||
production. We must do this, in order for technical gains in productivity
|
||||
to translate into less work for us.
|
||||
|
||||
@ignore
|
||||
arch-tag: 21eb38f8-6fa0-480a-91cd-f3dab7148542
|
||||
@end ignore
|
721
doc/emacs/gpl.texi
Normal file
721
doc/emacs/gpl.texi
Normal file
|
@ -0,0 +1,721 @@
|
|||
@c The GNU General Public License.
|
||||
@center Version 3, 29 June 2007
|
||||
|
||||
@c This file is intended to be included within another document,
|
||||
@c hence no sectioning command or @node.
|
||||
|
||||
@display
|
||||
Copyright @copyright{} 2007 Free Software Foundation, Inc. @url{http://fsf.org/}
|
||||
|
||||
Everyone is permitted to copy and distribute verbatim copies of this
|
||||
license document, but changing it is not allowed.
|
||||
@end display
|
||||
|
||||
@heading Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom
|
||||
to share and change all versions of a program---to make sure it remains
|
||||
free software for all its users. We, the Free Software Foundation,
|
||||
use the GNU General Public License for most of our software; it
|
||||
applies also to any other work released this way by its authors. You
|
||||
can apply it to your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you
|
||||
have certain responsibilities if you distribute copies of the
|
||||
software, or if you modify it: responsibilities to respect the freedom
|
||||
of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too,
|
||||
receive or can get the source code. And you must show them these
|
||||
terms so they know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the
|
||||
manufacturer can do so. This is fundamentally incompatible with the
|
||||
aim of protecting users' freedom to change the software. The
|
||||
systematic pattern of such abuse occurs in the area of products for
|
||||
individuals to use, which is precisely where it is most unacceptable.
|
||||
Therefore, we have designed this version of the GPL to prohibit the
|
||||
practice for those products. If such problems arise substantially in
|
||||
other domains, we stand ready to extend this provision to those
|
||||
domains in future versions of the GPL, as needed to protect the
|
||||
freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish
|
||||
to avoid the special danger that patents applied to a free program
|
||||
could make it effectively proprietary. To prevent this, the GPL
|
||||
assures that patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
@heading TERMS AND CONDITIONS
|
||||
|
||||
@enumerate 0
|
||||
@item Definitions.
|
||||
|
||||
``This License'' refers to version 3 of the GNU General Public License.
|
||||
|
||||
``Copyright'' also means copyright-like laws that apply to other kinds
|
||||
of works, such as semiconductor masks.
|
||||
|
||||
``The Program'' refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as ``you''. ``Licensees'' and
|
||||
``recipients'' may be individuals or organizations.
|
||||
|
||||
To ``modify'' a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of
|
||||
an exact copy. The resulting work is called a ``modified version'' of
|
||||
the earlier work or a work ``based on'' the earlier work.
|
||||
|
||||
A ``covered work'' means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To ``propagate'' a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To ``convey'' a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user
|
||||
through a computer network, with no transfer of a copy, is not
|
||||
conveying.
|
||||
|
||||
An interactive user interface displays ``Appropriate Legal Notices'' to
|
||||
the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
@item Source Code.
|
||||
|
||||
The ``source code'' for a work means the preferred form of the work for
|
||||
making modifications to it. ``Object code'' means any non-source form
|
||||
of a work.
|
||||
|
||||
A ``Standard Interface'' means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The ``System Libraries'' of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
``Major Component'', in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The ``Corresponding Source'' for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users can
|
||||
regenerate automatically from other parts of the Corresponding Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that same
|
||||
work.
|
||||
|
||||
@item Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not convey,
|
||||
without conditions so long as your license otherwise remains in force.
|
||||
You may convey covered works to others for the sole purpose of having
|
||||
them make modifications exclusively for you, or provide you with
|
||||
facilities for running those works, provided that you comply with the
|
||||
terms of this License in conveying all material for which you do not
|
||||
control copyright. Those thus making or running the covered works for
|
||||
you must do so exclusively on your behalf, under your direction and
|
||||
control, on terms that prohibit them from making any copies of your
|
||||
copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under the
|
||||
conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
@item Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such
|
||||
circumvention is effected by exercising rights under this License with
|
||||
respect to the covered work, and you disclaim any intention to limit
|
||||
operation or modification of the work as a means of enforcing, against
|
||||
the work's users, your or third parties' legal rights to forbid
|
||||
circumvention of technological measures.
|
||||
|
||||
@item Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
@item Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these
|
||||
conditions:
|
||||
|
||||
@enumerate a
|
||||
@item
|
||||
The work must carry prominent notices stating that you modified it,
|
||||
and giving a relevant date.
|
||||
|
||||
@item
|
||||
The work must carry prominent notices stating that it is released
|
||||
under this License and any conditions added under section 7. This
|
||||
requirement modifies the requirement in section 4 to ``keep intact all
|
||||
notices''.
|
||||
|
||||
@item
|
||||
You must license the entire work, as a whole, under this License to
|
||||
anyone who comes into possession of a copy. This License will
|
||||
therefore apply, along with any applicable section 7 additional terms,
|
||||
to the whole of the work, and all its parts, regardless of how they
|
||||
are packaged. This License gives no permission to license the work in
|
||||
any other way, but it does not invalidate such permission if you have
|
||||
separately received it.
|
||||
|
||||
@item
|
||||
If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your work
|
||||
need not make them do so.
|
||||
@end enumerate
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
``aggregate'' if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
@item Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms of
|
||||
sections 4 and 5, provided that you also convey the machine-readable
|
||||
Corresponding Source under the terms of this License, in one of these
|
||||
ways:
|
||||
|
||||
@enumerate a
|
||||
@item
|
||||
Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium customarily
|
||||
used for software interchange.
|
||||
|
||||
@item
|
||||
Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a written
|
||||
offer, valid for at least three years and valid for as long as you
|
||||
offer spare parts or customer support for that product model, to give
|
||||
anyone who possesses the object code either (1) a copy of the
|
||||
Corresponding Source for all the software in the product that is
|
||||
covered by this License, on a durable physical medium customarily used
|
||||
for software interchange, for a price no more than your reasonable
|
||||
cost of physically performing this conveying of source, or (2) access
|
||||
to copy the Corresponding Source from a network server at no charge.
|
||||
|
||||
@item
|
||||
Convey individual copies of the object code with a copy of the written
|
||||
offer to provide the Corresponding Source. This alternative is
|
||||
allowed only occasionally and noncommercially, and only if you
|
||||
received the object code with such an offer, in accord with subsection
|
||||
6b.
|
||||
|
||||
@item
|
||||
Convey the object code by offering access from a designated place
|
||||
(gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to copy
|
||||
the object code is a network server, the Corresponding Source may be
|
||||
on a different server (operated by you or a third party) that supports
|
||||
equivalent copying facilities, provided you maintain clear directions
|
||||
next to the object code saying where to find the Corresponding Source.
|
||||
Regardless of what server hosts the Corresponding Source, you remain
|
||||
obligated to ensure that it is available for as long as needed to
|
||||
satisfy these requirements.
|
||||
|
||||
@item
|
||||
Convey the object code using peer-to-peer transmission, provided you
|
||||
inform other peers where the object code and Corresponding Source of
|
||||
the work are being offered to the general public at no charge under
|
||||
subsection 6d.
|
||||
|
||||
@end enumerate
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A ``User Product'' is either (1) a ``consumer product'', which means any
|
||||
tangible personal property which is normally used for personal,
|
||||
family, or household purposes, or (2) anything designed or sold for
|
||||
incorporation into a dwelling. In determining whether a product is a
|
||||
consumer product, doubtful cases shall be resolved in favor of
|
||||
coverage. For a particular product received by a particular user,
|
||||
``normally used'' refers to a typical or common use of that class of
|
||||
product, regardless of the status of the particular user or of the way
|
||||
in which the particular user actually uses, or expects or is expected
|
||||
to use, the product. A product is a consumer product regardless of
|
||||
whether the product has substantial commercial, industrial or
|
||||
non-consumer uses, unless such uses represent the only significant
|
||||
mode of use of the product.
|
||||
|
||||
``Installation Information'' for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to
|
||||
install and execute modified versions of a covered work in that User
|
||||
Product from a modified version of its Corresponding Source. The
|
||||
information must suffice to ensure that the continued functioning of
|
||||
the modified object code is in no case prevented or interfered with
|
||||
solely because modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or
|
||||
updates for a work that has been modified or installed by the
|
||||
recipient, or for the User Product in which it has been modified or
|
||||
installed. Access to a network may be denied when the modification
|
||||
itself materially and adversely affects the operation of the network
|
||||
or violates the rules and protocols for communication across the
|
||||
network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
@item Additional Terms.
|
||||
|
||||
``Additional permissions'' are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders
|
||||
of that material) supplement the terms of this License with terms:
|
||||
|
||||
@enumerate a
|
||||
@item
|
||||
Disclaiming warranty or limiting liability differently from the terms
|
||||
of sections 15 and 16 of this License; or
|
||||
|
||||
@item
|
||||
Requiring preservation of specified reasonable legal notices or author
|
||||
attributions in that material or in the Appropriate Legal Notices
|
||||
displayed by works containing it; or
|
||||
|
||||
@item
|
||||
Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
@item
|
||||
Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
@item
|
||||
Declining to grant rights under trademark law for use of some trade
|
||||
names, trademarks, or service marks; or
|
||||
|
||||
@item
|
||||
Requiring indemnification of licensors and authors of that material by
|
||||
anyone who conveys the material (or modified versions of it) with
|
||||
contractual assumptions of liability to the recipient, for any
|
||||
liability that these contractual assumptions directly impose on those
|
||||
licensors and authors.
|
||||
@end enumerate
|
||||
|
||||
All other non-permissive additional terms are considered ``further
|
||||
restrictions'' within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions; the
|
||||
above requirements apply either way.
|
||||
|
||||
@item Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your license
|
||||
from a particular copyright holder is reinstated (a) provisionally,
|
||||
unless and until the copyright holder explicitly and finally
|
||||
terminates your license, and (b) permanently, if the copyright holder
|
||||
fails to notify you of the violation by some reasonable means prior to
|
||||
60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
@item Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or run
|
||||
a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
@item Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An ``entity transaction'' is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
@item Patents.
|
||||
|
||||
A ``contributor'' is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's ``contributor version''.
|
||||
|
||||
A contributor's ``essential patent claims'' are all patent claims owned
|
||||
or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, ``control'' includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a ``patent license'' is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To ``grant'' such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. ``Knowingly relying'' means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is ``discriminatory'' if it does not include within the
|
||||
scope of its coverage, prohibits the exercise of, or is conditioned on
|
||||
the non-exercise of one or more of the rights that are specifically
|
||||
granted under this License. You may not convey a covered work if you
|
||||
are a party to an arrangement with a third party that is in the
|
||||
business of distributing software, under which you make payment to the
|
||||
third party based on the extent of your activity of conveying the
|
||||
work, and under which the third party grants, to any of the parties
|
||||
who would receive the covered work from you, a discriminatory patent
|
||||
license (a) in connection with copies of the covered work conveyed by
|
||||
you (or copies made from those copies), or (b) primarily for and in
|
||||
connection with specific products or compilations that contain the
|
||||
covered work, unless you entered into that arrangement, or that patent
|
||||
license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
@item No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey
|
||||
a covered work so as to satisfy simultaneously your obligations under
|
||||
this License and any other pertinent obligations, then as a
|
||||
consequence you may not convey it at all. For example, if you agree
|
||||
to terms that obligate you to collect a royalty for further conveying
|
||||
from those to whom you convey the Program, the only way you could
|
||||
satisfy both those terms and this License would be to refrain entirely
|
||||
from conveying the Program.
|
||||
|
||||
@item Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
@item Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions
|
||||
of the GNU General Public License from time to time. Such new
|
||||
versions will be similar in spirit to the present version, but may
|
||||
differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies that a certain numbered version of the GNU General Public
|
||||
License ``or any later version'' applies to it, you have the option of
|
||||
following the terms and conditions either of that numbered version or
|
||||
of any later version published by the Free Software Foundation. If
|
||||
the Program does not specify a version number of the GNU General
|
||||
Public License, you may choose any version ever published by the Free
|
||||
Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future versions
|
||||
of the GNU General Public License can be used, that proxy's public
|
||||
statement of acceptance of a version permanently authorizes you to
|
||||
choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
@item Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM ``AS IS'' WITHOUT
|
||||
WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND
|
||||
PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE
|
||||
DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR
|
||||
CORRECTION.
|
||||
|
||||
@item Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR
|
||||
CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES
|
||||
ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT
|
||||
NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR
|
||||
LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM
|
||||
TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER
|
||||
PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
@item Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
@end enumerate
|
||||
|
||||
@heading END OF TERMS AND CONDITIONS
|
||||
|
||||
@heading How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these
|
||||
terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the ``copyright'' line and a pointer to where the full notice is found.
|
||||
|
||||
@smallexample
|
||||
@var{one line to give the program's name and a brief idea of what it does.}
|
||||
Copyright (C) @var{year} @var{name of author}
|
||||
|
||||
This program 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 of the License, or (at
|
||||
your option) any later version.
|
||||
|
||||
This program 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 this program. If not, see @url{http://www.gnu.org/licenses/}.
|
||||
@end smallexample
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
@smallexample
|
||||
@var{program} Copyright (C) @var{year} @var{name of author}
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type @samp{show w}.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type @samp{show c} for details.
|
||||
@end smallexample
|
||||
|
||||
The hypothetical commands @samp{show w} and @samp{show c} should show
|
||||
the appropriate parts of the General Public License. Of course, your
|
||||
program's commands might be different; for a GUI interface, you would
|
||||
use an ``about box''.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a ``copyright disclaimer'' for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
@url{http://www.gnu.org/licenses/}.
|
||||
|
||||
The GNU General Public License does not permit incorporating your
|
||||
program into proprietary programs. If your program is a subroutine
|
||||
library, you may consider it more useful to permit linking proprietary
|
||||
applications with the library. If this is what you want to do, use
|
||||
the GNU Lesser General Public License instead of this License. But
|
||||
first, please read @url{http://www.gnu.org/philosophy/why-not-lgpl.html}.
|
||||
|
||||
@ignore
|
||||
arch-tag: 8b9947e1-c830-4d70-8907-a97e556731ba
|
||||
@end ignore
|
75
doc/emacs/m-x.texi
Normal file
75
doc/emacs/m-x.texi
Normal file
|
@ -0,0 +1,75 @@
|
|||
@c This is part of the Emacs manual.
|
||||
@c Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1997, 2001, 2002,
|
||||
@c 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
@c See file emacs.texi for copying conditions.
|
||||
@node M-x, Help, Minibuffer, Top
|
||||
@chapter Running Commands by Name
|
||||
|
||||
Every Emacs command has a name that you can use to run it. For
|
||||
convenience, many commands also have key bindings. You can run those
|
||||
commands by typing the keys, or run them by name. Most Emacs commands
|
||||
have no key bindings, so the only way to run them is by name.
|
||||
(@xref{Key Bindings}, for how to set up key bindings.)
|
||||
|
||||
By convention, a command name consists of one or more words,
|
||||
separated by hyphens; for example, @code{auto-fill-mode} or
|
||||
@code{manual-entry}. Command names mostly use complete English words
|
||||
to make them easier to remember.
|
||||
|
||||
@kindex M-x
|
||||
To run a command by name, start with @kbd{M-x}, type the command
|
||||
name, then terminate it with @key{RET}. @kbd{M-x} uses the minibuffer
|
||||
to read the command name. The string @samp{M-x} appears at the
|
||||
beginning of the minibuffer as a @dfn{prompt} to remind you to enter a
|
||||
command name to be run. @key{RET} exits the minibuffer and runs the
|
||||
command. @xref{Minibuffer}, for more information on the minibuffer.
|
||||
|
||||
You can use completion to enter the command name. For example,
|
||||
to invoke the command @code{forward-char}, you can type
|
||||
|
||||
@example
|
||||
M-x forward-char @key{RET}
|
||||
@end example
|
||||
|
||||
@noindent
|
||||
or
|
||||
|
||||
@example
|
||||
M-x forw @key{TAB} c @key{RET}
|
||||
@end example
|
||||
|
||||
@noindent
|
||||
Note that @code{forward-char} is the same command that you invoke with
|
||||
the key @kbd{C-f}. The existence of a key binding does not stop you
|
||||
from running the command by name.
|
||||
|
||||
To cancel the @kbd{M-x} and not run a command, type @kbd{C-g} instead
|
||||
of entering the command name. This takes you back to command level.
|
||||
|
||||
To pass a numeric argument to the command you are invoking with
|
||||
@kbd{M-x}, specify the numeric argument before @kbd{M-x}. The
|
||||
argument value appears in the prompt while the command name is being
|
||||
read, and finally @kbd{M-x} passes the argument to that command.
|
||||
|
||||
@vindex suggest-key-bindings
|
||||
When the command you run with @kbd{M-x} has a key binding, Emacs
|
||||
mentions this in the echo area after running the command. For
|
||||
example, if you type @kbd{M-x forward-word}, the message says that you
|
||||
can run the same command by typing @kbd{M-f}. You can turn off these
|
||||
messages by setting the variable @code{suggest-key-bindings} to
|
||||
@code{nil}.
|
||||
|
||||
In this manual, when we speak of running a command by name, we often
|
||||
omit the @key{RET} that terminates the name. Thus we might say
|
||||
@kbd{M-x auto-fill-mode} rather than @kbd{M-x auto-fill-mode
|
||||
@key{RET}}. We mention the @key{RET} only for emphasis, such as when
|
||||
the command is followed by arguments.
|
||||
|
||||
@findex execute-extended-command
|
||||
@kbd{M-x} works by running the command
|
||||
@code{execute-extended-command}, which is responsible for reading the
|
||||
name of another command and invoking it.
|
||||
|
||||
@ignore
|
||||
arch-tag: b67bff53-9628-4666-b94e-eda972a7ba56
|
||||
@end ignore
|
144
doc/emacs/makefile.w32-in
Normal file
144
doc/emacs/makefile.w32-in
Normal file
|
@ -0,0 +1,144 @@
|
|||
#### -*- Makefile -*- for the Emacs Manual
|
||||
|
||||
# Copyright (C) 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.
|
||||
|
||||
# Where to find the source code. The source code for Emacs's C kernel is
|
||||
# expected to be in $(srcdir)/src, and the source code for Emacs's
|
||||
# utility programs is expected to be in $(srcdir)/lib-src. This is
|
||||
# set by the configure script's `--srcdir' option.
|
||||
srcdir=.
|
||||
|
||||
infodir = $(srcdir)/../../info
|
||||
|
||||
# The makeinfo program is part of the Texinfo distribution.
|
||||
MAKEINFO = makeinfo --force
|
||||
MULTI_INSTALL_INFO = $(srcdir)\..\..\nt\multi-install-info.bat
|
||||
INFO_TARGETS = $(infodir)/emacs
|
||||
DVI_TARGETS = emacs.dvi
|
||||
INFOSOURCES = info.texi
|
||||
|
||||
# The following rule does not work with all versions of `make'.
|
||||
.SUFFIXES: .texi .dvi
|
||||
.texi.dvi:
|
||||
texi2dvi $<
|
||||
|
||||
TEXI2DVI = texi2dvi
|
||||
ENVADD = $(srcdir)\..\..\nt\envadd.bat "TEXINPUTS=$(srcdir);$(TEXINPUTS)" \
|
||||
"MAKEINFO=$(MAKEINFO) -I$(srcdir)" /C
|
||||
|
||||
EMACS_XTRA=\
|
||||
$(srcdir)/arevert-xtra.texi \
|
||||
$(srcdir)/cal-xtra.texi \
|
||||
$(srcdir)/dired-xtra.texi \
|
||||
$(srcdir)/picture-xtra.texi \
|
||||
$(srcdir)/emerge-xtra.texi \
|
||||
$(srcdir)/vc-xtra.texi \
|
||||
$(srcdir)/vc1-xtra.texi \
|
||||
$(srcdir)/vc2-xtra.texi \
|
||||
$(srcdir)/fortran-xtra.texi \
|
||||
$(srcdir)/msdog-xtra.texi
|
||||
|
||||
EMACSSOURCES= \
|
||||
$(srcdir)/emacs.texi \
|
||||
$(srcdir)/doclicense.texi \
|
||||
$(srcdir)/screen.texi \
|
||||
$(srcdir)/commands.texi \
|
||||
$(srcdir)/entering.texi \
|
||||
$(srcdir)/basic.texi \
|
||||
$(srcdir)/mini.texi \
|
||||
$(srcdir)/m-x.texi \
|
||||
$(srcdir)/help.texi \
|
||||
$(srcdir)/mark.texi \
|
||||
$(srcdir)/killing.texi \
|
||||
$(srcdir)/regs.texi \
|
||||
$(srcdir)/display.texi \
|
||||
$(srcdir)/search.texi \
|
||||
$(srcdir)/fixit.texi \
|
||||
$(srcdir)/files.texi \
|
||||
$(srcdir)/buffers.texi \
|
||||
$(srcdir)/windows.texi \
|
||||
$(srcdir)/frames.texi \
|
||||
$(srcdir)/mule.texi \
|
||||
$(srcdir)/major.texi \
|
||||
$(srcdir)/indent.texi \
|
||||
$(srcdir)/text.texi \
|
||||
$(srcdir)/programs.texi \
|
||||
$(srcdir)/building.texi \
|
||||
$(srcdir)/maintaining.texi \
|
||||
$(srcdir)/abbrevs.texi \
|
||||
$(srcdir)/sending.texi \
|
||||
$(srcdir)/rmail.texi \
|
||||
$(srcdir)/dired.texi \
|
||||
$(srcdir)/calendar.texi \
|
||||
$(srcdir)/misc.texi \
|
||||
$(srcdir)/custom.texi \
|
||||
$(srcdir)/trouble.texi \
|
||||
$(srcdir)/cmdargs.texi \
|
||||
$(srcdir)/xresources.texi \
|
||||
$(srcdir)/anti.texi \
|
||||
$(srcdir)/macos.texi \
|
||||
$(srcdir)/msdog.texi \
|
||||
$(srcdir)/gnu.texi \
|
||||
$(srcdir)/glossary.texi \
|
||||
$(srcdir)/ack.texi \
|
||||
$(srcdir)/kmacro.texi \
|
||||
$(EMACS_XTRA)
|
||||
|
||||
info: $(INFO_TARGETS)
|
||||
|
||||
dvi: $(DVI_TARGETS)
|
||||
|
||||
# Note that all the Info targets build the Info files
|
||||
# in srcdir. There is no provision for Info files
|
||||
# to exist in the build directory.
|
||||
# In a distribution of Emacs, the Info files should be up to date.
|
||||
|
||||
$(infodir)/dir:
|
||||
$(MULTI_INSTALL_INFO) --info-dir=$(infodir) $(INFO_TARGETS)
|
||||
|
||||
$(infodir)/emacs: $(EMACSSOURCES)
|
||||
$(MAKEINFO) emacs.texi
|
||||
|
||||
emacs.dvi: $(EMACSSOURCES)
|
||||
$(ENVADD) $(TEXI2DVI) $(srcdir)/emacs.texi
|
||||
|
||||
emacs-xtra.dvi: emacs-xtra.texi $(EMACS_XTRA)
|
||||
$(ENVADD) $(TEXI2DVI) $(srcdir)/emacs-xtra.texi
|
||||
|
||||
mostlyclean:
|
||||
- $(DEL) *.log *.cp *.fn *.ky *.pg *.vr core *.tp *.core gnustmp.*
|
||||
|
||||
clean: mostlyclean
|
||||
- $(DEL) *.dvi
|
||||
- $(DEL) $(infodir)/emacs*
|
||||
|
||||
distclean: clean
|
||||
|
||||
maintainer-clean: distclean
|
||||
- $(DEL) *.aux *.cps *.fns *.kys *.pgs *.vrs *.toc
|
||||
# Don't delete these, because they are outside the current directory.
|
||||
# for file in $(INFO_TARGETS); do rm -f $${file}*; done
|
||||
|
||||
|
||||
# Formerly this directory had texindex.c and getopt.c in it
|
||||
# and this makefile built them to make texindex.
|
||||
# That caused trouble because this is run entirely in the source directory.
|
||||
# Since we expect to get texi2dvi from elsewhere,
|
||||
# it is ok to expect texindex from elsewhere also.
|
452
doc/emacs/mark.texi
Normal file
452
doc/emacs/mark.texi
Normal file
|
@ -0,0 +1,452 @@
|
|||
@c This is part of the Emacs manual.
|
||||
@c Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1997, 2001, 2002,
|
||||
@c 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
@c See file emacs.texi for copying conditions.
|
||||
@node Mark, Killing, Help, Top
|
||||
@chapter The Mark and the Region
|
||||
@cindex mark
|
||||
@cindex setting a mark
|
||||
@cindex region
|
||||
|
||||
Many Emacs commands operate on an arbitrary contiguous part of the
|
||||
current buffer. To specify the text for such a command to operate on,
|
||||
you set @dfn{the mark} at one end of it, and move point to the other
|
||||
end. The text between point and the mark is called @dfn{the region}.
|
||||
Emacs highlights the region whenever there is one, if you enable
|
||||
Transient Mark mode (@pxref{Transient Mark}).
|
||||
|
||||
Certain Emacs commands set the mark; other editing commands do not
|
||||
affect it, so the mark remains where you set it last. Each Emacs
|
||||
buffer has its own mark, and setting the mark in one buffer has no
|
||||
effect on other buffers' marks. When you return to a buffer that was
|
||||
current earlier, its mark is at the same place as before.
|
||||
|
||||
The ends of the region are always point and the mark. It doesn't
|
||||
matter which of them was put in its current place first, or which one
|
||||
comes earlier in the text---the region starts from point or the mark
|
||||
(whichever comes first), and ends at point or the mark (whichever
|
||||
comes last). Every time you move point, or set the mark in a new
|
||||
place, the region changes.
|
||||
|
||||
Many commands that insert text, such as @kbd{C-y} (@code{yank}) and
|
||||
@kbd{M-x insert-buffer}, position point and the mark at opposite ends
|
||||
of the inserted text, so that the region consists of the text just
|
||||
inserted.
|
||||
|
||||
Aside from delimiting the region, the mark is also useful for
|
||||
remembering a spot that you may want to go back to. To make this
|
||||
feature more useful, each buffer remembers 16 previous locations of the
|
||||
mark in the @dfn{mark ring}.
|
||||
|
||||
@menu
|
||||
* Setting Mark:: Commands to set the mark.
|
||||
* Transient Mark:: How to make Emacs highlight the region--
|
||||
when there is one.
|
||||
* Momentary Mark:: Enabling Transient Mark mode momentarily.
|
||||
* Using Region:: Summary of ways to operate on contents of the region.
|
||||
* Marking Objects:: Commands to put region around textual units.
|
||||
* Mark Ring:: Previous mark positions saved so you can go back there.
|
||||
* Global Mark Ring:: Previous mark positions in various buffers.
|
||||
@end menu
|
||||
|
||||
@node Setting Mark
|
||||
@section Setting the Mark
|
||||
|
||||
Here are some commands for setting the mark:
|
||||
|
||||
@table @kbd
|
||||
@item C-@key{SPC}
|
||||
Set the mark where point is (@code{set-mark-command}).
|
||||
@item C-@@
|
||||
The same.
|
||||
@item C-x C-x
|
||||
Interchange mark and point (@code{exchange-point-and-mark}).
|
||||
@item Drag-Mouse-1
|
||||
Set point and the mark around the text you drag across.
|
||||
@item Mouse-3
|
||||
Set the mark where point is, then move point to where you click
|
||||
(@code{mouse-save-then-kill}).
|
||||
@end table
|
||||
|
||||
For example, suppose you wish to convert part of the buffer to
|
||||
upper case, using the @kbd{C-x C-u} (@code{upcase-region}) command,
|
||||
which operates on the text in the region. You can first go to the
|
||||
beginning of the text to be capitalized, type @kbd{C-@key{SPC}} to put
|
||||
the mark there, move to the end, and then type @kbd{C-x C-u}. Or, you
|
||||
can set the mark at the end of the text, move to the beginning, and then
|
||||
type @kbd{C-x C-u}.
|
||||
|
||||
@kindex C-SPC
|
||||
@findex set-mark-command
|
||||
The most common way to set the mark is with the @kbd{C-@key{SPC}} command
|
||||
(@code{set-mark-command}). This sets the mark where point is. Then you
|
||||
can move point away, leaving the mark behind.
|
||||
|
||||
There are two ways to set the mark with the mouse. You can drag mouse
|
||||
button one across a range of text; that puts point where you release the
|
||||
mouse button, and sets the mark at the other end of that range. Or you
|
||||
can click mouse button three, which sets the mark at point (like
|
||||
@kbd{C-@key{SPC}}) and then moves point where you clicked (like
|
||||
@kbd{Mouse-1}).
|
||||
|
||||
Using the mouse to mark a region copies the region into the kill
|
||||
ring in addition to setting the mark; that gives behavior consistent
|
||||
with other window-driven applications. If you don't want to modify
|
||||
the kill ring, you must use keyboard commands to set the mark.
|
||||
@xref{Mouse Commands}.
|
||||
|
||||
@kindex C-x C-x
|
||||
@findex exchange-point-and-mark
|
||||
When Emacs was developed, terminals had only one cursor, so Emacs
|
||||
does not show where the mark is located--you have to remember. If you
|
||||
enable Transient Mark mode (see below), then the region is highlighted
|
||||
when it is active; you can tell mark is at the other end of the
|
||||
highlighted region. But this only applies when the mark is active.
|
||||
|
||||
The usual solution to this problem is to set the mark and then use
|
||||
it soon, before you forget where it is. Alternatively, you can see
|
||||
where the mark is with the command @kbd{C-x C-x}
|
||||
(@code{exchange-point-and-mark}) which puts the mark where point was
|
||||
and point where the mark was. The extent of the region is unchanged,
|
||||
but the cursor and point are now at the previous position of the mark.
|
||||
In Transient Mark mode, this command also reactivates the mark.
|
||||
|
||||
@kbd{C-x C-x} is also useful when you are satisfied with the position
|
||||
of point but want to move the other end of the region (where the mark
|
||||
is); do @kbd{C-x C-x} to put point at that end of the region, and then
|
||||
move it. Using @kbd{C-x C-x} a second time, if necessary, puts the mark at
|
||||
the new position with point back at its original position.
|
||||
|
||||
For more facilities that allow you to go to previously set marks, see
|
||||
@ref{Mark Ring}.
|
||||
|
||||
@kindex C-@@
|
||||
There is no such character as @kbd{C-@key{SPC}} in @acronym{ASCII};
|
||||
when you type @key{SPC} while holding down @key{CTRL} on a text
|
||||
terminal, what you get is the character @kbd{C-@@}. This key is also
|
||||
bound to @code{set-mark-command}--so unless you are unlucky enough to
|
||||
have a text terminal where typing @kbd{C-@key{SPC}} does not produce
|
||||
@kbd{C-@@}, you might as well think of this character as
|
||||
@kbd{C-@key{SPC}}.
|
||||
|
||||
@node Transient Mark
|
||||
@section Transient Mark Mode
|
||||
@cindex mode, Transient Mark
|
||||
@cindex Transient Mark mode
|
||||
@cindex highlighting region
|
||||
@cindex region highlighting
|
||||
|
||||
On a terminal that supports colors, Emacs has the ability to
|
||||
highlight the current region. But normally it does not. Why not?
|
||||
|
||||
In the normal mode of use, every command that sets the mark also
|
||||
activates it, and nothing ever deactivates it. Thus, once you have
|
||||
set the mark in a buffer, there is @emph{always} a region in that
|
||||
buffer. Highlighting the region all the time would be a nuisance. So
|
||||
normally Emacs highlights the region only immediately after you have
|
||||
selected one with the mouse.
|
||||
|
||||
If you want region highlighting, you can use Transient Mark mode.
|
||||
This is a more rigid mode of operation in which the region ``lasts''
|
||||
only until you use it; operating on the region text deactivates the
|
||||
mark, so there is no region any more. Therefore, you must explicitly
|
||||
set up a region for each command that uses one.
|
||||
|
||||
When Transient Mark mode is enabled, Emacs highlights the region,
|
||||
whenever there is a region. In Transient Mark mode, most of the time
|
||||
there is no region; therefore, highlighting the region when it exists
|
||||
is useful and not annoying.
|
||||
|
||||
@findex transient-mark-mode
|
||||
To enable Transient Mark mode, type @kbd{M-x transient-mark-mode}.
|
||||
This command toggles the mode; you can use the same command to turn
|
||||
the mode off again.
|
||||
|
||||
Here are the details of Transient Mark mode:
|
||||
|
||||
@itemize @bullet
|
||||
@item
|
||||
To set the mark, type @kbd{C-@key{SPC}} (@code{set-mark-command}).
|
||||
This makes the mark active and thus begins highlighting of the region.
|
||||
As you move point, you will see the highlighted region grow and
|
||||
shrink.
|
||||
|
||||
@item
|
||||
The mouse commands for specifying the mark also make it active. So do
|
||||
keyboard commands whose purpose is to specify a region, including
|
||||
@kbd{M-@@}, @kbd{C-M-@@}, @kbd{M-h}, @kbd{C-M-h}, @kbd{C-x C-p}, and
|
||||
@kbd{C-x h}.
|
||||
|
||||
@item
|
||||
You can tell that the mark is active because the region is highlighted.
|
||||
|
||||
@item
|
||||
When the mark is active, you can execute commands that operate on the
|
||||
region, such as killing, indenting, or writing to a file.
|
||||
|
||||
@item
|
||||
Any change to the buffer, such as inserting or deleting a character,
|
||||
deactivates the mark. This means any subsequent command that operates
|
||||
on a region will get an error and refuse to operate. You can make the
|
||||
region active again by typing @kbd{C-x C-x}.
|
||||
|
||||
@item
|
||||
If Delete Selection mode is also enabled, some commands delete the
|
||||
region when used while the mark is active. @xref{Mouse Commands}.
|
||||
|
||||
@item
|
||||
Quitting with @kbd{C-g} deactivates the mark.
|
||||
|
||||
@item
|
||||
Commands like @kbd{M->} and @kbd{C-s}, that ``leave the mark behind'' in
|
||||
addition to some other primary purpose, do not activate the new mark.
|
||||
You can activate the new region by executing @kbd{C-x C-x}
|
||||
(@code{exchange-point-and-mark}).
|
||||
|
||||
@item
|
||||
Commands that normally set the mark before moving long distances (like
|
||||
@kbd{M-<} and @kbd{C-s}) do not alter the mark in Transient Mark mode
|
||||
when the mark is active.
|
||||
|
||||
@item
|
||||
Some commands operate on the region if a region is active. For
|
||||
instance, @kbd{C-x u} in Transient Mark mode operates on the region,
|
||||
when there is a region. (Outside Transient Mark mode, you must type
|
||||
@kbd{C-u C-x u} if you want it to operate on the region.)
|
||||
@xref{Undo}. Other commands that act this way are identified in their
|
||||
own documentation.
|
||||
@end itemize
|
||||
|
||||
The highlighting of the region uses the @code{region} face; you can
|
||||
customize the appearance of the highlighted region by changing this
|
||||
face. @xref{Face Customization}.
|
||||
|
||||
@vindex highlight-nonselected-windows
|
||||
When multiple windows show the same buffer, they can have different
|
||||
regions, because they can have different values of point (though they
|
||||
all share one common mark position). Ordinarily, only the selected
|
||||
window highlights its region (@pxref{Windows}). However, if the
|
||||
variable @code{highlight-nonselected-windows} is non-@code{nil}, then
|
||||
each window highlights its own region (provided that Transient Mark mode
|
||||
is enabled and the mark in the window's buffer is active).
|
||||
|
||||
@vindex mark-even-if-inactive
|
||||
If the variable @code{mark-even-if-inactive} is non-@code{nil} in
|
||||
Transient Mark mode, then commands can use the mark and the region
|
||||
even when it is inactive. Region highlighting appears and disappears
|
||||
just as it normally does in Transient Mark mode, but the mark doesn't
|
||||
really go away when the highlighting disappears, so you can still use
|
||||
region commands.
|
||||
|
||||
@cindex Zmacs mode
|
||||
Transient Mark mode is also sometimes known as ``Zmacs mode''
|
||||
because the Zmacs editor on the MIT Lisp Machine handled the mark in a
|
||||
similar way.
|
||||
|
||||
@node Momentary Mark
|
||||
@section Using Transient Mark Mode Momentarily
|
||||
|
||||
If you don't like Transient Mark mode in general, you might still
|
||||
want to use it once in a while. To do this, type @kbd{C-@key{SPC}
|
||||
C-@key{SPC}} or @kbd{C-u C-x C-x}. These commands set or activate the
|
||||
mark, and enable Transient Mark mode only until the mark is
|
||||
deactivated.
|
||||
|
||||
@table @kbd
|
||||
@item C-@key{SPC} C-@key{SPC}
|
||||
@kindex C-@key{SPC} C-@key{SPC}
|
||||
Set the mark at point (like plain @kbd{C-@key{SPC}}), and enable
|
||||
Transient Mark mode just once until the mark is deactivated. (This is
|
||||
not really a separate command; you are using the @kbd{C-@key{SPC}}
|
||||
command twice.)
|
||||
|
||||
@item C-u C-x C-x
|
||||
@kindex C-u C-x C-x
|
||||
Activate the mark without changing it; enable Transient Mark mode just
|
||||
once, until the mark is deactivated. (This is the @kbd{C-x C-x}
|
||||
command, @code{exchange-point-and-mark}, with a prefix argument.)
|
||||
@end table
|
||||
|
||||
One of the secondary features of Transient Mark mode is that certain
|
||||
commands operate only on the region, when there is an active region.
|
||||
If you don't use Transient Mark mode, the region once set never
|
||||
becomes inactive, so there is no way for these commands to make such a
|
||||
distinction. Enabling Transient Mark mode momentarily gives you a way
|
||||
to use these commands on the region.
|
||||
|
||||
Momentary use of Transient Mark mode is also a way to highlight the
|
||||
region for the time being.
|
||||
|
||||
@node Using Region
|
||||
@section Operating on the Region
|
||||
|
||||
@cindex operations on a marked region
|
||||
Once you have a region and the mark is active, here are some of the
|
||||
ways you can operate on the region:
|
||||
|
||||
@itemize @bullet
|
||||
@item
|
||||
Kill it with @kbd{C-w} (@pxref{Killing}).
|
||||
@item
|
||||
Save it in a register with @kbd{C-x r s} (@pxref{Registers}).
|
||||
@item
|
||||
Save it in a buffer or a file (@pxref{Accumulating Text}).
|
||||
@item
|
||||
Convert case with @kbd{C-x C-l} or @kbd{C-x C-u} (@pxref{Case}).
|
||||
@item
|
||||
Indent it with @kbd{C-x @key{TAB}} or @kbd{C-M-\} (@pxref{Indentation}).
|
||||
@item
|
||||
Fill it as text with @kbd{M-x fill-region} (@pxref{Filling}).
|
||||
@item
|
||||
Print hardcopy with @kbd{M-x print-region} (@pxref{Printing}).
|
||||
@item
|
||||
Evaluate it as Lisp code with @kbd{M-x eval-region} (@pxref{Lisp Eval}).
|
||||
@item
|
||||
Undo changes within it using @kbd{C-u C-x u} (@pxref{Undo}).
|
||||
@end itemize
|
||||
|
||||
Most commands that operate on the text in the region have the word
|
||||
@code{region} in their names.
|
||||
|
||||
@node Marking Objects
|
||||
@section Commands to Mark Textual Objects
|
||||
|
||||
@cindex marking sections of text
|
||||
Here are the commands for placing point and the mark around a textual
|
||||
object such as a word, list, paragraph or page.
|
||||
|
||||
@table @kbd
|
||||
@item M-@@
|
||||
Set mark after end of next word (@code{mark-word}). This command and
|
||||
the following one do not move point.
|
||||
@item C-M-@@
|
||||
Set mark after end of following balanced expression (@code{mark-sexp}).
|
||||
@item M-h
|
||||
Put region around current paragraph (@code{mark-paragraph}).
|
||||
@item C-M-h
|
||||
Put region around current defun (@code{mark-defun}).
|
||||
@item C-x h
|
||||
Put region around the entire buffer (@code{mark-whole-buffer}).
|
||||
@item C-x C-p
|
||||
Put region around current page (@code{mark-page}).
|
||||
@end table
|
||||
|
||||
@kbd{M-@@} (@code{mark-word}) puts the mark at the end of the next
|
||||
word, while @kbd{C-M-@@} (@code{mark-sexp}) puts it at the end of the
|
||||
next balanced expression (@pxref{Expressions}). These commands handle
|
||||
arguments just like @kbd{M-f} and @kbd{C-M-f}. Repeating these
|
||||
commands extends the region. For example, you can type either
|
||||
@kbd{C-u 2 M-@@} or @kbd{M-@@ M-@@} to mark the next two words. These
|
||||
commands also extend the region in Transient Mark mode, regardless of
|
||||
the last command.
|
||||
|
||||
@kindex C-x h
|
||||
@findex mark-whole-buffer
|
||||
Other commands set both point and mark, to delimit an object in the
|
||||
buffer. For example, @kbd{M-h} (@code{mark-paragraph}) moves point to
|
||||
the beginning of the paragraph that surrounds or follows point, and
|
||||
puts the mark at the end of that paragraph (@pxref{Paragraphs}). It
|
||||
prepares the region so you can indent, case-convert, or kill a whole
|
||||
paragraph. With a prefix argument, if the argument's value is positive,
|
||||
@kbd{M-h} marks that many paragraphs starting with the one surrounding
|
||||
point. If the prefix argument is @minus{}@var{n}, @kbd{M-h} also
|
||||
marks @var{n} paragraphs, running back form the one surrounding point.
|
||||
In that last case, point moves forward to the end of that paragraph,
|
||||
and the mark goes at the start of the region. Repeating the @kbd{M-h}
|
||||
command extends the region to subsequent paragraphs.
|
||||
|
||||
@kbd{C-M-h} (@code{mark-defun}) similarly puts point before, and the
|
||||
mark after, the current (or following) major top-level definition, or
|
||||
defun (@pxref{Moving by Defuns}). Repeating @kbd{C-M-h} extends
|
||||
the region to subsequent defuns.
|
||||
|
||||
@kbd{C-x C-p} (@code{mark-page}) puts point before the current page,
|
||||
and mark at the end (@pxref{Pages}). The mark goes after the
|
||||
terminating page delimiter (to include it in the region), while point
|
||||
goes after the preceding page delimiter (to exclude it). A numeric
|
||||
argument specifies a later page (if positive) or an earlier page (if
|
||||
negative) instead of the current page.
|
||||
|
||||
Finally, @kbd{C-x h} (@code{mark-whole-buffer}) sets up the entire
|
||||
buffer as the region, by putting point at the beginning and the mark at
|
||||
the end. (In some programs this is called ``select all.'')
|
||||
|
||||
In Transient Mark mode, all of these commands activate the mark.
|
||||
|
||||
@node Mark Ring
|
||||
@section The Mark Ring
|
||||
|
||||
@kindex C-u C-SPC
|
||||
@cindex mark ring
|
||||
@kindex C-u C-@@
|
||||
Aside from delimiting the region, the mark is also useful for
|
||||
remembering a spot that you may want to go back to. To make this
|
||||
feature more useful, each buffer remembers 16 previous locations of the
|
||||
mark, in the @dfn{mark ring}. Commands that set the mark also push the
|
||||
old mark onto this ring. To return to a marked location, use @kbd{C-u
|
||||
C-@key{SPC}} (or @kbd{C-u C-@@}); this is the command
|
||||
@code{set-mark-command} given a numeric argument. It moves point to
|
||||
where the mark was, and restores the mark from the ring of former
|
||||
marks.
|
||||
|
||||
@vindex set-mark-command-repeat-pop
|
||||
If you set @code{set-mark-command-repeat-pop} to non-@code{nil},
|
||||
then when you repeat the character @kbd{C-@key{SPC}} after typing
|
||||
@kbd{C-u C-@key{SPC}}, each repetition moves point to a previous mark
|
||||
position from the ring. The mark positions you move through in this
|
||||
way are not lost; they go to the end of the ring.
|
||||
|
||||
Each buffer has its own mark ring. All editing commands use the current
|
||||
buffer's mark ring. In particular, @kbd{C-u C-@key{SPC}} always stays in
|
||||
the same buffer.
|
||||
|
||||
Many commands that can move long distances, such as @kbd{M-<}
|
||||
(@code{beginning-of-buffer}), start by setting the mark and saving the
|
||||
old mark on the mark ring. This is to make it easier for you to move
|
||||
back later. Searches set the mark if they move point. However, in
|
||||
Transient Mark mode, these commands do not set the mark when the mark
|
||||
is already active. You can tell when a command sets the mark because
|
||||
it displays @samp{Mark set} in the echo area.
|
||||
|
||||
If you want to move back to the same place over and over, the mark
|
||||
ring may not be convenient enough. If so, you can record the position
|
||||
in a register for later retrieval (@pxref{RegPos,, Saving Positions in
|
||||
Registers}).
|
||||
|
||||
@vindex mark-ring-max
|
||||
The variable @code{mark-ring-max} specifies the maximum number of
|
||||
entries to keep in the mark ring. If that many entries exist and
|
||||
another one is pushed, the earliest one in the list is discarded. Repeating
|
||||
@kbd{C-u C-@key{SPC}} cycles through the positions currently in the
|
||||
ring.
|
||||
|
||||
@vindex mark-ring
|
||||
The variable @code{mark-ring} holds the mark ring itself, as a list of
|
||||
marker objects, with the most recent first. This variable is local in
|
||||
every buffer.
|
||||
|
||||
@node Global Mark Ring
|
||||
@section The Global Mark Ring
|
||||
@cindex global mark ring
|
||||
|
||||
In addition to the ordinary mark ring that belongs to each buffer,
|
||||
Emacs has a single @dfn{global mark ring}. It records a sequence of
|
||||
buffers in which you have recently set the mark, so you can go back
|
||||
to those buffers.
|
||||
|
||||
Setting the mark always makes an entry on the current buffer's mark
|
||||
ring. If you have switched buffers since the previous mark setting, the
|
||||
new mark position makes an entry on the global mark ring also. The
|
||||
result is that the global mark ring records a sequence of buffers that
|
||||
you have been in, and, for each buffer, a place where you set the mark.
|
||||
|
||||
@kindex C-x C-@key{SPC}
|
||||
@findex pop-global-mark
|
||||
The command @kbd{C-x C-@key{SPC}} (@code{pop-global-mark}) jumps to
|
||||
the buffer and position of the latest entry in the global ring. It also
|
||||
rotates the ring, so that successive uses of @kbd{C-x C-@key{SPC}} take
|
||||
you to earlier and earlier buffers.
|
||||
|
||||
@ignore
|
||||
arch-tag: f35e4d82-911b-4cfc-a3d7-3c87b2abba20
|
||||
@end ignore
|
580
doc/emacs/mini.texi
Normal file
580
doc/emacs/mini.texi
Normal file
|
@ -0,0 +1,580 @@
|
|||
@c This is part of the Emacs manual.
|
||||
@c Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1997, 2000, 2001,
|
||||
@c 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
@c See file emacs.texi for copying conditions.
|
||||
@node Minibuffer, M-x, Basic, Top
|
||||
@chapter The Minibuffer
|
||||
@cindex minibuffer
|
||||
|
||||
The @dfn{minibuffer} is where Emacs commands read complicated
|
||||
arguments (anything more a single number). We call it the
|
||||
``minibuffer'' because it's a special-purpose buffer with a small
|
||||
amount of screen space. Minibuffer arguments can be file names,
|
||||
buffer names, Lisp function names, Emacs command names, Lisp
|
||||
expressions, and many other things---whatever the command wants to
|
||||
read. You can use the usual Emacs editing commands in the minibuffer
|
||||
to edit the argument text.
|
||||
|
||||
@cindex prompt
|
||||
When the minibuffer is in use, it appears in the echo area, with a
|
||||
cursor. The minibuffer display starts with a @dfn{prompt} in a
|
||||
distinct color; it says what kind of input is expected and how it will
|
||||
be used. Often the prompt is derived from the name of the command
|
||||
that is reading the argument. The prompt normally ends with a colon.
|
||||
|
||||
@cindex default argument
|
||||
Sometimes a @dfn{default argument} appears in the prompt, inside
|
||||
parentheses before the colon. The default will be used as the
|
||||
argument value if you just type @key{RET}. For example, commands that
|
||||
read buffer names show a buffer name as the default. You can type
|
||||
@key{RET} to operate on that default buffer.
|
||||
|
||||
The simplest way to enter a minibuffer argument is to type the text,
|
||||
then @key{RET} to exit the minibuffer. You can cancel the minibuffer,
|
||||
and the command that wants the argument, by typing @kbd{C-g}.
|
||||
|
||||
Since the minibuffer appears in the echo area, it can conflict with
|
||||
other uses of the echo area. Here is how Emacs handles such
|
||||
conflicts:
|
||||
|
||||
@itemize @bullet
|
||||
@item
|
||||
An error occurs while the minibuffer is active.
|
||||
|
||||
The error message hides the minibuffer for a few seconds, or until you
|
||||
type something. Then the minibuffer comes back.
|
||||
|
||||
@item
|
||||
A command such as @kbd{C-x =} needs to display a message in the echo
|
||||
area.
|
||||
|
||||
The message hides the minibuffer for a few seconds, or until you type
|
||||
something. Then the minibuffer comes back.
|
||||
|
||||
@item
|
||||
Keystrokes don't echo while the minibuffer is in use.
|
||||
@end itemize
|
||||
|
||||
@menu
|
||||
* File: Minibuffer File. Entering file names with the minibuffer.
|
||||
* Edit: Minibuffer Edit. How to edit in the minibuffer.
|
||||
* Completion:: An abbreviation facility for minibuffer input.
|
||||
* Minibuffer History:: Reusing recent minibuffer arguments.
|
||||
* Repetition:: Re-executing commands that used the minibuffer.
|
||||
@end menu
|
||||
|
||||
@node Minibuffer File
|
||||
@section Minibuffers for File Names
|
||||
|
||||
When you use the minibuffer to enter a file name, it starts out with
|
||||
some initial text---the @dfn{default directory}, ending in a slash.
|
||||
The file you specify will be in this directory unless you alter or
|
||||
replace it.
|
||||
|
||||
@c Separate paragraph to clean up ugly page break--rms
|
||||
@need 1500
|
||||
For example, if the minibuffer starts out with these contents:
|
||||
|
||||
@example
|
||||
Find File: /u2/emacs/src/
|
||||
@end example
|
||||
|
||||
@noindent
|
||||
(where @samp{Find File:@: } is the prompt), and you type
|
||||
@kbd{buffer.c} as input, that specifies the file
|
||||
@file{/u2/emacs/src/buffer.c}. You can specify the parent directory
|
||||
by adding @file{..}; thus, if you type @kbd{../lisp/simple.el}, you
|
||||
will get @file{/u2/emacs/lisp/simple.el}. Alternatively, you can use
|
||||
@kbd{M-@key{DEL}} to kill the directory names you don't want
|
||||
(@pxref{Words}).
|
||||
|
||||
You can kill the entire default with @kbd{C-a C-k}, but there's no
|
||||
need to do that. It's easier to ignore the default, and enter an
|
||||
absolute file name starting with a slash or a tilde after the default
|
||||
directory. For example, to specify @file{/etc/termcap}, just type
|
||||
that name:
|
||||
|
||||
@example
|
||||
Find File: /u2/emacs/src//etc/termcap
|
||||
@end example
|
||||
|
||||
@noindent
|
||||
@cindex // in file name
|
||||
@cindex double slash in file name
|
||||
@cindex slashes repeated in file name
|
||||
@findex file-name-shadow-mode
|
||||
GNU Emacs interprets a double slash (which is not normally useful in
|
||||
file names) as, ``ignore everything before the second slash in the
|
||||
pair.'' In the example above. @samp{/u2/emacs/src/} is ignored, so
|
||||
you get @file{/etc/termcap}. The ignored part of the file name is
|
||||
dimmed if the terminal allows it; to disable this dimming, turn off
|
||||
File Name Shadow mode (a minor mode) with the command
|
||||
@kbd{M-x file-name-shadow-mode}.
|
||||
|
||||
If the variable @code{insert-default-directory} is @code{nil}, the
|
||||
default directory is never inserted in the minibuffer---so the
|
||||
minibuffer starts out empty. Nonetheless, relative file name
|
||||
arguments are still interpreted based on the same default directory.
|
||||
|
||||
@node Minibuffer Edit
|
||||
@section Editing in the Minibuffer
|
||||
|
||||
The minibuffer is an Emacs buffer (albeit a peculiar one), and the
|
||||
usual Emacs commands are available for editing the argument text.
|
||||
|
||||
Since @key{RET} in the minibuffer is defined to exit the minibuffer,
|
||||
you can't use it to insert a newline in the minibuffer. To do that,
|
||||
type @kbd{C-o} or @kbd{C-q C-j}. (The newline character is really the
|
||||
@acronym{ASCII} character control-J.)
|
||||
|
||||
The minibuffer has its own window, which normally has space in the
|
||||
frame at all times, but it only acts like an Emacs window when the
|
||||
minibuffer is active. When active, this window is much like any other
|
||||
Emacs window; for instance, you can switch to another window (with
|
||||
@kbd{C-x o}), edit text there, then return to the minibuffer window to
|
||||
finish the argument. You can even kill text in another window, return
|
||||
to the minibuffer window, and then yank the text into the argument.
|
||||
@xref{Windows}.
|
||||
|
||||
@cindex height of minibuffer
|
||||
@cindex size of minibuffer
|
||||
@cindex growing minibuffer
|
||||
@cindex resizing minibuffer
|
||||
There are some restrictions on the minibuffer window, however: you
|
||||
cannot kill it, or split it, or switch buffers in it---the minibuffer
|
||||
and its window are permanently attached.
|
||||
|
||||
@vindex resize-mini-windows
|
||||
The minibuffer window expands vertically as necessary to hold the
|
||||
text that you put in the minibuffer. If @code{resize-mini-windows} is
|
||||
@code{t} (the default), the window always resizes as needed by its
|
||||
contents. If its value is the symbol @code{grow-only}, the window
|
||||
grows automatically as needed, but shrinks (back to the normal size)
|
||||
only when the minibuffer becomes inactive. If its value is
|
||||
@code{nil}, you have to adjust the height yourself.
|
||||
|
||||
@vindex max-mini-window-height
|
||||
The variable @code{max-mini-window-height} controls the maximum
|
||||
height for resizing the minibuffer window: a floating-point number
|
||||
specifies a fraction of the frame's height; an integer specifies the
|
||||
maximum number of lines; @code{nil} means do not resize the minibuffer
|
||||
window automatically. The default value is 0.25.
|
||||
|
||||
The @kbd{C-M-v} command in the minibuffer scrolls the help text from
|
||||
commands that display help text of any sort in another window.
|
||||
@kbd{M-@key{PAGEUP}} and @kbd{M-@key{PAGEDOWN}} also operate on that
|
||||
help text. This is especially useful with long lists of possible
|
||||
completions. @xref{Other Window}.
|
||||
|
||||
@vindex enable-recursive-minibuffers
|
||||
Emacs normally disallows most commands that use the minibuffer while
|
||||
the minibuffer is active. (Entering the minibuffer from the
|
||||
minibuffer can be confusing.) To allow such commands in the
|
||||
minibuffer, set the variable @code{enable-recursive-minibuffers} to
|
||||
@code{t}.
|
||||
|
||||
@node Completion
|
||||
@section Completion
|
||||
@cindex completion
|
||||
|
||||
Some arguments allow @dfn{completion} to enter their value. This
|
||||
means that after you type part of the argument, Emacs can fill in the
|
||||
rest, or some of it, based on what you have typed so far.
|
||||
|
||||
When completion is available, certain keys---@key{TAB}, @key{RET},
|
||||
and @key{SPC}---are rebound to complete the text in the minibuffer
|
||||
before point into a longer string chosen from a set of @dfn{completion
|
||||
alternatives} provided by the command that requested the argument.
|
||||
(@key{SPC} does not do completion in reading file names, because it is
|
||||
common to use spaces in file names on some systems.) @kbd{?} displays
|
||||
a list of the possible completions at any time.
|
||||
|
||||
For example, @kbd{M-x} uses the minibuffer to read the name of a
|
||||
command, so it provides a list of all Emacs command names for
|
||||
completion candidates. The completion keys match the minibuffer text
|
||||
against these candidates, find any additional name characters implied
|
||||
by the text already present in the minibuffer, and add those
|
||||
characters. This makes it possible to type @kbd{M-x ins @key{SPC} b
|
||||
@key{RET}} instead of @kbd{M-x insert-buffer @key{RET}}, for example.
|
||||
|
||||
Case is significant in completion when it is significant in the
|
||||
argument you are entering (buffer names, file names, command names,
|
||||
for instance). Thus, @samp{fo} does not complete to @samp{Foo}.
|
||||
Completion ignores case distinctions for certain arguments in which
|
||||
case does not matter.
|
||||
|
||||
Completion acts only on the text before point. If there is text in
|
||||
the minibuffer after point---i.e., if you move point backward after
|
||||
typing some text into the minibuffer---it remains unchanged.
|
||||
|
||||
@menu
|
||||
* Example: Completion Example. Examples of using completion.
|
||||
* Commands: Completion Commands. A list of completion commands.
|
||||
* Strict Completion:: Different types of completion.
|
||||
* Options: Completion Options. Options for completion.
|
||||
@end menu
|
||||
|
||||
@node Completion Example
|
||||
@subsection Completion Example
|
||||
|
||||
@kindex TAB @r{(completion)}
|
||||
A concrete example may help here. If you type @kbd{M-x au
|
||||
@key{TAB}}, the @key{TAB} looks for alternatives (in this case,
|
||||
command names) that start with @samp{au}. There are several,
|
||||
including @code{auto-fill-mode} and @code{auto-save-mode}, but they
|
||||
all begin with @code{auto-}, so the @samp{au} in the minibuffer
|
||||
completes to @samp{auto-}.
|
||||
|
||||
If you type @key{TAB} again immediately, it cannot determine the
|
||||
next character; it could be any of @samp{cfilrs}. So it does not add
|
||||
any characters; instead, @key{TAB} displays a list of all possible
|
||||
completions in another window.
|
||||
|
||||
Now type @kbd{f @key{TAB}}. This @key{TAB} sees @samp{auto-f}. The
|
||||
only command name starting with that is @code{auto-fill-mode}, so
|
||||
completion fills in the rest of that. You have been able to enter
|
||||
@samp{auto-fill-mode} by typing just @kbd{au @key{TAB} f @key{TAB}}.
|
||||
|
||||
@node Completion Commands
|
||||
@subsection Completion Commands
|
||||
|
||||
Here is a list of the completion commands defined in the minibuffer
|
||||
when completion is allowed.
|
||||
|
||||
@table @kbd
|
||||
@item @key{TAB}
|
||||
@findex minibuffer-complete
|
||||
Complete the text before point in the minibuffer as much as possible
|
||||
(@code{minibuffer-complete}).
|
||||
@item @key{SPC}
|
||||
Complete up to one word from the minibuffer text before point
|
||||
(@code{minibuffer-complete-word}). @key{SPC} for completion is not
|
||||
available when entering a file name, since file names often include
|
||||
spaces.
|
||||
@item @key{RET}
|
||||
Submit the text in the minibuffer as the argument, possibly completing
|
||||
first as described
|
||||
@iftex
|
||||
in the next subsection (@code{minibuffer-complete-and-exit}).
|
||||
@end iftex
|
||||
@ifnottex
|
||||
in the next node (@code{minibuffer-complete-and-exit}). @xref{Strict
|
||||
Completion}.
|
||||
@end ifnottex
|
||||
@item ?
|
||||
Display a list of possible completions of the text before point
|
||||
(@code{minibuffer-completion-help}).
|
||||
@end table
|
||||
|
||||
@kindex SPC
|
||||
@findex minibuffer-complete-word
|
||||
@key{SPC} completes like @key{TAB}, but only up to the next hyphen
|
||||
or space. If you have @samp{auto-f} in the minibuffer and type
|
||||
@key{SPC}, it finds that the completion is @samp{auto-fill-mode}, but
|
||||
it only inserts @samp{ill-}, giving @samp{auto-fill-}. Another
|
||||
@key{SPC} at this point completes all the way to
|
||||
@samp{auto-fill-mode}. The command that implements this behavior is
|
||||
called @code{minibuffer-complete-word}.
|
||||
|
||||
When you display a list of possible completions, you can choose
|
||||
one from it:
|
||||
|
||||
@table @kbd
|
||||
@findex mouse-choose-completion
|
||||
@item Mouse-1
|
||||
@itemx Mouse-2
|
||||
Clicking mouse button 1 or 2 on a completion possibility chooses that
|
||||
completion (@code{mouse-choose-completion}). You must click in the
|
||||
list of completions, not in the minibuffer.
|
||||
|
||||
@findex switch-to-completions
|
||||
@item @key{PRIOR}
|
||||
@itemx M-v
|
||||
Typing @key{PRIOR} or @key{PAGE-UP}, or @kbd{M-v}, while in the
|
||||
minibuffer, selects the window showing the completion list buffer
|
||||
(@code{switch-to-completions}). This paves the way for using the
|
||||
commands below. (Selecting that window in other ways has the same
|
||||
effect.)
|
||||
|
||||
@findex choose-completion
|
||||
@item @key{RET}
|
||||
Typing @key{RET} @emph{in the completion list buffer} chooses the
|
||||
completion that point is in or next to (@code{choose-completion}). To
|
||||
use this command, you must first switch to the completion list window.
|
||||
|
||||
@findex next-completion
|
||||
@item @key{RIGHT}
|
||||
Typing the right-arrow key @key{RIGHT} @emph{in the completion list
|
||||
buffer} moves point to the following completion possibility
|
||||
(@code{next-completion}).
|
||||
|
||||
@findex previous-completion
|
||||
@item @key{LEFT}
|
||||
Typing the left-arrow key @key{LEFT} @emph{in the completion list
|
||||
buffer} moves point to the previous completion possibility
|
||||
(@code{previous-completion}).
|
||||
@end table
|
||||
|
||||
@node Strict Completion
|
||||
@subsection Strict Completion
|
||||
|
||||
There are three different ways that @key{RET} can do completion,
|
||||
depending on how the argument will be used.
|
||||
|
||||
@itemize @bullet
|
||||
@item
|
||||
@dfn{Strict} completion accepts only known completion candidates. For
|
||||
example, when @kbd{C-x k} reads the name of a buffer to kill, only the
|
||||
name of an existing buffer makes sense. In strict completion,
|
||||
@key{RET} refuses to exit if the text in the minibuffer does not
|
||||
complete to an exact match.
|
||||
|
||||
@item
|
||||
@dfn{Cautious} completion is similar to strict completion, except that
|
||||
@key{RET} exits only if the text is an already exact match.
|
||||
Otherwise, @key{RET} does not exit, but it does complete the text. If
|
||||
that completes to an exact match, a second @key{RET} will exit.
|
||||
|
||||
Cautious completion is used for reading file names for files that must
|
||||
already exist, for example.
|
||||
|
||||
@item
|
||||
@dfn{Permissive} completion allows any input; the completion
|
||||
candidates are just suggestions. For example, when @kbd{C-x C-f}
|
||||
reads the name of a file to visit, any file name is allowed, including
|
||||
nonexistent file (in case you want to create a file). In permissive
|
||||
completion, @key{RET} does not complete, it just submits the argument
|
||||
as you have entered it.
|
||||
@end itemize
|
||||
|
||||
The completion commands display a list of all possible completions
|
||||
whenever they can't determine even one more character by completion.
|
||||
Also, typing @kbd{?} explicitly requests such a list. You can scroll
|
||||
the list with @kbd{C-M-v} (@pxref{Other Window}).
|
||||
|
||||
@node Completion Options
|
||||
@subsection Completion Options
|
||||
|
||||
@vindex completion-ignored-extensions
|
||||
@cindex ignored file names, in completion
|
||||
When completing file names, certain file names are usually ignored.
|
||||
The variable @code{completion-ignored-extensions} contains a list of
|
||||
strings; a file name ending in any of those strings is ignored as a
|
||||
completion candidate. The standard value of this variable has several
|
||||
elements including @code{".o"}, @code{".elc"}, @code{".dvi"} and
|
||||
@code{"~"}. The effect is that, for example, @samp{foo} can complete
|
||||
to @samp{foo.c} even though @samp{foo.o} exists as well. However, if
|
||||
@emph{all} the possible completions end in ``ignored'' strings, then
|
||||
they are not ignored. Displaying a list of possible completions
|
||||
disregards @code{completion-ignored-extensions}; it shows them all.
|
||||
|
||||
If an element of @code{completion-ignored-extensions} ends in a
|
||||
slash (@file{/}), it's a subdirectory name; then that directory and
|
||||
its contents are ignored. Elements of
|
||||
@code{completion-ignored-extensions} which do not end in a slash are
|
||||
ordinary file names, and do not apply to names of directories.
|
||||
|
||||
@vindex completion-auto-help
|
||||
If @code{completion-auto-help} is set to @code{nil}, the completion
|
||||
commands never display a list of possibilities; you must type @kbd{?}
|
||||
to display the list.
|
||||
|
||||
@cindex Partial Completion mode
|
||||
@vindex partial-completion-mode
|
||||
@findex partial-completion-mode
|
||||
Partial Completion mode implements a more powerful kind of
|
||||
completion that can complete multiple words in parallel. For example,
|
||||
it can complete the command name abbreviation @code{p-b} into
|
||||
@code{print-buffer} if no other command starts with two words whose
|
||||
initials are @samp{p} and @samp{b}.
|
||||
|
||||
To enable this mode, use @kbd{M-x partial-completion-mode}, or
|
||||
customize the variable @code{partial-completion-mode}. This mode
|
||||
binds special partial completion commands to @key{TAB}, @key{SPC},
|
||||
@key{RET}, and @kbd{?} in the minibuffer. The usual completion
|
||||
commands are available on @kbd{M-@key{TAB}} (or @kbd{C-M-i}),
|
||||
@kbd{M-@key{SPC}}, @kbd{M-@key{RET}} and @kbd{M-?}.
|
||||
|
||||
Partial completion of directories in file names uses @samp{*} to
|
||||
indicate the places for completion; thus, @file{/u*/b*/f*} might
|
||||
complete to @file{/usr/bin/foo}. For remote files, partial completion
|
||||
enables completion of methods, user names and host names.
|
||||
@xref{Remote Files}.
|
||||
|
||||
@vindex PC-include-file-path
|
||||
@vindex PC-disable-includes
|
||||
Partial Completion mode also extends @code{find-file} so that
|
||||
@samp{<@var{include}>} looks for the file named @var{include} in the
|
||||
directories in the path @code{PC-include-file-path}. If you set
|
||||
@code{PC-disable-includes} to non-@code{nil}, this feature is
|
||||
disabled.
|
||||
|
||||
@cindex Icomplete mode
|
||||
@findex icomplete-mode
|
||||
Icomplete mode presents a constantly-updated display that tells you
|
||||
what completions are available for the text you've entered so far. The
|
||||
command to enable or disable this minor mode is @kbd{M-x
|
||||
icomplete-mode}.
|
||||
|
||||
@node Minibuffer History
|
||||
@section Minibuffer History
|
||||
@cindex minibuffer history
|
||||
@cindex history of minibuffer input
|
||||
|
||||
Every argument that you enter with the minibuffer is saved on a
|
||||
@dfn{minibuffer history list} so you can easily use it again later.
|
||||
Special commands fetch the text of an earlier argument into the
|
||||
minibuffer, replacing the old minibuffer contents. You can think of
|
||||
them as moving through the history of previous arguments.
|
||||
|
||||
@table @kbd
|
||||
@item @key{UP}
|
||||
@itemx M-p
|
||||
Move to the previous item in the minibuffer history, an earlier argument
|
||||
(@code{previous-history-element}).
|
||||
@item @key{DOWN}
|
||||
@itemx M-n
|
||||
Move to the next item in the minibuffer history
|
||||
(@code{next-history-element}).
|
||||
@item M-r @var{regexp} @key{RET}
|
||||
Move to an earlier item in the minibuffer history that
|
||||
matches @var{regexp} (@code{previous-matching-history-element}).
|
||||
@item M-s @var{regexp} @key{RET}
|
||||
Move to a later item in the minibuffer history that matches
|
||||
@var{regexp} (@code{next-matching-history-element}).
|
||||
@end table
|
||||
|
||||
@kindex M-p @r{(minibuffer history)}
|
||||
@kindex M-n @r{(minibuffer history)}
|
||||
@findex next-history-element
|
||||
@findex previous-history-element
|
||||
To move through the minibuffer history list one item at a time, use
|
||||
@kbd{M-p} or up-arrow (@code{previous-history-element}) to fetch the
|
||||
next earlier minibuffer input, and use @kbd{M-n} or down-arrow
|
||||
(@code{next-history-element}) to fetch the next later input. These
|
||||
commands don't move the cursor, they pull different saved strings into
|
||||
the minibuffer. But you can think of them as ``moving'' through the
|
||||
history list.
|
||||
|
||||
The input that you fetch from the history entirely replaces the
|
||||
contents of the minibuffer. To use it again unchanged, just type
|
||||
@key{RET}. You can also edit the text before you reuse it; this does
|
||||
not change the history element that you ``moved'' to, but your new
|
||||
argument does go at the end of the history list in its own right.
|
||||
|
||||
For many minibuffer arguments there is a ``default'' value. You can
|
||||
insert the default value into the minibuffer as text by using
|
||||
@kbd{M-n}. You can think of this as moving ``into the future'' in the
|
||||
history.
|
||||
|
||||
@findex previous-matching-history-element
|
||||
@findex next-matching-history-element
|
||||
@kindex M-r @r{(minibuffer history)}
|
||||
@kindex M-s @r{(minibuffer history)}
|
||||
There are also commands to search forward or backward through the
|
||||
history; they search for history elements that match a regular
|
||||
expression. @kbd{M-r} (@code{previous-matching-history-element})
|
||||
searches older elements in the history, while @kbd{M-s}
|
||||
(@code{next-matching-history-element}) searches newer elements. These
|
||||
commands are unusual; they use the minibuffer to read the regular
|
||||
expression even though they are invoked from the minibuffer. As with
|
||||
incremental searching, an upper-case letter in the regular expression
|
||||
makes the search case-sensitive (@pxref{Search Case}).
|
||||
|
||||
@ignore
|
||||
We may change the precise way these commands read their arguments.
|
||||
Perhaps they will search for a match for the string given so far in the
|
||||
minibuffer; perhaps they will search for a literal match rather than a
|
||||
regular expression match; perhaps they will only accept matches at the
|
||||
beginning of a history element; perhaps they will read the string to
|
||||
search for incrementally like @kbd{C-s}. To find out what interface is
|
||||
actually available, type @kbd{C-h f previous-matching-history-element}.
|
||||
@end ignore
|
||||
|
||||
All uses of the minibuffer record your input on a history list, but
|
||||
there are separate history lists for different kinds of arguments.
|
||||
For example, there is a list for file names, used by all the commands
|
||||
that read file names. (As a special feature, this history list
|
||||
records the absolute file name, even if the name you entered was not
|
||||
absolute.)
|
||||
|
||||
There are several other specific history lists, including one for
|
||||
buffer names, one for arguments of commands like @code{query-replace},
|
||||
one used by @kbd{M-x} for command names, and one used by
|
||||
@code{compile} for compilation commands. Finally, there is one
|
||||
``miscellaneous'' history list that most minibuffer arguments use.
|
||||
|
||||
@vindex history-length
|
||||
The variable @code{history-length} specifies the maximum length of a
|
||||
minibuffer history list; adding a new element deletes the oldest
|
||||
element if the list gets too long. If the value of
|
||||
@code{history-length} is @code{t}, though, there is no maximum length.
|
||||
|
||||
@vindex history-delete-duplicates
|
||||
The variable @code{history-delete-duplicates} specifies whether to
|
||||
delete duplicates in history. If it is @code{t}, adding a new element
|
||||
deletes from the list all other elements that are equal to it.
|
||||
|
||||
@node Repetition
|
||||
@section Repeating Minibuffer Commands
|
||||
@cindex command history
|
||||
@cindex history of commands
|
||||
|
||||
Every command that uses the minibuffer once is recorded on a special
|
||||
history list, the @dfn{command history}, together with the values of
|
||||
its arguments, so that you can repeat the entire command. In
|
||||
particular, every use of @kbd{M-x} is recorded there, since @kbd{M-x}
|
||||
uses the minibuffer to read the command name.
|
||||
|
||||
@findex list-command-history
|
||||
@table @kbd
|
||||
@item C-x @key{ESC} @key{ESC}
|
||||
Re-execute a recent minibuffer command from the command history
|
||||
(@code{repeat-complex-command}).
|
||||
@item M-x list-command-history
|
||||
Display the entire command history, showing all the commands
|
||||
@kbd{C-x @key{ESC} @key{ESC}} can repeat, most recent first.
|
||||
@end table
|
||||
|
||||
@kindex C-x ESC ESC
|
||||
@findex repeat-complex-command
|
||||
@kbd{C-x @key{ESC} @key{ESC}} is used to re-execute a recent command
|
||||
that used the minibuffer. With no argument, it repeats the last such
|
||||
command. A numeric argument specifies which command to repeat; 1
|
||||
means the last one, 2 the previous, and so on.
|
||||
|
||||
@kbd{C-x @key{ESC} @key{ESC}} works by turning the previous command
|
||||
into a Lisp expression and then entering a minibuffer initialized with
|
||||
the text for that expression. Even if you don't understand Lisp
|
||||
syntax, it will probably be obvious which command is displayed for
|
||||
repetition. If you type just @key{RET}, that repeats the command
|
||||
unchanged. You can also change the command by editing the Lisp
|
||||
expression before you execute it. The repeated command is added to
|
||||
the front of the command history unless it is identical to the most
|
||||
recently item.
|
||||
|
||||
Once inside the minibuffer for @kbd{C-x @key{ESC} @key{ESC}}, you can
|
||||
use the minibuffer history commands (@kbd{M-p}, @kbd{M-n}, @kbd{M-r},
|
||||
@kbd{M-s}; @pxref{Minibuffer History}) to move through the history list
|
||||
of saved entire commands. After finding the desired previous command,
|
||||
you can edit its expression as usual and then repeat it by typing
|
||||
@key{RET}.
|
||||
|
||||
@vindex isearch-resume-in-command-history
|
||||
Incremental search does not, strictly speaking, use the minibuffer.
|
||||
Therefore, although it behaves like a complex command, it normally
|
||||
does not appear in the history list for @kbd{C-x @key{ESC} @key{ESC}}.
|
||||
You can make incremental search commands appear in the history by
|
||||
setting @code{isearch-resume-in-command-history} to a non-@code{nil}
|
||||
value. @xref{Incremental Search}.
|
||||
|
||||
@vindex command-history
|
||||
The list of previous minibuffer-using commands is stored as a Lisp
|
||||
list in the variable @code{command-history}. Each element is a Lisp
|
||||
expression which describes one command and its arguments. Lisp programs
|
||||
can re-execute a command by calling @code{eval} with the
|
||||
@code{command-history} element.
|
||||
|
||||
@ignore
|
||||
arch-tag: ba913cfd-b70e-400f-b663-22b2c309227f
|
||||
@end ignore
|
687
doc/emacs/msdog-xtra.texi
Normal file
687
doc/emacs/msdog-xtra.texi
Normal file
|
@ -0,0 +1,687 @@
|
|||
@c This is part of the Emacs manual.
|
||||
@c Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
@c See file emacs.texi for copying conditions.
|
||||
@c
|
||||
@c This file is included either in emacs-xtra.texi (when producing the
|
||||
@c printed version) or in the main Emacs manual (for the on-line version).
|
||||
@node MS-DOS
|
||||
@section Emacs and MS-DOS
|
||||
@cindex MS-DOG
|
||||
@cindex MS-DOS peculiarities
|
||||
|
||||
This section briefly describes the peculiarities of using Emacs on
|
||||
the MS-DOS ``operating system'' (also known as ``MS-DOG'').
|
||||
@iftex
|
||||
Information about Emacs and Microsoft's current operating system
|
||||
Windows (also known as ``Losedows) is in the main Emacs manual
|
||||
(@pxref{Microsoft Systems,,, emacs, the Emacs Manual}).
|
||||
@end iftex
|
||||
@ifnottex
|
||||
Information about peculiarities common to MS-DOS and Microsoft's
|
||||
current operating systems Windows (also known as ``Losedows) is in
|
||||
@ref{Microsoft Windows}.
|
||||
@end ifnottex
|
||||
|
||||
If you build Emacs for MS-DOS, the binary will also run on Windows
|
||||
3.X, Windows NT, Windows 9X/ME, Windows 2000/XP, or OS/2 as a DOS
|
||||
application; all of this chapter applies for all of those systems, if
|
||||
you use an Emacs that was built for MS-DOS.
|
||||
|
||||
@iftex
|
||||
@xref{Text and Binary,,,emacs, the Emacs Manual}, for information
|
||||
@end iftex
|
||||
@ifnottex
|
||||
@xref{Text and Binary}, for information
|
||||
@end ifnottex
|
||||
about Emacs' special handling of text files under MS-DOS (and Windows).
|
||||
|
||||
@menu
|
||||
* Keyboard: MS-DOS Keyboard. Keyboard conventions on MS-DOS.
|
||||
* Mouse: MS-DOS Mouse. Mouse conventions on MS-DOS.
|
||||
* Display: MS-DOS Display. Fonts, frames and display size on MS-DOS.
|
||||
* Files: MS-DOS File Names. File name conventions on MS-DOS.
|
||||
* Printing: MS-DOS Printing. Printing specifics on MS-DOS.
|
||||
* I18N: MS-DOS and MULE. Support for internationalization on MS-DOS.
|
||||
* Processes: MS-DOS Processes. Running subprocesses on MS-DOS.
|
||||
@end menu
|
||||
|
||||
@node MS-DOS Keyboard
|
||||
@subsection Keyboard Usage on MS-DOS
|
||||
|
||||
@kindex DEL @r{(MS-DOS)}
|
||||
@kindex BS @r{(MS-DOS)}
|
||||
The key that is called @key{DEL} in Emacs (because that's how it is
|
||||
designated on most workstations) is known as @key{BS} (backspace) on a
|
||||
PC. That is why the PC-specific terminal initialization remaps the
|
||||
@key{BS} key to act as @key{DEL}; the @key{DELETE} key is remapped to act
|
||||
as @kbd{C-d} for the same reasons.
|
||||
|
||||
@kindex C-g @r{(MS-DOS)}
|
||||
@kindex C-BREAK @r{(MS-DOS)}
|
||||
@cindex quitting on MS-DOS
|
||||
Emacs built for MS-DOS recognizes @kbd{C-@key{BREAK}} as a quit
|
||||
character, just like @kbd{C-g}. This is because Emacs cannot detect
|
||||
that you have typed @kbd{C-g} until it is ready for more input. As a
|
||||
consequence, you cannot use @kbd{C-g} to stop a running command
|
||||
@iftex
|
||||
(@pxref{Quitting,,,emacs, the Emacs Manual}).
|
||||
@end iftex
|
||||
@ifnottex
|
||||
(@pxref{Quitting}).
|
||||
@end ifnottex
|
||||
By contrast, @kbd{C-@key{BREAK}} @emph{is} detected as soon as you
|
||||
type it (as @kbd{C-g} is on other systems), so it can be used to stop
|
||||
a running command and for emergency escape
|
||||
@iftex
|
||||
(@pxref{Emergency Escape,,,emacs, the Emacs Manual}).
|
||||
@end iftex
|
||||
@ifnottex
|
||||
(@pxref{Emergency Escape}).
|
||||
@end ifnottex
|
||||
|
||||
@cindex Meta (under MS-DOS)
|
||||
@cindex Hyper (under MS-DOS)
|
||||
@cindex Super (under MS-DOS)
|
||||
@vindex dos-super-key
|
||||
@vindex dos-hyper-key
|
||||
The PC keyboard maps use the left @key{ALT} key as the @key{META} key.
|
||||
You have two choices for emulating the @key{SUPER} and @key{HYPER} keys:
|
||||
choose either the right @key{CTRL} key or the right @key{ALT} key by
|
||||
setting the variables @code{dos-hyper-key} and @code{dos-super-key} to 1
|
||||
or 2 respectively. If neither @code{dos-super-key} nor
|
||||
@code{dos-hyper-key} is 1, then by default the right @key{ALT} key is
|
||||
also mapped to the @key{META} key. However, if the MS-DOS international
|
||||
keyboard support program @file{KEYB.COM} is installed, Emacs will
|
||||
@emph{not} map the right @key{ALT} to @key{META}, since it is used for
|
||||
accessing characters like @kbd{~} and @kbd{@@} on non-US keyboard
|
||||
layouts; in this case, you may only use the left @key{ALT} as @key{META}
|
||||
key.
|
||||
|
||||
@kindex C-j @r{(MS-DOS)}
|
||||
@vindex dos-keypad-mode
|
||||
The variable @code{dos-keypad-mode} is a flag variable that controls
|
||||
what key codes are returned by keys in the numeric keypad. You can also
|
||||
define the keypad @key{ENTER} key to act like @kbd{C-j}, by putting the
|
||||
following line into your @file{_emacs} file:
|
||||
|
||||
@smallexample
|
||||
;; @r{Make the @key{ENTER} key from the numeric keypad act as @kbd{C-j}.}
|
||||
(define-key function-key-map [kp-enter] [?\C-j])
|
||||
@end smallexample
|
||||
|
||||
@node MS-DOS Mouse
|
||||
@subsection Mouse Usage on MS-DOS
|
||||
|
||||
@cindex mouse support under MS-DOS
|
||||
Emacs on MS-DOS supports a mouse (on the default terminal only).
|
||||
The mouse commands work as documented, including those that use menus
|
||||
and the menu bar
|
||||
@iftex
|
||||
(@pxref{Menu Bar,,,emacs, the Emacs Manual}).
|
||||
@end iftex
|
||||
@ifnottex
|
||||
(@pxref{Menu Bar}).
|
||||
@end ifnottex
|
||||
Scroll bars don't work in MS-DOS Emacs. PC mice usually have only
|
||||
two buttons; these act as @kbd{Mouse-1} and @kbd{Mouse-2}, but if you
|
||||
press both of them together, that has the effect of @kbd{Mouse-3}. If
|
||||
the mouse does have 3 buttons, Emacs detects that at startup, and all
|
||||
the 3 buttons function normally, as on X.
|
||||
|
||||
Help strings for menu-bar and pop-up menus are displayed in the echo
|
||||
area when the mouse pointer moves across the menu items. Highlighting
|
||||
of mouse-sensitive text
|
||||
@iftex
|
||||
(@pxref{Mouse References,,,emacs, the Emacs Manual})
|
||||
@end iftex
|
||||
@ifnottex
|
||||
(@pxref{Mouse References})
|
||||
@end ifnottex
|
||||
is also supported.
|
||||
|
||||
@cindex mouse, set number of buttons
|
||||
@findex msdos-set-mouse-buttons
|
||||
Some versions of mouse drivers don't report the number of mouse
|
||||
buttons correctly. For example, mice with a wheel report that they
|
||||
have 3 buttons, but only 2 of them are passed to Emacs; the clicks on
|
||||
the wheel, which serves as the middle button, are not passed. In
|
||||
these cases, you can use the @kbd{M-x msdos-set-mouse-buttons} command
|
||||
to tell Emacs how many mouse buttons to expect. You could make such a
|
||||
setting permanent by adding this fragment to your @file{_emacs} init
|
||||
file:
|
||||
|
||||
@example
|
||||
;; @r{Treat the mouse like a 2-button mouse.}
|
||||
(msdos-set-mouse-buttons 2)
|
||||
@end example
|
||||
|
||||
@cindex Windows clipboard support
|
||||
Emacs built for MS-DOS supports clipboard operations when it runs on
|
||||
Windows. Commands that put text on the kill ring, or yank text from
|
||||
the ring, check the Windows clipboard first, just as Emacs does on the
|
||||
X Window System
|
||||
@iftex
|
||||
(@pxref{Mouse Commands,,,emacs, the Emacs Manual}).
|
||||
@end iftex
|
||||
@ifnottex
|
||||
(@pxref{Mouse Commands}).
|
||||
@end ifnottex
|
||||
Only the primary selection and the cut buffer are supported by MS-DOS
|
||||
Emacs on Windows; the secondary selection always appears as empty.
|
||||
|
||||
Due to the way clipboard access is implemented by Windows, the
|
||||
length of text you can put into the clipboard is limited by the amount
|
||||
of free DOS memory that is available to Emacs. Usually, up to 620KB of
|
||||
text can be put into the clipboard, but this limit depends on the system
|
||||
configuration and is lower if you run Emacs as a subprocess of
|
||||
another program. If the killed text does not fit, Emacs outputs a
|
||||
message saying so, and does not put the text into the clipboard.
|
||||
|
||||
Null characters also cannot be put into the Windows clipboard. If the
|
||||
killed text includes null characters, Emacs does not put such text into
|
||||
the clipboard, and displays in the echo area a message to that effect.
|
||||
|
||||
@vindex dos-display-scancodes
|
||||
The variable @code{dos-display-scancodes}, when non-@code{nil},
|
||||
directs Emacs to display the @acronym{ASCII} value and the keyboard scan code of
|
||||
each keystroke; this feature serves as a complement to the
|
||||
@code{view-lossage} command, for debugging.
|
||||
|
||||
@node MS-DOS Display
|
||||
@subsection Display on MS-DOS
|
||||
@cindex faces under MS-DOS
|
||||
@cindex fonts, emulating under MS-DOS
|
||||
|
||||
Display on MS-DOS cannot use font variants, like bold or italic, but
|
||||
it does support multiple faces, each of which can specify a foreground
|
||||
and a background color. Therefore, you can get the full functionality
|
||||
of Emacs packages that use fonts (such as @code{font-lock}, Enriched
|
||||
Text mode, and others) by defining the relevant faces to use different
|
||||
colors. Use the @code{list-colors-display} command
|
||||
@iftex
|
||||
(@pxref{Frame Parameters,,,emacs, the Emacs Manual})
|
||||
@end iftex
|
||||
@ifnottex
|
||||
(@pxref{Frame Parameters})
|
||||
@end ifnottex
|
||||
and the @code{list-faces-display} command
|
||||
@iftex
|
||||
(@pxref{Faces,,,emacs, the Emacs Manual})
|
||||
@end iftex
|
||||
@ifnottex
|
||||
(@pxref{Faces})
|
||||
@end ifnottex
|
||||
to see what colors and faces are available and what they look like.
|
||||
|
||||
@xref{MS-DOS and MULE}, later in this chapter, for information on
|
||||
how Emacs displays glyphs and characters that aren't supported by the
|
||||
native font built into the DOS display.
|
||||
|
||||
@cindex cursor shape on MS-DOS
|
||||
When Emacs starts, it changes the cursor shape to a solid box. This
|
||||
is for compatibility with other systems, where the box cursor is the
|
||||
default in Emacs. This default shape can be changed to a bar by
|
||||
specifying the @code{cursor-type} parameter in the variable
|
||||
@code{default-frame-alist}
|
||||
@iftex
|
||||
(@pxref{Creating Frames,,,emacs, the Emacs Manual}).
|
||||
@end iftex
|
||||
@ifnottex
|
||||
(@pxref{Creating Frames}).
|
||||
@end ifnottex
|
||||
The MS-DOS terminal doesn't support a vertical-bar cursor,
|
||||
so the bar cursor is horizontal, and the @code{@var{width}} parameter,
|
||||
if specified by the frame parameters, actually determines its height.
|
||||
For this reason, the @code{bar} and @code{hbar} cursor types produce
|
||||
the same effect on MS-DOS. As an extension, the bar cursor
|
||||
specification can include the starting scan line of the cursor as well
|
||||
as its width, like this:
|
||||
|
||||
@example
|
||||
'(cursor-type bar @var{width} . @var{start})
|
||||
@end example
|
||||
|
||||
@noindent
|
||||
In addition, if the @var{width} parameter is negative, the cursor bar
|
||||
begins at the top of the character cell.
|
||||
|
||||
@cindex frames on MS-DOS
|
||||
The MS-DOS terminal can only display a single frame at a time. The
|
||||
Emacs frame facilities work on MS-DOS much as they do on text-only
|
||||
terminals
|
||||
@iftex
|
||||
(@pxref{Frames,,,emacs, the Emacs Manual}).
|
||||
@end iftex
|
||||
@ifnottex
|
||||
(@pxref{Frames}).
|
||||
@end ifnottex
|
||||
When you run Emacs from a DOS window on MS-Windows, you can make the
|
||||
visible frame smaller than the full screen, but Emacs still cannot
|
||||
display more than a single frame at a time.
|
||||
|
||||
@cindex frame size under MS-DOS
|
||||
@findex mode4350
|
||||
@findex mode25
|
||||
The @code{mode4350} command switches the display to 43 or 50
|
||||
lines, depending on your hardware; the @code{mode25} command switches
|
||||
to the default 80x25 screen size.
|
||||
|
||||
By default, Emacs only knows how to set screen sizes of 80 columns by
|
||||
25, 28, 35, 40, 43 or 50 rows. However, if your video adapter has
|
||||
special video modes that will switch the display to other sizes, you can
|
||||
have Emacs support those too. When you ask Emacs to switch the frame to
|
||||
@var{n} rows by @var{m} columns dimensions, it checks if there is a
|
||||
variable called @code{screen-dimensions-@var{n}x@var{m}}, and if so,
|
||||
uses its value (which must be an integer) as the video mode to switch
|
||||
to. (Emacs switches to that video mode by calling the BIOS @code{Set
|
||||
Video Mode} function with the value of
|
||||
@code{screen-dimensions-@var{n}x@var{m}} in the @code{AL} register.)
|
||||
For example, suppose your adapter will switch to 66x80 dimensions when
|
||||
put into video mode 85. Then you can make Emacs support this screen
|
||||
size by putting the following into your @file{_emacs} file:
|
||||
|
||||
@example
|
||||
(setq screen-dimensions-66x80 85)
|
||||
@end example
|
||||
|
||||
Since Emacs on MS-DOS can only set the frame size to specific
|
||||
supported dimensions, it cannot honor every possible frame resizing
|
||||
request. When an unsupported size is requested, Emacs chooses the next
|
||||
larger supported size beyond the specified size. For example, if you
|
||||
ask for 36x80 frame, you will get 40x80 instead.
|
||||
|
||||
The variables @code{screen-dimensions-@var{n}x@var{m}} are used only
|
||||
when they exactly match the specified size; the search for the next
|
||||
larger supported size ignores them. In the above example, even if your
|
||||
VGA supports 38x80 dimensions and you define a variable
|
||||
@code{screen-dimensions-38x80} with a suitable value, you will still get
|
||||
40x80 screen when you ask for a 36x80 frame. If you want to get the
|
||||
38x80 size in this case, you can do it by setting the variable named
|
||||
@code{screen-dimensions-36x80} with the same video mode value as
|
||||
@code{screen-dimensions-38x80}.
|
||||
|
||||
Changing frame dimensions on MS-DOS has the effect of changing all the
|
||||
other frames to the new dimensions.
|
||||
|
||||
@node MS-DOS File Names
|
||||
@subsection File Names on MS-DOS
|
||||
@cindex file names under MS-DOS
|
||||
@cindex init file, default name under MS-DOS
|
||||
|
||||
On MS-DOS, file names are case-insensitive and limited to eight
|
||||
characters, plus optionally a period and three more characters. Emacs
|
||||
knows enough about these limitations to handle file names that were
|
||||
meant for other operating systems. For instance, leading dots
|
||||
@samp{.} in file names are invalid in MS-DOS, so Emacs transparently
|
||||
converts them to underscores @samp{_}; thus your default init file
|
||||
@iftex
|
||||
(@pxref{Init File,,,emacs, the Emacs Manual})
|
||||
@end iftex
|
||||
@ifnottex
|
||||
(@pxref{Init File})
|
||||
@end ifnottex
|
||||
is called @file{_emacs} on MS-DOS. Excess characters before or after
|
||||
the period are generally ignored by MS-DOS itself; thus, if you visit
|
||||
the file @file{LongFileName.EvenLongerExtension}, you will silently
|
||||
get @file{longfile.eve}, but Emacs will still display the long file
|
||||
name on the mode line. Other than that, it's up to you to specify
|
||||
file names which are valid under MS-DOS; the transparent conversion as
|
||||
described above only works on file names built into Emacs.
|
||||
|
||||
@cindex backup file names on MS-DOS
|
||||
The above restrictions on the file names on MS-DOS make it almost
|
||||
impossible to construct the name of a backup file
|
||||
@iftex
|
||||
(@pxref{Backup Names,,,emacs, the Emacs Manual})
|
||||
@end iftex
|
||||
@ifnottex
|
||||
(@pxref{Backup Names})
|
||||
@end ifnottex
|
||||
without losing some of the original file name characters. For
|
||||
example, the name of a backup file for @file{docs.txt} is
|
||||
@file{docs.tx~} even if single backup is used.
|
||||
|
||||
@cindex file names under Windows 95/NT
|
||||
@cindex long file names in DOS box under Windows 95/NT
|
||||
If you run Emacs as a DOS application under Windows 9X, Windows ME, or
|
||||
Windows 2000/XP, you can turn on support for long file names. If you do
|
||||
that, Emacs doesn't truncate file names or convert them to lower case;
|
||||
instead, it uses the file names that you specify, verbatim. To enable
|
||||
long file name support, set the environment variable @env{LFN} to
|
||||
@samp{y} before starting Emacs. Unfortunately, Windows NT doesn't allow
|
||||
DOS programs to access long file names, so Emacs built for MS-DOS will
|
||||
only see their short 8+3 aliases.
|
||||
|
||||
@cindex @env{HOME} directory under MS-DOS
|
||||
MS-DOS has no notion of home directory, so Emacs on MS-DOS pretends
|
||||
that the directory where it is installed is the value of the @env{HOME}
|
||||
environment variable. That is, if your Emacs binary,
|
||||
@file{emacs.exe}, is in the directory @file{c:/utils/emacs/bin}, then
|
||||
Emacs acts as if @env{HOME} were set to @samp{c:/utils/emacs}. In
|
||||
particular, that is where Emacs looks for the init file @file{_emacs}.
|
||||
With this in mind, you can use @samp{~} in file names as an alias for
|
||||
the home directory, as you would on GNU or Unix. You can also set
|
||||
@env{HOME} variable in the environment before starting Emacs; its
|
||||
value will then override the above default behavior.
|
||||
|
||||
Emacs on MS-DOS handles the directory name @file{/dev} specially,
|
||||
because of a feature in the emulator libraries of DJGPP that pretends
|
||||
I/O devices have names in that directory. We recommend that you avoid
|
||||
using an actual directory named @file{/dev} on any disk.
|
||||
|
||||
@node MS-DOS Printing
|
||||
@subsection Printing and MS-DOS
|
||||
|
||||
Printing commands, such as @code{lpr-buffer}
|
||||
@iftex
|
||||
(@pxref{Printing,,,emacs, the Emacs Manual}) and @code{ps-print-buffer}
|
||||
(@pxref{PostScript,,,emacs, the Emacs Manual})
|
||||
@end iftex
|
||||
@ifnottex
|
||||
(@pxref{Printing}) and @code{ps-print-buffer} (@pxref{PostScript})
|
||||
@end ifnottex
|
||||
can work on MS-DOS by sending the output to one of the printer ports,
|
||||
if a Posix-style @code{lpr} program is unavailable. The same Emacs
|
||||
variables control printing on all systems, but in some cases they have
|
||||
different default values on MS-DOS.
|
||||
|
||||
@iftex
|
||||
@xref{Windows Printing,,,emacs, the Emacs Manual},
|
||||
@end iftex
|
||||
@ifnottex
|
||||
@xref{Windows Printing},
|
||||
@end ifnottex
|
||||
for details about setting up printing to a networked printer.
|
||||
|
||||
Some printers expect DOS codepage encoding of non-@acronym{ASCII} text, even
|
||||
though they are connected to a Windows machine which uses a different
|
||||
encoding for the same locale. For example, in the Latin-1 locale, DOS
|
||||
uses codepage 850 whereas Windows uses codepage 1252. @xref{MS-DOS and
|
||||
MULE}. When you print to such printers from Windows, you can use the
|
||||
@kbd{C-x RET c} (@code{universal-coding-system-argument}) command before
|
||||
@kbd{M-x lpr-buffer}; Emacs will then convert the text to the DOS
|
||||
codepage that you specify. For example, @kbd{C-x RET c cp850-dos RET
|
||||
M-x lpr-region RET} will print the region while converting it to the
|
||||
codepage 850 encoding. You may need to create the @code{cp@var{nnn}}
|
||||
coding system with @kbd{M-x codepage-setup}.
|
||||
|
||||
@vindex dos-printer
|
||||
@vindex dos-ps-printer
|
||||
For backwards compatibility, the value of @code{dos-printer}
|
||||
(@code{dos-ps-printer}), if it has a value, overrides the value of
|
||||
@code{printer-name} (@code{ps-printer-name}), on MS-DOS.
|
||||
|
||||
|
||||
@node MS-DOS and MULE
|
||||
@subsection International Support on MS-DOS
|
||||
@cindex international support @r{(MS-DOS)}
|
||||
|
||||
Emacs on MS-DOS supports the same international character sets as it
|
||||
does on GNU, Unix and other platforms
|
||||
@iftex
|
||||
(@pxref{International,,,emacs, the Emacs Manual}),
|
||||
@end iftex
|
||||
@ifnottex
|
||||
(@pxref{International}),
|
||||
@end ifnottex
|
||||
including coding systems for converting between the different
|
||||
character sets. However, due to incompatibilities between
|
||||
MS-DOS/MS-Windows and other systems, there are several DOS-specific
|
||||
aspects of this support that you should be aware of. This section
|
||||
describes these aspects.
|
||||
|
||||
The description below is largely specific to the MS-DOS port of
|
||||
Emacs, especially where it talks about practical implications for
|
||||
Emacs users. For other operating systems, see the @file{code-pages.el}
|
||||
package, which implements support for MS-DOS- and MS-Windows-specific
|
||||
encodings for all platforms other than MS-DOS.
|
||||
|
||||
@table @kbd
|
||||
@item M-x dos-codepage-setup
|
||||
Set up Emacs display and coding systems as appropriate for the current
|
||||
DOS codepage.
|
||||
|
||||
@item M-x codepage-setup
|
||||
Create a coding system for a certain DOS codepage.
|
||||
@end table
|
||||
|
||||
@cindex codepage, MS-DOS
|
||||
@cindex DOS codepages
|
||||
MS-DOS is designed to support one character set of 256 characters at
|
||||
any given time, but gives you a variety of character sets to choose
|
||||
from. The alternative character sets are known as @dfn{DOS codepages}.
|
||||
Each codepage includes all 128 @acronym{ASCII} characters, but the other 128
|
||||
characters (codes 128 through 255) vary from one codepage to another.
|
||||
Each DOS codepage is identified by a 3-digit number, such as 850, 862,
|
||||
etc.
|
||||
|
||||
In contrast to X, which lets you use several fonts at the same time,
|
||||
MS-DOS normally doesn't allow use of several codepages in a single
|
||||
session. MS-DOS was designed to load a single codepage at system
|
||||
startup, and require you to reboot in order to change
|
||||
it@footnote{Normally, one particular codepage is burnt into the
|
||||
display memory, while other codepages can be installed by modifying
|
||||
system configuration files, such as @file{CONFIG.SYS}, and rebooting.
|
||||
While there is third-party software that allows changing the codepage
|
||||
without rebooting, we describe here how a stock MS-DOS system
|
||||
behaves.}. Much the same limitation applies when you run DOS
|
||||
executables on other systems such as MS-Windows.
|
||||
|
||||
@cindex unibyte operation @r{(MS-DOS)}
|
||||
If you invoke Emacs on MS-DOS with the @samp{--unibyte} option
|
||||
@iftex
|
||||
(@pxref{Initial Options,,,emacs, the Emacs Manual}),
|
||||
@end iftex
|
||||
@ifnottex
|
||||
(@pxref{Initial Options}),
|
||||
@end ifnottex
|
||||
Emacs does not perform any conversion of non-@acronym{ASCII}
|
||||
characters. Instead, it reads and writes any non-@acronym{ASCII}
|
||||
characters verbatim, and sends their 8-bit codes to the display
|
||||
verbatim. Thus, unibyte Emacs on MS-DOS supports the current
|
||||
codepage, whatever it may be, but cannot even represent any other
|
||||
characters.
|
||||
|
||||
@vindex dos-codepage
|
||||
For multibyte operation on MS-DOS, Emacs needs to know which
|
||||
characters the chosen DOS codepage can display. So it queries the
|
||||
system shortly after startup to get the chosen codepage number, and
|
||||
stores the number in the variable @code{dos-codepage}. Some systems
|
||||
return the default value 437 for the current codepage, even though the
|
||||
actual codepage is different. (This typically happens when you use the
|
||||
codepage built into the display hardware.) You can specify a different
|
||||
codepage for Emacs to use by setting the variable @code{dos-codepage} in
|
||||
your init file.
|
||||
|
||||
@cindex language environment, automatic selection on @r{MS-DOS}
|
||||
Multibyte Emacs supports only certain DOS codepages: those which can
|
||||
display Far-Eastern scripts, like the Japanese codepage 932, and those
|
||||
that encode a single ISO 8859 character set.
|
||||
|
||||
The Far-Eastern codepages can directly display one of the MULE
|
||||
character sets for these countries, so Emacs simply sets up to use the
|
||||
appropriate terminal coding system that is supported by the codepage.
|
||||
The special features described in the rest of this section mostly
|
||||
pertain to codepages that encode ISO 8859 character sets.
|
||||
|
||||
For the codepages which correspond to one of the ISO character sets,
|
||||
Emacs knows the character set name based on the codepage number. Emacs
|
||||
automatically creates a coding system to support reading and writing
|
||||
files that use the current codepage, and uses this coding system by
|
||||
default. The name of this coding system is @code{cp@var{nnn}}, where
|
||||
@var{nnn} is the codepage number.@footnote{The standard Emacs coding
|
||||
systems for ISO 8859 are not quite right for the purpose, because
|
||||
typically the DOS codepage does not match the standard ISO character
|
||||
codes. For example, the letter @samp{@,{c}} (@samp{c} with cedilla) has
|
||||
code 231 in the standard Latin-1 character set, but the corresponding
|
||||
DOS codepage 850 uses code 135 for this glyph.}
|
||||
|
||||
@cindex mode line @r{(MS-DOS)}
|
||||
All the @code{cp@var{nnn}} coding systems use the letter @samp{D}
|
||||
(for ``DOS'') as their mode-line mnemonic. Since both the terminal
|
||||
coding system and the default coding system for file I/O are set to
|
||||
the proper @code{cp@var{nnn}} coding system at startup, it is normal
|
||||
for the mode line on MS-DOS to begin with @samp{-DD\-}.
|
||||
@iftex
|
||||
@xref{Mode Line,,,emacs, the Emacs Manual}.
|
||||
@end iftex
|
||||
@ifnottex
|
||||
@xref{Mode Line}.
|
||||
@end ifnottex
|
||||
Far-Eastern DOS terminals do not use the @code{cp@var{nnn}} coding
|
||||
systems, and thus their initial mode line looks like the Emacs
|
||||
default.
|
||||
|
||||
Since the codepage number also indicates which script you are using,
|
||||
Emacs automatically runs @code{set-language-environment} to select the
|
||||
language environment for that script
|
||||
@iftex
|
||||
(@pxref{Language Environments,,,emacs, the Emacs Manual}).
|
||||
@end iftex
|
||||
@ifnottex
|
||||
(@pxref{Language Environments}).
|
||||
@end ifnottex
|
||||
|
||||
If a buffer contains a character belonging to some other ISO 8859
|
||||
character set, not the one that the chosen DOS codepage supports, Emacs
|
||||
displays it using a sequence of @acronym{ASCII} characters. For example, if the
|
||||
current codepage doesn't have a glyph for the letter @samp{@`o} (small
|
||||
@samp{o} with a grave accent), it is displayed as @samp{@{`o@}}, where
|
||||
the braces serve as a visual indication that this is a single character.
|
||||
(This may look awkward for some non-Latin characters, such as those from
|
||||
Greek or Hebrew alphabets, but it is still readable by a person who
|
||||
knows the language.) Even though the character may occupy several
|
||||
columns on the screen, it is really still just a single character, and
|
||||
all Emacs commands treat it as one.
|
||||
|
||||
@cindex IBM graphics characters (MS-DOS)
|
||||
@cindex box-drawing characters (MS-DOS)
|
||||
@cindex line-drawing characters (MS-DOS)
|
||||
Not all characters in DOS codepages correspond to ISO 8859
|
||||
characters---some are used for other purposes, such as box-drawing
|
||||
characters and other graphics. Emacs maps these characters to two
|
||||
special character sets called @code{eight-bit-control} and
|
||||
@code{eight-bit-graphic}, and displays them as their IBM glyphs.
|
||||
However, you should be aware that other systems might display these
|
||||
characters differently, so you should avoid them in text that might be
|
||||
copied to a different operating system, or even to another DOS machine
|
||||
that uses a different codepage.
|
||||
|
||||
@vindex dos-unsupported-character-glyph
|
||||
Emacs supports many other characters sets aside from ISO 8859, but it
|
||||
cannot display them on MS-DOS. So if one of these multibyte characters
|
||||
appears in a buffer, Emacs on MS-DOS displays them as specified by the
|
||||
@code{dos-unsupported-character-glyph} variable; by default, this glyph
|
||||
is an empty triangle. Use the @kbd{C-u C-x =} command to display the
|
||||
actual code and character set of such characters.
|
||||
@iftex
|
||||
@xref{Position Info,,,emacs, the Emacs Manual}.
|
||||
@end iftex
|
||||
@ifnottex
|
||||
@xref{Position Info}.
|
||||
@end ifnottex
|
||||
|
||||
@findex codepage-setup
|
||||
By default, Emacs defines a coding system to support the current
|
||||
codepage. To define a coding system for some other codepage (e.g., to
|
||||
visit a file written on a DOS machine in another country), use the
|
||||
@kbd{M-x codepage-setup} command. It prompts for the 3-digit code of
|
||||
the codepage, with completion, then creates the coding system for the
|
||||
specified codepage. You can then use the new coding system to read and
|
||||
write files, but you must specify it explicitly for the file command
|
||||
when you want to use it
|
||||
@iftex
|
||||
(@pxref{Text Coding,,,emacs, the Emacs Manual}).
|
||||
@end iftex
|
||||
@ifnottex
|
||||
(@pxref{Text Coding}).
|
||||
@end ifnottex
|
||||
|
||||
These coding systems are also useful for visiting a file encoded using
|
||||
a DOS codepage, using Emacs running on some other operating system.
|
||||
|
||||
@cindex MS-Windows codepages
|
||||
MS-Windows provides its own codepages, which are different from the
|
||||
DOS codepages for the same locale. For example, DOS codepage 850
|
||||
supports the same character set as Windows codepage 1252; DOS codepage
|
||||
855 supports the same character set as Windows codepage 1251, etc.
|
||||
The MS-Windows version of Emacs uses the current codepage for display
|
||||
when invoked with the @samp{-nw} option. Support for codepages in the
|
||||
Windows port of Emacs is part of the @file{code-pages.el} package.
|
||||
|
||||
@node MS-DOS Processes
|
||||
@subsection Subprocesses on MS-DOS
|
||||
|
||||
@cindex compilation under MS-DOS
|
||||
@cindex inferior processes under MS-DOS
|
||||
@findex compile @r{(MS-DOS)}
|
||||
@findex grep @r{(MS-DOS)}
|
||||
Because MS-DOS is a single-process ``operating system,''
|
||||
asynchronous subprocesses are not available. In particular, Shell
|
||||
mode and its variants do not work. Most Emacs features that use
|
||||
asynchronous subprocesses also don't work on MS-DOS, including
|
||||
Shell mode and GUD. When in doubt, try and see; commands that
|
||||
don't work output an error message saying that asynchronous processes
|
||||
aren't supported.
|
||||
|
||||
Compilation under Emacs with @kbd{M-x compile}, searching files with
|
||||
@kbd{M-x grep} and displaying differences between files with @kbd{M-x
|
||||
diff} do work, by running the inferior processes synchronously. This
|
||||
means you cannot do any more editing until the inferior process
|
||||
finishes.
|
||||
|
||||
Spell checking also works, by means of special support for synchronous
|
||||
invocation of the @code{ispell} program. This is slower than the
|
||||
asynchronous invocation on other platforms
|
||||
|
||||
Instead of the Shell mode, which doesn't work on MS-DOS, you can use
|
||||
the @kbd{M-x eshell} command. This invokes the Eshell package that
|
||||
implements a Posix-like shell entirely in Emacs Lisp.
|
||||
|
||||
By contrast, Emacs compiled as a native Windows application
|
||||
@strong{does} support asynchronous subprocesses.
|
||||
@iftex
|
||||
@xref{Windows Processes,,,emacs, the Emacs Manual}.
|
||||
@end iftex
|
||||
@ifnottex
|
||||
@xref{Windows Processes}.
|
||||
@end ifnottex
|
||||
|
||||
@cindex printing under MS-DOS
|
||||
Printing commands, such as @code{lpr-buffer}
|
||||
@iftex
|
||||
(@pxref{Printing,,,emacs, the Emacs Manual}) and
|
||||
@code{ps-print-buffer} (@pxref{PostScript,,,emacs, the Emacs Manual}),
|
||||
work in MS-DOS by sending the output to one of the printer ports.
|
||||
@xref{MS-DOS Printing,,,emacs, the Emacs Manual}.
|
||||
@end iftex
|
||||
@ifnottex
|
||||
(@pxref{Printing}) and @code{ps-print-buffer} (@pxref{PostScript}),
|
||||
work in MS-DOS by sending the output to one of the printer ports.
|
||||
@xref{MS-DOS Printing}.
|
||||
@end ifnottex
|
||||
|
||||
When you run a subprocess synchronously on MS-DOS, make sure the
|
||||
program terminates and does not try to read keyboard input. If the
|
||||
program does not terminate on its own, you will be unable to terminate
|
||||
it, because MS-DOS provides no general way to terminate a process.
|
||||
Pressing @kbd{C-c} or @kbd{C-@key{BREAK}} might sometimes help in these
|
||||
cases.
|
||||
|
||||
Accessing files on other machines is not supported on MS-DOS. Other
|
||||
network-oriented commands such as sending mail, Web browsing, remote
|
||||
login, etc., don't work either, unless network access is built into
|
||||
MS-DOS with some network redirector.
|
||||
|
||||
@cindex directory listing on MS-DOS
|
||||
@vindex dired-listing-switches @r{(MS-DOS)}
|
||||
Dired on MS-DOS uses the @code{ls-lisp} package where other
|
||||
platforms use the system @code{ls} command. Therefore, Dired on
|
||||
MS-DOS supports only some of the possible options you can mention in
|
||||
the @code{dired-listing-switches} variable. The options that work are
|
||||
@samp{-A}, @samp{-a}, @samp{-c}, @samp{-i}, @samp{-r}, @samp{-S},
|
||||
@samp{-s}, @samp{-t}, and @samp{-u}.
|
||||
|
||||
@ignore
|
||||
arch-tag: 868d50ff-07f8-4a13-a807-dab6f1cdb431
|
||||
@end ignore
|
291
doc/emacs/picture-xtra.texi
Normal file
291
doc/emacs/picture-xtra.texi
Normal file
|
@ -0,0 +1,291 @@
|
|||
@c This is part of the Emacs manual.
|
||||
@c Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
@c See file emacs.texi for copying conditions.
|
||||
@c
|
||||
@c This file is included either in emacs-xtra.texi (when producing the
|
||||
@c printed version) or in the main Emacs manual (for the on-line version).
|
||||
@node Picture Mode
|
||||
@chapter Editing Pictures
|
||||
@cindex pictures
|
||||
@cindex making pictures out of text characters
|
||||
@findex edit-picture
|
||||
|
||||
To edit a picture made out of text characters (for example, a picture
|
||||
of the division of a register into fields, as a comment in a program),
|
||||
use the command @kbd{M-x edit-picture} to enter Picture mode.
|
||||
|
||||
In Picture mode, editing is based on the @dfn{quarter-plane} model of
|
||||
text, according to which the text characters lie studded on an area that
|
||||
stretches infinitely far to the right and downward. The concept of the end
|
||||
of a line does not exist in this model; the most you can say is where the
|
||||
last nonblank character on the line is found.
|
||||
|
||||
Of course, Emacs really always considers text as a sequence of
|
||||
characters, and lines really do have ends. But Picture mode replaces
|
||||
the most frequently-used commands with variants that simulate the
|
||||
quarter-plane model of text. They do this by inserting spaces or by
|
||||
converting tabs to spaces.
|
||||
|
||||
Most of the basic editing commands of Emacs are redefined by Picture mode
|
||||
to do essentially the same thing but in a quarter-plane way. In addition,
|
||||
Picture mode defines various keys starting with the @kbd{C-c} prefix to
|
||||
run special picture editing commands.
|
||||
|
||||
One of these keys, @kbd{C-c C-c}, is particularly important. Often a
|
||||
picture is part of a larger file that is usually edited in some other
|
||||
major mode. @kbd{M-x edit-picture} records the name of the previous
|
||||
major mode so you can use the @kbd{C-c C-c} command
|
||||
(@code{picture-mode-exit}) later to go back to that mode. @kbd{C-c C-c}
|
||||
also deletes spaces from the ends of lines, unless given a numeric
|
||||
argument.
|
||||
|
||||
The special commands of Picture mode all work in other modes (provided
|
||||
the @file{picture} library is loaded), but are not bound to keys except
|
||||
in Picture mode. The descriptions below talk of moving ``one column''
|
||||
and so on, but all the picture mode commands handle numeric arguments as
|
||||
their normal equivalents do.
|
||||
|
||||
@vindex picture-mode-hook
|
||||
Turning on Picture mode runs the hook @code{picture-mode-hook}.
|
||||
Additional extensions to Picture mode can be found in
|
||||
@file{artist.el}.
|
||||
|
||||
@menu
|
||||
* Basic Picture:: Basic concepts and simple commands of Picture Mode.
|
||||
* Insert in Picture:: Controlling direction of cursor motion
|
||||
after "self-inserting" characters.
|
||||
* Tabs in Picture:: Various features for tab stops and indentation.
|
||||
* Rectangles in Picture:: Clearing and superimposing rectangles.
|
||||
@end menu
|
||||
|
||||
@node Basic Picture
|
||||
@section Basic Editing in Picture Mode
|
||||
|
||||
@findex picture-forward-column
|
||||
@findex picture-backward-column
|
||||
@findex picture-move-down
|
||||
@findex picture-move-up
|
||||
@cindex editing in Picture mode
|
||||
|
||||
Most keys do the same thing in Picture mode that they usually do, but
|
||||
do it in a quarter-plane style. For example, @kbd{C-f} is rebound to
|
||||
run @code{picture-forward-column}, a command which moves point one
|
||||
column to the right, inserting a space if necessary so that the actual
|
||||
end of the line makes no difference. @kbd{C-b} is rebound to run
|
||||
@code{picture-backward-column}, which always moves point left one
|
||||
column, converting a tab to multiple spaces if necessary. @kbd{C-n} and
|
||||
@kbd{C-p} are rebound to run @code{picture-move-down} and
|
||||
@code{picture-move-up}, which can either insert spaces or convert tabs
|
||||
as necessary to make sure that point stays in exactly the same column.
|
||||
@kbd{C-e} runs @code{picture-end-of-line}, which moves to after the last
|
||||
nonblank character on the line. There is no need to change @kbd{C-a},
|
||||
as the choice of screen model does not affect beginnings of
|
||||
lines.
|
||||
|
||||
@findex picture-newline
|
||||
Insertion of text is adapted to the quarter-plane screen model
|
||||
through the use of Overwrite mode
|
||||
@iftex
|
||||
(@pxref{Minor Modes,,, emacs, the Emacs Manual}.)
|
||||
@end iftex
|
||||
@ifnottex
|
||||
(@pxref{Minor Modes}.)
|
||||
@end ifnottex
|
||||
Self-inserting characters replace existing text, column by column,
|
||||
rather than pushing existing text to the right. @key{RET} runs
|
||||
@code{picture-newline}, which just moves to the beginning of the
|
||||
following line so that new text will replace that line.
|
||||
|
||||
@findex picture-backward-clear-column
|
||||
@findex picture-clear-column
|
||||
@findex picture-clear-line
|
||||
In Picture mode, the commands that normally delete or kill text,
|
||||
instead erase text (replacing it with spaces). @key{DEL}
|
||||
(@code{picture-backward-clear-column}) replaces the preceding
|
||||
character with a space rather than removing it; this moves point
|
||||
backwards. @kbd{C-d} (@code{picture-clear-column}) replaces the next
|
||||
character or characters with spaces, but does not move point. (If you
|
||||
want to clear characters to spaces and move forward over them, use
|
||||
@key{SPC}.) @kbd{C-k} (@code{picture-clear-line}) really kills the
|
||||
contents of lines, but does not delete the newlines from the buffer.
|
||||
|
||||
@findex picture-open-line
|
||||
To do actual insertion, you must use special commands. @kbd{C-o}
|
||||
(@code{picture-open-line}) creates a blank line after the current
|
||||
line; it never splits a line. @kbd{C-M-o} (@code{split-line}) makes
|
||||
sense in Picture mode, so it is not changed. @kbd{C-j}
|
||||
(@code{picture-duplicate-line}) inserts another line with the same
|
||||
contents below the current line.
|
||||
|
||||
@kindex C-c C-d @r{(Picture mode)}
|
||||
To do actual deletion in Picture mode, use @kbd{C-w}, @kbd{C-c C-d}
|
||||
(which is defined as @code{delete-char}, as @kbd{C-d} is in other
|
||||
modes), or one of the picture rectangle commands (@pxref{Rectangles in
|
||||
Picture}).
|
||||
|
||||
@node Insert in Picture
|
||||
@section Controlling Motion after Insert
|
||||
|
||||
@findex picture-movement-up
|
||||
@findex picture-movement-down
|
||||
@findex picture-movement-left
|
||||
@findex picture-movement-right
|
||||
@findex picture-movement-nw
|
||||
@findex picture-movement-ne
|
||||
@findex picture-movement-sw
|
||||
@findex picture-movement-se
|
||||
@kindex C-c < @r{(Picture mode)}
|
||||
@kindex C-c > @r{(Picture mode)}
|
||||
@kindex C-c ^ @r{(Picture mode)}
|
||||
@kindex C-c . @r{(Picture mode)}
|
||||
@kindex C-c ` @r{(Picture mode)}
|
||||
@kindex C-c ' @r{(Picture mode)}
|
||||
@kindex C-c / @r{(Picture mode)}
|
||||
@kindex C-c \ @r{(Picture mode)}
|
||||
Since ``self-inserting'' characters in Picture mode overwrite and move
|
||||
point, there is no essential restriction on how point should be moved.
|
||||
Normally point moves right, but you can specify any of the eight
|
||||
orthogonal or diagonal directions for motion after a ``self-inserting''
|
||||
character. This is useful for drawing lines in the buffer.
|
||||
|
||||
@table @kbd
|
||||
@item C-c <
|
||||
@itemx C-c @key{LEFT}
|
||||
Move left after insertion (@code{picture-movement-left}).
|
||||
@item C-c >
|
||||
@itemx C-c @key{RIGHT}
|
||||
Move right after insertion (@code{picture-movement-right}).
|
||||
@item C-c ^
|
||||
@itemx C-c @key{UP}
|
||||
Move up after insertion (@code{picture-movement-up}).
|
||||
@item C-c .
|
||||
@itemx C-c @key{DOWN}
|
||||
Move down after insertion (@code{picture-movement-down}).
|
||||
@item C-c `
|
||||
@itemx C-c @key{HOME}
|
||||
Move up and left (``northwest'') after insertion (@code{picture-movement-nw}).
|
||||
@item C-c '
|
||||
@itemx C-c @key{PAGEUP}
|
||||
Move up and right (``northeast'') after insertion
|
||||
(@code{picture-movement-ne}).
|
||||
@item C-c /
|
||||
@itemx C-c @key{END}
|
||||
Move down and left (``southwest'') after insertion
|
||||
@*(@code{picture-movement-sw}).
|
||||
@item C-c \
|
||||
@itemx C-c @key{PAGEDOWN}
|
||||
Move down and right (``southeast'') after insertion
|
||||
@*(@code{picture-movement-se}).
|
||||
@end table
|
||||
|
||||
@kindex C-c C-f @r{(Picture mode)}
|
||||
@kindex C-c C-b @r{(Picture mode)}
|
||||
@findex picture-motion
|
||||
@findex picture-motion-reverse
|
||||
Two motion commands move based on the current Picture insertion
|
||||
direction. The command @kbd{C-c C-f} (@code{picture-motion}) moves in the
|
||||
same direction as motion after ``insertion'' currently does, while @kbd{C-c
|
||||
C-b} (@code{picture-motion-reverse}) moves in the opposite direction.
|
||||
|
||||
@node Tabs in Picture
|
||||
@section Picture Mode Tabs
|
||||
|
||||
@kindex M-TAB @r{(Picture mode)}
|
||||
@findex picture-tab-search
|
||||
@vindex picture-tab-chars
|
||||
Two kinds of tab-like action are provided in Picture mode. Use
|
||||
@kbd{M-@key{TAB}} (@code{picture-tab-search}) for context-based tabbing.
|
||||
With no argument, it moves to a point underneath the next
|
||||
``interesting'' character that follows whitespace in the previous
|
||||
nonblank line. ``Next'' here means ``appearing at a horizontal position
|
||||
greater than the one point starts out at.'' With an argument, as in
|
||||
@kbd{C-u M-@key{TAB}}, this command moves to the next such interesting
|
||||
character in the current line. @kbd{M-@key{TAB}} does not change the
|
||||
text; it only moves point. ``Interesting'' characters are defined by
|
||||
the variable @code{picture-tab-chars}, which should define a set of
|
||||
characters. The syntax for this variable is like the syntax used inside
|
||||
of @samp{[@dots{}]} in a regular expression---but without the @samp{[}
|
||||
and the @samp{]}. Its default value is @code{"!-~"}.
|
||||
|
||||
@findex picture-tab
|
||||
@key{TAB} itself runs @code{picture-tab}, which operates based on the
|
||||
current tab stop settings; it is the Picture mode equivalent of
|
||||
@code{tab-to-tab-stop}. Normally it just moves point, but with a numeric
|
||||
argument it clears the text that it moves over.
|
||||
|
||||
@kindex C-c TAB @r{(Picture mode)}
|
||||
@findex picture-set-tab-stops
|
||||
The context-based and tab-stop-based forms of tabbing are brought
|
||||
together by the command @kbd{C-c @key{TAB}} (@code{picture-set-tab-stops}).
|
||||
This command sets the tab stops to the positions which @kbd{M-@key{TAB}}
|
||||
would consider significant in the current line. The use of this command,
|
||||
together with @key{TAB}, can get the effect of context-based tabbing. But
|
||||
@kbd{M-@key{TAB}} is more convenient in the cases where it is sufficient.
|
||||
|
||||
It may be convenient to prevent use of actual tab characters in
|
||||
pictures. For example, this prevents @kbd{C-x @key{TAB}} from messing
|
||||
up the picture. You can do this by setting the variable
|
||||
@code{indent-tabs-mode} to @code{nil}.
|
||||
|
||||
@node Rectangles in Picture
|
||||
@section Picture Mode Rectangle Commands
|
||||
@cindex rectangles and Picture mode
|
||||
@cindex Picture mode and rectangles
|
||||
|
||||
Picture mode defines commands for working on rectangular pieces of
|
||||
the text in ways that fit with the quarter-plane model. The standard
|
||||
rectangle commands may also be useful.
|
||||
@iftex
|
||||
@xref{Rectangles,,, emacs, the Emacs Manual}.
|
||||
@end iftex
|
||||
@ifnottex
|
||||
@xref{Rectangles}.
|
||||
@end ifnottex
|
||||
|
||||
@table @kbd
|
||||
@item C-c C-k
|
||||
Clear out the region-rectangle with spaces
|
||||
(@code{picture-clear-rectangle}). With argument, delete the text.
|
||||
@item C-c C-w @var{r}
|
||||
Similar, but save rectangle contents in register @var{r} first
|
||||
(@code{picture-clear-rectangle-to-register}).
|
||||
@item C-c C-y
|
||||
Copy last killed rectangle into the buffer by overwriting, with upper
|
||||
left corner at point (@code{picture-yank-rectangle}). With argument,
|
||||
insert instead.
|
||||
@item C-c C-x @var{r}
|
||||
Similar, but use the rectangle in register @var{r}
|
||||
(@code{picture-yank-rectangle-from-register}).
|
||||
@end table
|
||||
|
||||
@kindex C-c C-k @r{(Picture mode)}
|
||||
@kindex C-c C-w @r{(Picture mode)}
|
||||
@findex picture-clear-rectangle
|
||||
@findex picture-clear-rectangle-to-register
|
||||
The picture rectangle commands @kbd{C-c C-k}
|
||||
(@code{picture-clear-rectangle}) and @kbd{C-c C-w}
|
||||
(@code{picture-clear-rectangle-to-register}) differ from the standard
|
||||
rectangle commands in that they normally clear the rectangle instead of
|
||||
deleting it; this is analogous with the way @kbd{C-d} is changed in Picture
|
||||
mode.
|
||||
|
||||
However, deletion of rectangles can be useful in Picture mode, so
|
||||
these commands delete the rectangle if given a numeric argument.
|
||||
@kbd{C-c C-k} either with or without a numeric argument saves the
|
||||
rectangle for @kbd{C-c C-y}.
|
||||
|
||||
@kindex C-c C-y @r{(Picture mode)}
|
||||
@kindex C-c C-x @r{(Picture mode)}
|
||||
@findex picture-yank-rectangle
|
||||
@findex picture-yank-rectangle-from-register
|
||||
The Picture mode commands for yanking rectangles differ from the
|
||||
standard ones in that they overwrite instead of inserting. This is
|
||||
the same way that Picture mode insertion of other text differs from
|
||||
other modes. @kbd{C-c C-y} (@code{picture-yank-rectangle}) inserts
|
||||
(by overwriting) the rectangle that was most recently killed, while
|
||||
@kbd{C-c C-x} (@code{picture-yank-rectangle-from-register}) does
|
||||
likewise for the rectangle found in a specified register.
|
||||
|
||||
@ignore
|
||||
arch-tag: 10e423ad-d896-42f2-a7e8-7018adeaf8c2
|
||||
@end ignore
|
1773
doc/emacs/programs.texi
Normal file
1773
doc/emacs/programs.texi
Normal file
File diff suppressed because it is too large
Load diff
|
@ -955,27 +955,36 @@ Rmail by saving the Rmail file and switching to another buffer.
|
|||
|
||||
@node Rmail Sorting
|
||||
@section Sorting the Rmail File
|
||||
@cindex sorting Rmail file
|
||||
@cindex Rmail file sorting
|
||||
|
||||
@table @kbd
|
||||
@findex rmail-sort-by-date
|
||||
@item M-x rmail-sort-by-date
|
||||
Sort messages of current Rmail file by date.
|
||||
|
||||
@findex rmail-sort-by-subject
|
||||
@item M-x rmail-sort-by-subject
|
||||
Sort messages of current Rmail file by subject.
|
||||
|
||||
@findex rmail-sort-by-author
|
||||
@item M-x rmail-sort-by-author
|
||||
Sort messages of current Rmail file by author's name.
|
||||
|
||||
@findex rmail-sort-by-recipient
|
||||
@item M-x rmail-sort-by-recipient
|
||||
Sort messages of current Rmail file by recipient's names.
|
||||
|
||||
@findex rmail-sort-by-correspondent
|
||||
@item M-x rmail-sort-by-correspondent
|
||||
Sort messages of current Rmail file by the name of the other
|
||||
correspondent.
|
||||
|
||||
@findex rmail-sort-by-lines
|
||||
@item M-x rmail-sort-by-lines
|
||||
Sort messages of current Rmail file by size (number of lines).
|
||||
|
||||
@findex rmail-sort-by-keywords
|
||||
@item M-x rmail-sort-by-keywords @key{RET} @var{labels} @key{RET}
|
||||
Sort messages of current Rmail file by labels. The argument
|
||||
@var{labels} should be a comma-separated list of labels. The order of
|
1361
doc/emacs/search.texi
Normal file
1361
doc/emacs/search.texi
Normal file
File diff suppressed because it is too large
Load diff
|
@ -486,9 +486,11 @@ The section on init files says how to arrange this permanently for yourself.
|
|||
|
||||
@table @kbd
|
||||
@item M-q
|
||||
Fill current paragraph (@code{fill-paragraph}).
|
||||
Fill current paragraph or active region (@code{fill-paragraph-or-region}).
|
||||
@item C-x f
|
||||
Set the fill column (@code{set-fill-column}).
|
||||
@item M-x fill-paragraph
|
||||
Fill current paragraph (@code{fill-paragraph}).
|
||||
@item M-x fill-region
|
||||
Fill each paragraph in the region (@code{fill-region}).
|
||||
@item M-x fill-region-as-paragraph
|
||||
|
@ -497,34 +499,39 @@ Fill the region, considering it as one paragraph.
|
|||
Center a line.
|
||||
@end table
|
||||
|
||||
@kindex M-q
|
||||
@findex fill-paragraph
|
||||
To refill a paragraph, use the command @kbd{M-q}
|
||||
(@code{fill-paragraph}). This operates on the paragraph that point is
|
||||
inside, or the one after point if point is between paragraphs.
|
||||
Refilling works by removing all the line-breaks, then inserting new ones
|
||||
where necessary.
|
||||
To refill a paragraph, use @kbd{M-x fill-paragraph}. This operates
|
||||
on the paragraph that point is inside, or the one after point if point
|
||||
is between paragraphs. Refilling works by removing all the
|
||||
line-breaks, then inserting new ones where necessary.
|
||||
|
||||
@findex fill-region
|
||||
To refill many paragraphs, use @kbd{M-x fill-region}, which
|
||||
finds the paragraphs in the region and fills each of them.
|
||||
|
||||
@kindex M-q
|
||||
@findex fill-paragraph-or-region
|
||||
The command @kbd{M-q} (@code{fill-paragraph-or-region}), operates on
|
||||
the active region like @code{fill-region} when the mark is active in
|
||||
Transient Mark mode. Otherwise, it operates on the current paragraph
|
||||
like @code{fill-paragraph}.
|
||||
|
||||
@findex fill-region-as-paragraph
|
||||
@kbd{M-q} and @code{fill-region} use the same criteria as @kbd{M-h}
|
||||
for finding paragraph boundaries (@pxref{Paragraphs}). For more
|
||||
control, you can use @kbd{M-x fill-region-as-paragraph}, which refills
|
||||
everything between point and mark as a single paragraph. This command
|
||||
deletes any blank lines within the region, so separate blocks of text
|
||||
end up combined into one block.
|
||||
@kbd{M-q}, @code{fill-paragraph} and @code{fill-region} use the same
|
||||
criteria as @kbd{M-h} for finding paragraph boundaries (@pxref{Paragraphs}).
|
||||
For more control, you can use @kbd{M-x fill-region-as-paragraph},
|
||||
which refills everything between point and mark as a single paragraph.
|
||||
This command deletes any blank lines within the region, so separate
|
||||
blocks of text end up combined into one block.
|
||||
|
||||
@cindex justification
|
||||
A numeric argument to @kbd{M-q} tells it to @dfn{justify} the text
|
||||
as well as filling it. This means that extra spaces are inserted to
|
||||
make the right margin line up exactly at the fill column. To remove
|
||||
the extra spaces, use @kbd{M-q} with no argument. (Likewise for
|
||||
@code{fill-region}.) Another way to control justification, and choose
|
||||
other styles of filling, is with the @code{justification} text
|
||||
property; see @ref{Format Justification}.
|
||||
@code{fill-paragraph} and @code{fill-region}.) Another way to control
|
||||
justification, and choose other styles of filling, is with the
|
||||
@code{justification} text property; see @ref{Format Justification}.
|
||||
|
||||
@kindex M-s @r{(Text mode)}
|
||||
@cindex centering
|
||||
|
@ -588,7 +595,7 @@ fill prefix automatically (@pxref{Adaptive Fill}).
|
|||
@item C-x .
|
||||
Set the fill prefix (@code{set-fill-prefix}).
|
||||
@item M-q
|
||||
Fill a paragraph using current fill prefix (@code{fill-paragraph}).
|
||||
Fill a paragraph using current fill prefix (@code{fill-paragraph-or-region}).
|
||||
@item M-x fill-individual-paragraphs
|
||||
Fill the region, considering each change of indentation as starting a
|
||||
new paragraph.
|
||||
|
@ -2249,7 +2256,7 @@ margin width either with a numeric argument or in the minibuffer.
|
|||
|
||||
Sometimes, as a result of editing, the filling of a paragraph becomes
|
||||
messed up---parts of the paragraph may extend past the left or right
|
||||
margins. When this happens, use @kbd{M-q} (@code{fill-paragraph}) to
|
||||
margins. When this happens, use @kbd{M-q} (@code{fill-paragraph-or-region}) to
|
||||
refill the paragraph.
|
||||
|
||||
The fill prefix, if any, works in addition to the specified paragraph
|
789
doc/emacs/vc2-xtra.texi
Normal file
789
doc/emacs/vc2-xtra.texi
Normal file
|
@ -0,0 +1,789 @@
|
|||
@c This is part of the Emacs manual.
|
||||
@c Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
@c See file emacs.texi for copying conditions.
|
||||
@c
|
||||
@c This file is included either in vc-xtra.texi (when producing the
|
||||
@c printed version) or in the main Emacs manual (for the on-line version).
|
||||
@node Remote Repositories
|
||||
@subsection Remote Repositories
|
||||
@cindex remote repositories (CVS)
|
||||
|
||||
A common way of using CVS is to set up a central CVS repository on
|
||||
some Internet host, then have each developer check out a personal
|
||||
working copy of the files on his local machine. Committing changes to
|
||||
the repository, and picking up changes from other users into one's own
|
||||
working area, then works by direct interactions with the CVS server.
|
||||
|
||||
One difficulty is that access to the CVS server is often slow, and
|
||||
that developers might need to work off-line as well. VC is designed
|
||||
to reduce the amount of network interaction necessary.
|
||||
|
||||
@menu
|
||||
* Version Backups:: Keeping local copies of repository versions.
|
||||
* Local Version Control:: Using another version system for local editing.
|
||||
@end menu
|
||||
|
||||
@node Version Backups
|
||||
@subsubsection Version Backups
|
||||
@cindex version backups
|
||||
|
||||
@cindex automatic version backups
|
||||
When VC sees that the CVS repository for a file is on a remote
|
||||
machine, it automatically makes local backups of unmodified versions
|
||||
of the file---@dfn{automatic version backups}. This means that you
|
||||
can compare the file to the repository version (@kbd{C-x v =}), or
|
||||
revert to that version (@kbd{C-x v u}), without any network
|
||||
interactions.
|
||||
|
||||
The local copy of the unmodified file is called a @dfn{version
|
||||
backup} to indicate that it corresponds exactly to a version that is
|
||||
stored in the repository. Note that version backups are not the same
|
||||
as ordinary Emacs backup files
|
||||
@iftex
|
||||
(@pxref{Backup,,,emacs, the Emacs Manual}).
|
||||
@end iftex
|
||||
@ifnottex
|
||||
(@pxref{Backup}).
|
||||
@end ifnottex
|
||||
But they follow a similar naming convention.
|
||||
|
||||
For a file that comes from a remote CVS repository, VC makes a
|
||||
version backup whenever you save the first changes to the file, and
|
||||
removes it after you have committed your modified version to the
|
||||
repository. You can disable the making of automatic version backups by
|
||||
setting @code{vc-cvs-stay-local} to @code{nil} (@pxref{CVS Options}).
|
||||
|
||||
@cindex manual version backups
|
||||
The name of the automatic version backup for version @var{version}
|
||||
of file @var{file} is @code{@var{file}.~@var{version}.~}. This is
|
||||
almost the same as the name used by @kbd{C-x v ~}
|
||||
@iftex
|
||||
(@pxref{Old Versions,,,emacs, the Emacs Manual}),
|
||||
@end iftex
|
||||
@ifnottex
|
||||
(@pxref{Old Versions}),
|
||||
@end ifnottex
|
||||
the only difference being the additional dot (@samp{.}) after the
|
||||
version number. This similarity is intentional, because both kinds of
|
||||
files store the same kind of information. The file made by @kbd{C-x v
|
||||
~} acts as a @dfn{manual version backup}.
|
||||
|
||||
All the VC commands that operate on old versions of a file can use
|
||||
both kinds of version backups. For instance, @kbd{C-x v ~} uses
|
||||
either an automatic or a manual version backup, if possible, to get
|
||||
the contents of the version you request. Likewise, @kbd{C-x v =} and
|
||||
@kbd{C-x v u} use either an automatic or a manual version backup, if
|
||||
one of them exists, to get the contents of a version to compare or
|
||||
revert to. If you changed a file outside of Emacs, so that no
|
||||
automatic version backup was created for the previous text, you can
|
||||
create a manual backup of that version using @kbd{C-x v ~}, and thus
|
||||
obtain the benefit of the local copy for Emacs commands.
|
||||
|
||||
The only difference in Emacs's handling of manual and automatic
|
||||
version backups, once they exist, is that Emacs deletes automatic
|
||||
version backups when you commit to the repository. By contrast,
|
||||
manual version backups remain until you delete them.
|
||||
|
||||
@node Local Version Control
|
||||
@subsubsection Local Version Control
|
||||
@cindex local version control
|
||||
@cindex local back end (version control)
|
||||
|
||||
When you make many changes to a file that comes from a remote
|
||||
repository, it can be convenient to have version control on your local
|
||||
machine as well. You can then record intermediate versions, revert to
|
||||
a previous state, etc., before you actually commit your changes to the
|
||||
remote server.
|
||||
|
||||
VC lets you do this by putting a file under a second, local version
|
||||
control system, so that the file is effectively registered in two
|
||||
systems at the same time. For the description here, we will assume
|
||||
that the remote system is CVS, and you use RCS locally, although the
|
||||
mechanism works with any combination of version control systems
|
||||
(@dfn{back ends}).
|
||||
|
||||
To make it work with other back ends, you must make sure that the
|
||||
``more local'' back end comes before the ``more remote'' back end in
|
||||
the setting of @code{vc-handled-backends} (@pxref{Customizing VC}). By
|
||||
default, this variable is set up so that you can use remote CVS and
|
||||
local RCS as described here.
|
||||
|
||||
To start using local RCS for a file that comes from a remote CVS
|
||||
server, you must @emph{register the file in RCS}, by typing @kbd{C-u
|
||||
C-x v v rcs @key{RET}}. (In other words, use @code{vc-next-action} with a
|
||||
prefix argument, and specify RCS as the back end.)
|
||||
|
||||
You can do this at any time; it does not matter whether you have
|
||||
already modified the file with respect to the version in the CVS
|
||||
repository. If possible, VC tries to make the RCS master start with
|
||||
the unmodified repository version, then checks in any local changes
|
||||
as a new version. This works if you have not made any changes yet, or
|
||||
if the unmodified repository version exists locally as a version
|
||||
backup (@pxref{Version Backups}). If the unmodified version is not
|
||||
available locally, the RCS master starts with the modified version;
|
||||
the only drawback to this is that you cannot compare your changes
|
||||
locally to what is stored in the repository.
|
||||
|
||||
The version number of the RCS master is derived from the current CVS
|
||||
version, starting a branch from it. For example, if the current CVS
|
||||
version is 1.23, the local RCS branch will be 1.23.1. Version 1.23 in
|
||||
the RCS master will be identical to version 1.23 under CVS; your first
|
||||
changes are checked in as 1.23.1.1. (If the unmodified file is not
|
||||
available locally, VC will check in the modified file twice, both as
|
||||
1.23 and 1.23.1.1, to make the revision numbers consistent.)
|
||||
|
||||
If you do not use locking under CVS (the default), locking is also
|
||||
disabled for RCS, so that editing under RCS works exactly as under
|
||||
CVS.
|
||||
|
||||
When you are done with local editing, you can commit the final version
|
||||
back to the CVS repository by typing @kbd{C-u C-x v v cvs @key{RET}}.
|
||||
This initializes the log entry buffer
|
||||
@iftex
|
||||
(@pxref{Log Buffer,,,emacs, the Emacs Manual})
|
||||
@end iftex
|
||||
@ifnottex
|
||||
(@pxref{Log Buffer})
|
||||
@end ifnottex
|
||||
to contain all the log entries you have recorded in the RCS master;
|
||||
you can edit them as you wish, and then commit in CVS by typing
|
||||
@kbd{C-c C-c}. If the commit is successful, VC removes the RCS
|
||||
master, so that the file is once again registered under CVS only.
|
||||
(The RCS master is not actually deleted, just renamed by appending
|
||||
@samp{~} to the name, so that you can refer to it later if you wish.)
|
||||
|
||||
While using local RCS, you can pick up recent changes from the CVS
|
||||
repository into your local file, or commit some of your changes back
|
||||
to CVS, without terminating local RCS version control. To do this,
|
||||
switch to the CVS back end temporarily, with the @kbd{C-x v b} command:
|
||||
|
||||
@table @kbd
|
||||
@item C-x v b
|
||||
Switch to another back end that the current file is registered
|
||||
under (@code{vc-switch-backend}).
|
||||
|
||||
@item C-u C-x v b @var{backend} @key{RET}
|
||||
Switch to @var{backend} for the current file.
|
||||
@end table
|
||||
|
||||
@kindex C-x v b
|
||||
@findex vc-switch-backend
|
||||
@kbd{C-x v b} does not change the buffer contents, or any files; it
|
||||
only changes VC's perspective on how to handle the file. Any
|
||||
subsequent VC commands for that file will operate on the back end that
|
||||
is currently selected.
|
||||
|
||||
If the current file is registered in more than one back end, typing
|
||||
@kbd{C-x v b} ``cycles'' through all of these back ends. With a
|
||||
prefix argument, it asks for the back end to use in the minibuffer.
|
||||
|
||||
Thus, if you are using local RCS, and you want to pick up some recent
|
||||
changes in the file from remote CVS, first visit the file, then type
|
||||
@kbd{C-x v b} to switch to CVS, and finally use @kbd{C-x v m
|
||||
@key{RET}} to merge the news
|
||||
@iftex
|
||||
(@pxref{Merging,,,emacs, the Emacs Manual}).
|
||||
@end iftex
|
||||
@ifnottex
|
||||
(@pxref{Merging}).
|
||||
@end ifnottex
|
||||
You can then switch back to RCS by typing @kbd{C-x v b} again, and
|
||||
continue to edit locally.
|
||||
|
||||
But if you do this, the revision numbers in the RCS master no longer
|
||||
correspond to those of CVS. Technically, this is not a problem, but
|
||||
it can become difficult to keep track of what is in the CVS repository
|
||||
and what is not. So we suggest that you return from time to time to
|
||||
CVS-only operation, by committing your local changes back to the
|
||||
repository using @kbd{C-u C-x v v cvs @key{RET}}.
|
||||
|
||||
@node Snapshots
|
||||
@subsection Snapshots
|
||||
@cindex snapshots and version control
|
||||
|
||||
A @dfn{snapshot} is a named set of file versions (one for each
|
||||
registered file) that you can treat as a unit. One important kind of
|
||||
snapshot is a @dfn{release}, a (theoretically) stable version of the
|
||||
system that is ready for distribution to users.
|
||||
|
||||
@menu
|
||||
* Making Snapshots:: The snapshot facilities.
|
||||
* Snapshot Caveats:: Things to be careful of when using snapshots.
|
||||
@end menu
|
||||
|
||||
@node Making Snapshots
|
||||
@subsubsection Making and Using Snapshots
|
||||
|
||||
There are two basic commands for snapshots; one makes a
|
||||
snapshot with a given name, the other retrieves a named snapshot.
|
||||
|
||||
@table @code
|
||||
@kindex C-x v s
|
||||
@findex vc-create-snapshot
|
||||
@item C-x v s @var{name} @key{RET}
|
||||
Define the last saved versions of every registered file in or under the
|
||||
current directory as a snapshot named @var{name}
|
||||
(@code{vc-create-snapshot}).
|
||||
|
||||
@kindex C-x v r
|
||||
@findex vc-retrieve-snapshot
|
||||
@item C-x v r @var{name} @key{RET}
|
||||
For all registered files at or below the current directory level, select
|
||||
whatever versions correspond to the snapshot @var{name}
|
||||
(@code{vc-retrieve-snapshot}).
|
||||
|
||||
This command reports an error if any files are locked at or below the
|
||||
current directory, without changing anything; this is to avoid
|
||||
overwriting work in progress.
|
||||
@end table
|
||||
|
||||
A snapshot uses a very small amount of resources---just enough to record
|
||||
the list of file names and which version belongs to the snapshot. Thus,
|
||||
you need not hesitate to create snapshots whenever they are useful.
|
||||
|
||||
You can give a snapshot name as an argument to @kbd{C-x v =} or
|
||||
@kbd{C-x v ~}
|
||||
@iftex
|
||||
(@pxref{Old Versions,,,emacs, the Emacs Manual}).
|
||||
@end iftex
|
||||
@ifnottex
|
||||
(@pxref{Old Versions}).
|
||||
@end ifnottex
|
||||
Thus, you can use it to compare a snapshot against the current files,
|
||||
or two snapshots against each other, or a snapshot against a named
|
||||
version.
|
||||
|
||||
@node Snapshot Caveats
|
||||
@subsubsection Snapshot Caveats
|
||||
|
||||
@cindex named configurations (RCS)
|
||||
VC's snapshot facilities are modeled on RCS's named-configuration
|
||||
support. They use RCS's native facilities for this, so
|
||||
snapshots made using RCS through VC are visible even when you bypass VC.
|
||||
|
||||
With CVS, Meta-CVS, and Subversion, VC also uses the native
|
||||
mechanism provided by that back end to make snapshots and retrieve them
|
||||
(@dfn{tags} for CVS and Meta-CVS, @dfn{copies} for Subversion).
|
||||
|
||||
@c worded verbosely to avoid overfull hbox.
|
||||
For SCCS, VC implements snapshots itself. The files it uses contain
|
||||
name/file/version-number triples. These snapshots are visible only
|
||||
through VC.
|
||||
|
||||
There is no support for VC snapshots using GNU Arch yet.
|
||||
|
||||
A snapshot is a set of checked-in versions. So make sure that all the
|
||||
files are checked in and not locked when you make a snapshot.
|
||||
|
||||
File renaming and deletion can create some difficulties with snapshots.
|
||||
This is not a VC-specific problem, but a general design issue in version
|
||||
control systems that no one has solved very well yet.
|
||||
|
||||
If you rename a registered file, you need to rename its master along
|
||||
with it (the command @code{vc-rename-file} does this automatically). If
|
||||
you are using SCCS, you must also update the records of the snapshot, to
|
||||
mention the file by its new name (@code{vc-rename-file} does this,
|
||||
too). An old snapshot that refers to a master file that no longer
|
||||
exists under the recorded name is invalid; VC can no longer retrieve
|
||||
it. It would be beyond the scope of this manual to explain enough about
|
||||
RCS and SCCS to explain how to update the snapshots by hand.
|
||||
|
||||
Using @code{vc-rename-file} makes the snapshot remain valid for
|
||||
retrieval, but it does not solve all problems. For example, some of the
|
||||
files in your program probably refer to others by name. At the very
|
||||
least, the makefile probably mentions the file that you renamed. If you
|
||||
retrieve an old snapshot, the renamed file is retrieved under its new
|
||||
name, which is not the name that the makefile expects. So the program
|
||||
won't really work as retrieved.
|
||||
|
||||
@node Miscellaneous VC
|
||||
@subsection Miscellaneous Commands and Features of VC
|
||||
|
||||
This section explains the less-frequently-used features of VC.
|
||||
|
||||
@menu
|
||||
* Change Logs and VC:: Generating a change log file from log entries.
|
||||
* Renaming and VC:: A command to rename both the source and master
|
||||
file correctly.
|
||||
* Version Headers:: Inserting version control headers into working files.
|
||||
@end menu
|
||||
|
||||
@node Change Logs and VC
|
||||
@subsubsection Change Logs and VC
|
||||
|
||||
If you use RCS or CVS for a program and also maintain a change log
|
||||
file for it
|
||||
@iftex
|
||||
(@pxref{Change Log,,,emacs, the Emacs Manual}),
|
||||
@end iftex
|
||||
@ifnottex
|
||||
(@pxref{Change Log}),
|
||||
@end ifnottex
|
||||
you can generate change log entries automatically from the version
|
||||
control log entries:
|
||||
|
||||
@table @kbd
|
||||
@item C-x v a
|
||||
@kindex C-x v a
|
||||
@findex vc-update-change-log
|
||||
Visit the current directory's change log file and, for registered files
|
||||
in that directory, create new entries for versions checked in since the
|
||||
most recent entry in the change log file.
|
||||
(@code{vc-update-change-log}).
|
||||
|
||||
This command works with RCS or CVS only, not with any of the other
|
||||
back ends.
|
||||
|
||||
@item C-u C-x v a
|
||||
As above, but only find entries for the current buffer's file.
|
||||
|
||||
@item M-1 C-x v a
|
||||
As above, but find entries for all the currently visited files that are
|
||||
maintained with version control. This works only with RCS, and it puts
|
||||
all entries in the log for the default directory, which may not be
|
||||
appropriate.
|
||||
@end table
|
||||
|
||||
For example, suppose the first line of @file{ChangeLog} is dated
|
||||
1999-04-10, and that the only check-in since then was by Nathaniel
|
||||
Bowditch to @file{rcs2log} on 1999-05-22 with log text @samp{Ignore log
|
||||
messages that start with `#'.}. Then @kbd{C-x v a} visits
|
||||
@file{ChangeLog} and inserts text like this:
|
||||
|
||||
@iftex
|
||||
@medbreak
|
||||
@end iftex
|
||||
@smallexample
|
||||
@group
|
||||
1999-05-22 Nathaniel Bowditch <nat@@apn.org>
|
||||
|
||||
* rcs2log: Ignore log messages that start with `#'.
|
||||
@end group
|
||||
@end smallexample
|
||||
@iftex
|
||||
@medbreak
|
||||
@end iftex
|
||||
|
||||
@noindent
|
||||
You can then edit the new change log entry further as you wish.
|
||||
|
||||
Some of the new change log entries may duplicate what's already in
|
||||
ChangeLog. You will have to remove these duplicates by hand.
|
||||
|
||||
Normally, the log entry for file @file{foo} is displayed as @samp{*
|
||||
foo: @var{text of log entry}}. The @samp{:} after @file{foo} is omitted
|
||||
if the text of the log entry starts with @w{@samp{(@var{functionname}):
|
||||
}}. For example, if the log entry for @file{vc.el} is
|
||||
@samp{(vc-do-command): Check call-process status.}, then the text in
|
||||
@file{ChangeLog} looks like this:
|
||||
|
||||
@iftex
|
||||
@medbreak
|
||||
@end iftex
|
||||
@smallexample
|
||||
@group
|
||||
1999-05-06 Nathaniel Bowditch <nat@@apn.org>
|
||||
|
||||
* vc.el (vc-do-command): Check call-process status.
|
||||
@end group
|
||||
@end smallexample
|
||||
@iftex
|
||||
@medbreak
|
||||
@end iftex
|
||||
|
||||
When @kbd{C-x v a} adds several change log entries at once, it groups
|
||||
related log entries together if they all are checked in by the same
|
||||
author at nearly the same time. If the log entries for several such
|
||||
files all have the same text, it coalesces them into a single entry.
|
||||
For example, suppose the most recent check-ins have the following log
|
||||
entries:
|
||||
|
||||
@flushleft
|
||||
@bullet{} For @file{vc.texinfo}: @samp{Fix expansion typos.}
|
||||
@bullet{} For @file{vc.el}: @samp{Don't call expand-file-name.}
|
||||
@bullet{} For @file{vc-hooks.el}: @samp{Don't call expand-file-name.}
|
||||
@end flushleft
|
||||
|
||||
@noindent
|
||||
They appear like this in @file{ChangeLog}:
|
||||
|
||||
@iftex
|
||||
@medbreak
|
||||
@end iftex
|
||||
@smallexample
|
||||
@group
|
||||
1999-04-01 Nathaniel Bowditch <nat@@apn.org>
|
||||
|
||||
* vc.texinfo: Fix expansion typos.
|
||||
|
||||
* vc.el, vc-hooks.el: Don't call expand-file-name.
|
||||
@end group
|
||||
@end smallexample
|
||||
@iftex
|
||||
@medbreak
|
||||
@end iftex
|
||||
|
||||
Normally, @kbd{C-x v a} separates log entries by a blank line, but you
|
||||
can mark several related log entries to be clumped together (without an
|
||||
intervening blank line) by starting the text of each related log entry
|
||||
with a label of the form @w{@samp{@{@var{clumpname}@} }}. The label
|
||||
itself is not copied to @file{ChangeLog}. For example, suppose the log
|
||||
entries are:
|
||||
|
||||
@flushleft
|
||||
@bullet{} For @file{vc.texinfo}: @samp{@{expand@} Fix expansion typos.}
|
||||
@bullet{} For @file{vc.el}: @samp{@{expand@} Don't call expand-file-name.}
|
||||
@bullet{} For @file{vc-hooks.el}: @samp{@{expand@} Don't call expand-file-name.}
|
||||
@end flushleft
|
||||
|
||||
@noindent
|
||||
Then the text in @file{ChangeLog} looks like this:
|
||||
|
||||
@iftex
|
||||
@medbreak
|
||||
@end iftex
|
||||
@smallexample
|
||||
@group
|
||||
1999-04-01 Nathaniel Bowditch <nat@@apn.org>
|
||||
|
||||
* vc.texinfo: Fix expansion typos.
|
||||
* vc.el, vc-hooks.el: Don't call expand-file-name.
|
||||
@end group
|
||||
@end smallexample
|
||||
@iftex
|
||||
@medbreak
|
||||
@end iftex
|
||||
|
||||
A log entry whose text begins with @samp{#} is not copied to
|
||||
@file{ChangeLog}. For example, if you merely fix some misspellings in
|
||||
comments, you can log the change with an entry beginning with @samp{#}
|
||||
to avoid putting such trivia into @file{ChangeLog}.
|
||||
|
||||
@node Renaming and VC
|
||||
@subsubsection Renaming VC Work Files and Master Files
|
||||
|
||||
@findex vc-rename-file
|
||||
When you rename a registered file, you must also rename its master
|
||||
file correspondingly to get proper results. Use @code{vc-rename-file}
|
||||
to rename the source file as you specify, and rename its master file
|
||||
accordingly. It also updates any snapshots (@pxref{Snapshots}) that
|
||||
mention the file, so that they use the new name; despite this, the
|
||||
snapshot thus modified may not completely work (@pxref{Snapshot
|
||||
Caveats}).
|
||||
|
||||
Some back ends do not provide an explicit rename operation to their
|
||||
repositories. After issuing @code{vc-rename-file}, use @kbd{C-x v v}
|
||||
on the original and renamed buffers and provide the necessary edit
|
||||
log.
|
||||
|
||||
You cannot use @code{vc-rename-file} on a file that is locked by
|
||||
someone else.
|
||||
|
||||
@node Version Headers
|
||||
@subsubsection Inserting Version Control Headers
|
||||
|
||||
Sometimes it is convenient to put version identification strings
|
||||
directly into working files. Certain special strings called
|
||||
@dfn{version headers} are replaced in each successive version by the
|
||||
number of that version, the name of the user who created it, and other
|
||||
relevant information. All of the back ends that VC supports have such
|
||||
a mechanism, except GNU Arch.
|
||||
|
||||
VC does not normally use the information contained in these headers.
|
||||
The exception is RCS---with RCS, version headers are sometimes more
|
||||
reliable than the master file to determine which version of the file
|
||||
you are editing. Note that in a multi-branch environment, version
|
||||
headers are necessary to make VC behave correctly
|
||||
@iftex
|
||||
(@pxref{Multi-User Branching,,,emacs, the Emacs Manual}).
|
||||
@end iftex
|
||||
@ifnottex
|
||||
(@pxref{Multi-User Branching}).
|
||||
@end ifnottex
|
||||
|
||||
Searching for RCS version headers is controlled by the variable
|
||||
@code{vc-consult-headers}. If it is non-@code{nil} (the default),
|
||||
Emacs searches for headers to determine the version number you are
|
||||
editing. Setting it to @code{nil} disables this feature.
|
||||
|
||||
Note that although CVS uses the same kind of version headers as RCS
|
||||
does, VC never searches for these headers if you are using CVS,
|
||||
regardless of the above setting.
|
||||
|
||||
@kindex C-x v h
|
||||
@findex vc-insert-headers
|
||||
You can use the @kbd{C-x v h} command (@code{vc-insert-headers}) to
|
||||
insert a suitable header string.
|
||||
|
||||
@table @kbd
|
||||
@item C-x v h
|
||||
Insert headers in a file for use with your version-control system.
|
||||
@end table
|
||||
|
||||
@vindex vc-@var{backend}-header
|
||||
The default header string is @samp{@w{$}Id$} for RCS and
|
||||
@samp{@w{%}W%} for SCCS. You can specify other headers to insert by
|
||||
setting the variables @code{vc-@var{backend}-header} where
|
||||
@var{backend} is @code{rcs} or @code{sccs}.
|
||||
|
||||
Instead of a single string, you can specify a list of strings; then
|
||||
each string in the list is inserted as a separate header on a line of
|
||||
its own.
|
||||
|
||||
It may be necessary to use apparently-superfluous backslashes when
|
||||
writing the strings that you put in this variable. For instance, you
|
||||
might write @code{"$Id\$"} rather than @code{"$Id@w{$}"}. The extra
|
||||
backslash prevents the string constant from being interpreted as a
|
||||
header, if the Emacs Lisp file containing it is maintained with
|
||||
version control.
|
||||
|
||||
@vindex vc-comment-alist
|
||||
Each header is inserted surrounded by tabs, inside comment delimiters,
|
||||
on a new line at point. Normally the ordinary comment
|
||||
start and comment end strings of the current mode are used, but for
|
||||
certain modes, there are special comment delimiters for this purpose;
|
||||
the variable @code{vc-comment-alist} specifies them. Each element of
|
||||
this list has the form @code{(@var{mode} @var{starter} @var{ender})}.
|
||||
|
||||
@vindex vc-static-header-alist
|
||||
The variable @code{vc-static-header-alist} specifies further strings
|
||||
to add based on the name of the buffer. Its value should be a list of
|
||||
elements of the form @code{(@var{regexp} . @var{format})}. Whenever
|
||||
@var{regexp} matches the buffer name, @var{format} is inserted as part
|
||||
of the header. A header line is inserted for each element that matches
|
||||
the buffer name, and for each string specified by
|
||||
@code{vc-@var{backend}-header}. The header line is made by processing the
|
||||
string from @code{vc-@var{backend}-header} with the format taken from the
|
||||
element. The default value for @code{vc-static-header-alist} is as follows:
|
||||
|
||||
@example
|
||||
@group
|
||||
(("\\.c$" .
|
||||
"\n#ifndef lint\nstatic char vcid[] = \"\%s\";\n\
|
||||
#endif /* lint */\n"))
|
||||
@end group
|
||||
@end example
|
||||
|
||||
@noindent
|
||||
It specifies insertion of text of this form:
|
||||
|
||||
@example
|
||||
@group
|
||||
|
||||
#ifndef lint
|
||||
static char vcid[] = "@var{string}";
|
||||
#endif /* lint */
|
||||
@end group
|
||||
@end example
|
||||
|
||||
@noindent
|
||||
Note that the text above starts with a blank line.
|
||||
|
||||
If you use more than one version header in a file, put them close
|
||||
together in the file. The mechanism in @code{revert-buffer} that
|
||||
preserves markers may not handle markers positioned between two version
|
||||
headers.
|
||||
|
||||
@node Customizing VC
|
||||
@subsection Customizing VC
|
||||
|
||||
@vindex vc-handled-backends
|
||||
The variable @code{vc-handled-backends} determines which version
|
||||
control systems VC should handle. The default value is @code{(RCS CVS
|
||||
SVN SCCS BZR GIT HG Arch MCVS)}, so it contains all the version systems
|
||||
that are currently supported. If you want VC to ignore one or more of
|
||||
these systems, exclude its name from the list. To disable VC entirely,
|
||||
set this variable to @code{nil}.
|
||||
|
||||
The order of systems in the list is significant: when you visit a file
|
||||
registered in more than one system (@pxref{Local Version Control}), VC
|
||||
uses the system that comes first in @code{vc-handled-backends} by
|
||||
default. The order is also significant when you register a file for
|
||||
the first time, see
|
||||
@iftex
|
||||
@ref{Registering,,,emacs, the Emacs Manual},
|
||||
@end iftex
|
||||
@ifnottex
|
||||
@ref{Registering},
|
||||
@end ifnottex
|
||||
for details.
|
||||
|
||||
@menu
|
||||
* General VC Options:: Options that apply to multiple back ends.
|
||||
* RCS and SCCS:: Options for RCS and SCCS.
|
||||
* CVS Options:: Options for CVS.
|
||||
@end menu
|
||||
|
||||
@node General VC Options
|
||||
@subsubsection General Options
|
||||
|
||||
@vindex vc-make-backup-files
|
||||
Emacs normally does not save backup files for source files that are
|
||||
maintained with version control. If you want to make backup files even
|
||||
for files that use version control, set the variable
|
||||
@code{vc-make-backup-files} to a non-@code{nil} value.
|
||||
|
||||
@vindex vc-keep-workfiles
|
||||
Normally the work file exists all the time, whether it is locked or
|
||||
not. If you set @code{vc-keep-workfiles} to @code{nil}, then checking
|
||||
in a new version with @kbd{C-x v v} deletes the work file; but any
|
||||
attempt to visit the file with Emacs creates it again. (With CVS, work
|
||||
files are always kept.)
|
||||
|
||||
@vindex vc-follow-symlinks
|
||||
Editing a version-controlled file through a symbolic link can be
|
||||
dangerous. It bypasses the version control system---you can edit the
|
||||
file without locking it, and fail to check your changes in. Also,
|
||||
your changes might overwrite those of another user. To protect against
|
||||
this, VC checks each symbolic link that you visit, to see if it points
|
||||
to a file under version control.
|
||||
|
||||
The variable @code{vc-follow-symlinks} controls what to do when a
|
||||
symbolic link points to a version-controlled file. If it is @code{nil},
|
||||
VC only displays a warning message. If it is @code{t}, VC automatically
|
||||
follows the link, and visits the real file instead, telling you about
|
||||
this in the echo area. If the value is @code{ask} (the default), VC
|
||||
asks you each time whether to follow the link.
|
||||
|
||||
@vindex vc-suppress-confirm
|
||||
If @code{vc-suppress-confirm} is non-@code{nil}, then @kbd{C-x v v}
|
||||
and @kbd{C-x v i} can save the current buffer without asking, and
|
||||
@kbd{C-x v u} also operates without asking for confirmation. (This
|
||||
variable does not affect @kbd{C-x v c}; that operation is so drastic
|
||||
that it should always ask for confirmation.)
|
||||
|
||||
@vindex vc-command-messages
|
||||
VC mode does much of its work by running the shell commands for RCS,
|
||||
CVS and SCCS. If @code{vc-command-messages} is non-@code{nil}, VC
|
||||
displays messages to indicate which shell commands it runs, and
|
||||
additional messages when the commands finish.
|
||||
|
||||
@vindex vc-path
|
||||
You can specify additional directories to search for version control
|
||||
programs by setting the variable @code{vc-path}. These directories
|
||||
are searched before the usual search path. It is rarely necessary to
|
||||
set this variable, because VC normally finds the proper files
|
||||
automatically.
|
||||
|
||||
@node RCS and SCCS
|
||||
@subsubsection Options for RCS and SCCS
|
||||
|
||||
@cindex non-strict locking (RCS)
|
||||
@cindex locking, non-strict (RCS)
|
||||
By default, RCS uses locking to coordinate the activities of several
|
||||
users, but there is a mode called @dfn{non-strict locking} in which
|
||||
you can check-in changes without locking the file first. Use
|
||||
@samp{rcs -U} to switch to non-strict locking for a particular file,
|
||||
see the @code{rcs} manual page for details.
|
||||
|
||||
When deducing the version control state of an RCS file, VC first
|
||||
looks for an RCS version header string in the file (@pxref{Version
|
||||
Headers}). If there is no header string, VC normally looks at the
|
||||
file permissions of the work file; this is fast. But there might be
|
||||
situations when the file permissions cannot be trusted. In this case
|
||||
the master file has to be consulted, which is rather expensive. Also
|
||||
the master file can only tell you @emph{if} there's any lock on the
|
||||
file, but not whether your work file really contains that locked
|
||||
version.
|
||||
|
||||
@vindex vc-consult-headers
|
||||
You can tell VC not to use version headers to determine the file
|
||||
status by setting @code{vc-consult-headers} to @code{nil}. VC then
|
||||
always uses the file permissions (if it is supposed to trust them), or
|
||||
else checks the master file.
|
||||
|
||||
@vindex vc-mistrust-permissions
|
||||
You can specify the criterion for whether to trust the file
|
||||
permissions by setting the variable @code{vc-mistrust-permissions}.
|
||||
Its value can be @code{t} (always mistrust the file permissions and
|
||||
check the master file), @code{nil} (always trust the file
|
||||
permissions), or a function of one argument which makes the decision.
|
||||
The argument is the directory name of the @file{RCS} subdirectory. A
|
||||
non-@code{nil} value from the function says to mistrust the file
|
||||
permissions. If you find that the file permissions of work files are
|
||||
changed erroneously, set @code{vc-mistrust-permissions} to @code{t}.
|
||||
Then VC always checks the master file to determine the file's status.
|
||||
|
||||
VC determines the version control state of files under SCCS much as
|
||||
with RCS. It does not consider SCCS version headers, though. Thus,
|
||||
the variable @code{vc-mistrust-permissions} affects SCCS use, but
|
||||
@code{vc-consult-headers} does not.
|
||||
|
||||
@node CVS Options
|
||||
@subsubsection Options specific for CVS
|
||||
|
||||
@cindex locking (CVS)
|
||||
By default, CVS does not use locking to coordinate the activities of
|
||||
several users; anyone can change a work file at any time. However,
|
||||
there are ways to restrict this, resulting in behavior that resembles
|
||||
locking.
|
||||
|
||||
@cindex CVSREAD environment variable (CVS)
|
||||
For one thing, you can set the @env{CVSREAD} environment variable
|
||||
(the value you use makes no difference). If this variable is defined,
|
||||
CVS makes your work files read-only by default. In Emacs, you must
|
||||
type @kbd{C-x v v} to make the file writable, so that editing works
|
||||
in fact similar as if locking was used. Note however, that no actual
|
||||
locking is performed, so several users can make their files writable
|
||||
at the same time. When setting @env{CVSREAD} for the first time, make
|
||||
sure to check out all your modules anew, so that the file protections
|
||||
are set correctly.
|
||||
|
||||
@cindex cvs watch feature
|
||||
@cindex watching files (CVS)
|
||||
Another way to achieve something similar to locking is to use the
|
||||
@dfn{watch} feature of CVS. If a file is being watched, CVS makes it
|
||||
read-only by default, and you must also use @kbd{C-x v v} in Emacs to
|
||||
make it writable. VC calls @code{cvs edit} to make the file writable,
|
||||
and CVS takes care to notify other developers of the fact that you
|
||||
intend to change the file. See the CVS documentation for details on
|
||||
using the watch feature.
|
||||
|
||||
@vindex vc-stay-local
|
||||
@vindex vc-cvs-stay-local
|
||||
@cindex remote repositories (CVS)
|
||||
When a file's repository is on a remote machine, VC tries to keep
|
||||
network interactions to a minimum. This is controlled by the variable
|
||||
@code{vc-cvs-stay-local}. There is another variable,
|
||||
@code{vc-stay-local}, which enables the feature also for other back
|
||||
ends that support it, including CVS. In the following, we will talk
|
||||
only about @code{vc-cvs-stay-local}, but everything applies to
|
||||
@code{vc-stay-local} as well.
|
||||
|
||||
If @code{vc-cvs-stay-local} is @code{t} (the default), then VC uses
|
||||
only the entry in the local CVS subdirectory to determine the file's
|
||||
state (and possibly information returned by previous CVS commands).
|
||||
One consequence of this is that when you have modified a file, and
|
||||
somebody else has already checked in other changes to the file, you
|
||||
are not notified of it until you actually try to commit. (But you can
|
||||
try to pick up any recent changes from the repository first, using
|
||||
@kbd{C-x v m @key{RET}},
|
||||
@iftex
|
||||
@pxref{Merging,,,emacs, the Emacs Manual}).
|
||||
@end iftex
|
||||
@ifnottex
|
||||
@pxref{Merging}).
|
||||
@end ifnottex
|
||||
|
||||
When @code{vc-cvs-stay-local} is @code{t}, VC also makes local
|
||||
version backups, so that simple diff and revert operations are
|
||||
completely local (@pxref{Version Backups}).
|
||||
|
||||
On the other hand, if you set @code{vc-cvs-stay-local} to @code{nil},
|
||||
then VC queries the remote repository @emph{before} it decides what to
|
||||
do in @code{vc-next-action} (@kbd{C-x v v}), just as it does for local
|
||||
repositories. It also does not make any version backups.
|
||||
|
||||
You can also set @code{vc-cvs-stay-local} to a regular expression
|
||||
that is matched against the repository host name; VC then stays local
|
||||
only for repositories from hosts that match the pattern.
|
||||
|
||||
@vindex vc-cvs-global-switches
|
||||
You can specify additional command line options to pass to all CVS
|
||||
operations in the variable @code{vc-cvs-global-switches}. These
|
||||
switches are inserted immediately after the @code{cvs} command, before
|
||||
the name of the operation to invoke.
|
||||
|
||||
@ignore
|
||||
arch-tag: 140b8629-4339-4b5e-9e50-72453e51615e
|
||||
@end ignore
|
1216
doc/emacs/xresources.texi
Normal file
1216
doc/emacs/xresources.texi
Normal file
File diff suppressed because it is too large
Load diff
23
doc/misc/.gitignore
vendored
Normal file
23
doc/misc/.gitignore
vendored
Normal file
|
@ -0,0 +1,23 @@
|
|||
*.aux
|
||||
*.cp
|
||||
*.cps
|
||||
*.dvi
|
||||
*.fn
|
||||
*.fns
|
||||
*.ky
|
||||
*.kys
|
||||
*.log
|
||||
*.op
|
||||
*.ops
|
||||
*.pdf
|
||||
*.pg
|
||||
*.pgs
|
||||
*.ps
|
||||
*.tmp
|
||||
*.toc
|
||||
*.tp
|
||||
*.tps
|
||||
*.vr
|
||||
*.vrs
|
||||
Makefile
|
||||
makefile
|
3918
doc/misc/ChangeLog
Normal file
3918
doc/misc/ChangeLog
Normal file
File diff suppressed because it is too large
Load diff
|
@ -1,4 +1,4 @@
|
|||
#### Makefile for the Emacs Manual and other documentation.
|
||||
#### Makefile for documentation other than the Emacs manual.
|
||||
|
||||
# Copyright (C) 1994, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
|
||||
# 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
|
@ -20,7 +20,8 @@
|
|||
# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
# Boston, MA 02110-1301, USA.
|
||||
|
||||
# Where to find the source code. $(srcdir) will be the man
|
||||
|
||||
# Where to find the source code. $(srcdir) will be the man-aux
|
||||
# subdirectory of the source tree. This is
|
||||
# set by the configure script's `--srcdir' option.
|
||||
srcdir=@srcdir@
|
||||
|
@ -29,177 +30,210 @@ top_srcdir=@top_srcdir@
|
|||
# Tell make where to find source files; this is needed for the makefiles.
|
||||
VPATH=@srcdir@
|
||||
|
||||
## Where the output files go.
|
||||
## Note that the setfilename command in the .texi files assumes this.
|
||||
infodir=../../info
|
||||
|
||||
# The makeinfo program is part of the Texinfo distribution.
|
||||
# Use --force so that it generates output even if there are errors.
|
||||
MAKEINFO = makeinfo --force
|
||||
INFO_TARGETS = ../info/emacs ../info/ccmode ../info/cl \
|
||||
../info/dired-x ../info/ediff ../info/forms ../info/gnus \
|
||||
../info/message ../info/sieve ../info/pgg ../info/emacs-mime \
|
||||
../info/info ../info/mh-e ../info/reftex \
|
||||
../info/sc ../info/vip ../info/viper ../info/widget \
|
||||
../info/efaq ../info/ada-mode ../info/autotype ../info/calc \
|
||||
../info/idlwave ../info/eudc ../info/ebrowse ../info/pcl-cvs \
|
||||
../info/woman ../info/eshell ../info/org ../info/url \
|
||||
../info/speedbar ../info/tramp ../info/ses ../info/smtpmail \
|
||||
../info/flymake ../info/newsticker ../info/rcirc ../info/erc
|
||||
DVI_TARGETS = emacs.dvi calc.dvi cc-mode.dvi cl.dvi dired-x.dvi \
|
||||
ediff.dvi forms.dvi gnus.dvi message.dvi emacs-mime.dvi \
|
||||
gnus.dvi message.dvi sieve.dvi pgg.dvi mh-e.dvi \
|
||||
reftex.dvi sc.dvi vip.dvi viper.dvi widget.dvi faq.dvi \
|
||||
ada-mode.dvi autotype.dvi idlwave.dvi eudc.dvi ebrowse.dvi \
|
||||
pcl-cvs.dvi woman.dvi eshell.dvi org.dvi url.dvi \
|
||||
speedbar.dvi tramp.dvi ses.dvi smtpmail.dvi flymake.dvi \
|
||||
newsticker.dvi emacs-xtra.dvi rcirc.dvi erc.dvi
|
||||
INFOSOURCES = info.texi
|
||||
|
||||
INFO_TARGETS = \
|
||||
$(infodir)/ada-mode \
|
||||
$(infodir)/autotype \
|
||||
$(infodir)/calc \
|
||||
$(infodir)/ccmode \
|
||||
$(infodir)/cl \
|
||||
$(infodir)/dired-x \
|
||||
$(infodir)/ebrowse \
|
||||
$(infodir)/ediff \
|
||||
$(infodir)/emacs-mime \
|
||||
$(infodir)/erc \
|
||||
$(infodir)/eshell \
|
||||
$(infodir)/eudc \
|
||||
$(infodir)/efaq \
|
||||
$(infodir)/flymake \
|
||||
$(infodir)/forms \
|
||||
$(infodir)/gnus \
|
||||
$(infodir)/idlwave \
|
||||
$(infodir)/info \
|
||||
$(infodir)/message \
|
||||
$(infodir)/mh-e \
|
||||
$(infodir)/newsticker \
|
||||
$(infodir)/org \
|
||||
$(infodir)/pcl-cvs \
|
||||
$(infodir)/pgg \
|
||||
$(infodir)/rcirc \
|
||||
$(infodir)/reftex \
|
||||
$(infodir)/sc \
|
||||
$(infodir)/ses \
|
||||
$(infodir)/sieve \
|
||||
$(infodir)/smtpmail \
|
||||
$(infodir)/speedbar \
|
||||
$(infodir)/tramp \
|
||||
$(infodir)/url \
|
||||
$(infodir)/vip \
|
||||
$(infodir)/viper \
|
||||
$(infodir)/widget \
|
||||
$(infodir)/woman
|
||||
|
||||
DVI_TARGETS = \
|
||||
ada-mode.dvi \
|
||||
autotype.dvi \
|
||||
calc.dvi \
|
||||
cc-mode.dvi \
|
||||
cl.dvi \
|
||||
dired-x.dvi \
|
||||
ebrowse.dvi \
|
||||
ediff.dvi \
|
||||
emacs-mime.dvi \
|
||||
erc.dvi \
|
||||
eshell.dvi \
|
||||
eudc.dvi \
|
||||
faq.dvi \
|
||||
flymake.dvi \
|
||||
forms.dvi \
|
||||
gnus.dvi \
|
||||
idlwave.dvi \
|
||||
info.dvi \
|
||||
message.dvi \
|
||||
mh-e.dvi \
|
||||
newsticker.dvi \
|
||||
org.dvi \
|
||||
pcl-cvs.dvi \
|
||||
pgg.dvi \
|
||||
rcirc.dvi \
|
||||
reftex.dvi \
|
||||
sc.dvi \
|
||||
ses.dvi \
|
||||
sieve.dvi \
|
||||
smtpmail.dvi \
|
||||
speedbar.dvi \
|
||||
tramp.dvi \
|
||||
url.dvi \
|
||||
vip.dvi \
|
||||
viper.dvi \
|
||||
widget.dvi \
|
||||
woman.dvi
|
||||
|
||||
|
||||
TEXI2DVI = texi2dvi
|
||||
|
||||
# The following rule does not work with all versions of `make'.
|
||||
.SUFFIXES: .texi .dvi
|
||||
.texi.dvi:
|
||||
texi2dvi $<
|
||||
$(TEXI2DVI) $<
|
||||
|
||||
TEXI2DVI = texi2dvi
|
||||
ENVADD = TEXINPUTS="$(srcdir):$(TEXINPUTS)" MAKEINFO="$(MAKEINFO) -I$(srcdir)"
|
||||
|
||||
EMACS_XTRA=\
|
||||
$(srcdir)/arevert-xtra.texi \
|
||||
$(srcdir)/cal-xtra.texi \
|
||||
$(srcdir)/dired-xtra.texi \
|
||||
$(srcdir)/picture-xtra.texi \
|
||||
$(srcdir)/emerge-xtra.texi \
|
||||
$(srcdir)/vc-xtra.texi \
|
||||
$(srcdir)/vc1-xtra.texi \
|
||||
$(srcdir)/vc2-xtra.texi \
|
||||
$(srcdir)/fortran-xtra.texi \
|
||||
$(srcdir)/msdog-xtra.texi
|
||||
|
||||
EMACSSOURCES= \
|
||||
${srcdir}/emacs.texi \
|
||||
${srcdir}/doclicense.texi \
|
||||
${srcdir}/gpl.texi \
|
||||
${srcdir}/screen.texi \
|
||||
${srcdir}/commands.texi \
|
||||
${srcdir}/entering.texi \
|
||||
${srcdir}/basic.texi \
|
||||
${srcdir}/mini.texi \
|
||||
${srcdir}/m-x.texi \
|
||||
${srcdir}/help.texi \
|
||||
${srcdir}/mark.texi \
|
||||
${srcdir}/killing.texi \
|
||||
${srcdir}/regs.texi \
|
||||
${srcdir}/display.texi \
|
||||
${srcdir}/search.texi \
|
||||
${srcdir}/fixit.texi \
|
||||
${srcdir}/files.texi \
|
||||
${srcdir}/buffers.texi \
|
||||
${srcdir}/windows.texi \
|
||||
${srcdir}/frames.texi \
|
||||
${srcdir}/mule.texi \
|
||||
${srcdir}/major.texi \
|
||||
${srcdir}/indent.texi \
|
||||
${srcdir}/text.texi \
|
||||
${srcdir}/programs.texi \
|
||||
${srcdir}/building.texi \
|
||||
${srcdir}/maintaining.texi \
|
||||
${srcdir}/abbrevs.texi \
|
||||
${srcdir}/sending.texi \
|
||||
${srcdir}/rmail.texi \
|
||||
${srcdir}/dired.texi \
|
||||
${srcdir}/calendar.texi \
|
||||
${srcdir}/misc.texi \
|
||||
${srcdir}/custom.texi \
|
||||
${srcdir}/trouble.texi \
|
||||
${srcdir}/cmdargs.texi \
|
||||
${srcdir}/xresources.texi \
|
||||
${srcdir}/anti.texi \
|
||||
${srcdir}/macos.texi \
|
||||
${srcdir}/msdog.texi \
|
||||
${srcdir}/gnu.texi \
|
||||
${srcdir}/glossary.texi \
|
||||
${srcdir}/ack.texi \
|
||||
${srcdir}/kmacro.texi \
|
||||
$(EMACS_XTRA)
|
||||
info: $(infodir) $(INFO_TARGETS)
|
||||
|
||||
info: $(top_srcdir)/info $(INFO_TARGETS)
|
||||
|
||||
$(top_srcdir)/info:
|
||||
$(infodir):
|
||||
mkdir $@
|
||||
|
||||
dvi: $(DVI_TARGETS)
|
||||
|
||||
|
||||
# Note that all the Info targets build the Info files
|
||||
# in srcdir. There is no provision for Info files
|
||||
# to exist in the build directory.
|
||||
# In a distribution of Emacs, the Info files should be up to date.
|
||||
|
||||
# The following target uses an explicit -o switch to work around
|
||||
# the @setfilename directive in info.texi, which is required for
|
||||
# the Texinfo distribution.
|
||||
|
||||
../info/info: ${INFOSOURCES}
|
||||
cd $(srcdir); $(MAKEINFO) --no-split info.texi -o $@
|
||||
|
||||
info.dvi: ${INFOSOURCES}
|
||||
$(ENVADD) $(TEXI2DVI) ${srcdir}/info.texi
|
||||
|
||||
../info/emacs: ${EMACSSOURCES}
|
||||
cd $(srcdir); $(MAKEINFO) emacs.texi
|
||||
|
||||
emacs.dvi: ${EMACSSOURCES}
|
||||
$(ENVADD) $(TEXI2DVI) ${srcdir}/emacs.texi
|
||||
|
||||
# This target is here so you could easily get the list of the *.texi
|
||||
# files which belong to the Emacs manual (as opposed to the separate
|
||||
# manuals for CL, CC Mode, Ebrowse, etc.). With this target, you can
|
||||
# say things like "grep foo `make emacsman`".
|
||||
emacsman:
|
||||
@echo $(EMACSSOURCES)
|
||||
|
||||
../info/ccmode: cc-mode.texi
|
||||
cd $(srcdir); $(MAKEINFO) cc-mode.texi
|
||||
cc-mode.dvi: cc-mode.texi
|
||||
$(ENVADD) $(TEXI2DVI) ${srcdir}/cc-mode.texi
|
||||
|
||||
../info/ada-mode: ada-mode.texi
|
||||
## "short" target names for convenience, to just rebuild one manual.
|
||||
ada-mode : $(infodir)/ada-mode
|
||||
$(infodir)/ada-mode: ada-mode.texi
|
||||
cd $(srcdir); $(MAKEINFO) ada-mode.texi
|
||||
ada-mode.dvi: ada-mode.texi
|
||||
$(ENVADD) $(TEXI2DVI) ${srcdir}/ada-mode.texi
|
||||
|
||||
../info/pcl-cvs: pcl-cvs.texi
|
||||
cd $(srcdir); $(MAKEINFO) pcl-cvs.texi
|
||||
pcl-cvs.dvi: pcl-cvs.texi
|
||||
$(ENVADD) $(TEXI2DVI) ${srcdir}/pcl-cvs.texi
|
||||
autotype : $(infodir)/autotype
|
||||
$(infodir)/autotype: autotype.texi
|
||||
cd $(srcdir); $(MAKEINFO) autotype.texi
|
||||
autotype.dvi: autotype.texi
|
||||
$(ENVADD) $(TEXI2DVI) ${srcdir}/autotype.texi
|
||||
|
||||
../info/eshell: eshell.texi
|
||||
cd $(srcdir); $(MAKEINFO) eshell.texi
|
||||
eshell.dvi: eshell.texi
|
||||
$(ENVADD) $(TEXI2DVI) ${srcdir}/eshell.texi
|
||||
calc : $(infodir)/calc
|
||||
$(infodir)/calc: calc.texi
|
||||
cd $(srcdir); $(MAKEINFO) calc.texi
|
||||
calc.dvi: calc.texi
|
||||
$(ENVADD) $(TEXI2DVI) ${srcdir}/calc.texi
|
||||
|
||||
../info/cl: cl.texi
|
||||
ccmode : $(infodir)/ccmode
|
||||
$(infodir)/ccmode: cc-mode.texi
|
||||
cd $(srcdir); $(MAKEINFO) cc-mode.texi
|
||||
cc-mode.dvi: cc-mode.texi
|
||||
$(ENVADD) $(TEXI2DVI) ${srcdir}/cc-mode.texi
|
||||
|
||||
cl : $(infodir)/cl
|
||||
$(infodir)/cl: cl.texi
|
||||
cd $(srcdir); $(MAKEINFO) cl.texi
|
||||
cl.dvi: cl.texi
|
||||
$(ENVADD) $(TEXI2DVI) ${srcdir}/cl.texi
|
||||
|
||||
../info/dired-x: dired-x.texi
|
||||
dired-x : $(infodir)/dired-x
|
||||
$(infodir)/dired-x: dired-x.texi
|
||||
cd $(srcdir); $(MAKEINFO) dired-x.texi
|
||||
dired-x.dvi: dired-x.texi
|
||||
$(ENVADD) $(TEXI2DVI) ${srcdir}/dired-x.texi
|
||||
|
||||
../info/ediff: ediff.texi
|
||||
ebrowse : $(infodir)/ebrowse
|
||||
$(infodir)/ebrowse: ebrowse.texi
|
||||
cd $(srcdir); $(MAKEINFO) ebrowse.texi
|
||||
ebrowse.dvi: ebrowse.texi
|
||||
$(ENVADD) $(TEXI2DVI) ${srcdir}/ebrowse.texi
|
||||
|
||||
ediff : $(infodir)/ediff
|
||||
$(infodir)/ediff: ediff.texi
|
||||
cd $(srcdir); $(MAKEINFO) ediff.texi
|
||||
ediff.dvi: ediff.texi
|
||||
$(ENVADD) $(TEXI2DVI) ${srcdir}/ediff.texi
|
||||
|
||||
emacs-xtra.dvi: emacs-xtra.texi $(EMACS_XTRA)
|
||||
$(ENVADD) $(TEXI2DVI) ${srcdir}/emacs-xtra.texi
|
||||
emacs-mime : $(infodir)/emacs-mime
|
||||
$(infodir)/emacs-mime: emacs-mime.texi
|
||||
cd $(srcdir); $(MAKEINFO) --enable-encoding emacs-mime.texi
|
||||
emacs-mime.dvi: emacs-mime.texi
|
||||
$(ENVADD) $(TEXI2DVI) ${srcdir}/emacs-mime.texi
|
||||
|
||||
../info/forms: forms.texi
|
||||
erc : $(infodir)/erc
|
||||
$(infodir)/erc: erc.texi
|
||||
cd $(srcdir); $(MAKEINFO) erc.texi
|
||||
erc.dvi: erc.texi
|
||||
$(ENVADD) $(TEXI2DVI) ${srcdir}/erc.texi
|
||||
|
||||
eshell : $(infodir)/eshell
|
||||
$(infodir)/eshell: eshell.texi
|
||||
cd $(srcdir); $(MAKEINFO) eshell.texi
|
||||
eshell.dvi: eshell.texi
|
||||
$(ENVADD) $(TEXI2DVI) ${srcdir}/eshell.texi
|
||||
|
||||
eudc : $(infodir)/eudc
|
||||
$(infodir)/eudc: eudc.texi
|
||||
cd $(srcdir); $(MAKEINFO) eudc.texi
|
||||
eudc.dvi: eudc.texi
|
||||
$(ENVADD) $(TEXI2DVI) ${srcdir}/eudc.texi
|
||||
|
||||
efaq : $(infodir)/efaq
|
||||
$(infodir)/efaq: faq.texi
|
||||
cd $(srcdir); $(MAKEINFO) faq.texi
|
||||
faq.dvi: faq.texi
|
||||
$(ENVADD) $(TEXI2DVI) ${srcdir}/faq.texi
|
||||
|
||||
flymake : $(infodir)/flymake
|
||||
$(infodir)/flymake: flymake.texi
|
||||
cd $(srcdir); $(MAKEINFO) flymake.texi
|
||||
flymake.dvi: flymake.texi
|
||||
$(ENVADD) $(TEXI2DVI) ${srcdir}/flymake.texi
|
||||
|
||||
forms : $(infodir)/forms
|
||||
$(infodir)/forms: forms.texi
|
||||
cd $(srcdir); $(MAKEINFO) forms.texi
|
||||
forms.dvi: forms.texi
|
||||
$(ENVADD) $(TEXI2DVI) ${srcdir}/forms.texi
|
||||
|
||||
# gnus/message/emacs-mime/sieve/pgg are part of Gnus:
|
||||
../info/gnus: gnus.texi gnus-faq.texi
|
||||
gnus : $(infodir)/gnus
|
||||
$(infodir)/gnus: gnus.texi gnus-faq.texi
|
||||
cd $(srcdir); $(MAKEINFO) gnus.texi
|
||||
gnus.dvi: gnus.texi gnus-faq.texi
|
||||
sed -e '/@iflatex/,/@end iflatex/d' ${srcdir}/gnus.texi > gnustmp.texi
|
||||
|
@ -207,162 +241,151 @@ gnus.dvi: gnus.texi gnus-faq.texi
|
|||
cp gnustmp.dvi $*.dvi
|
||||
rm gnustmp.*
|
||||
|
||||
../info/message: message.texi
|
||||
cd $(srcdir); $(MAKEINFO) message.texi
|
||||
message.dvi: message.texi
|
||||
$(ENVADD) $(TEXI2DVI) ${srcdir}/message.texi
|
||||
|
||||
../info/sieve: sieve.texi
|
||||
cd $(srcdir); $(MAKEINFO) sieve.texi
|
||||
sieve.dvi: sieve.texi
|
||||
$(ENVADD) $(TEXI2DVI) ${srcdir}/sieve.texi
|
||||
|
||||
../info/emacs-mime: emacs-mime.texi
|
||||
cd $(srcdir); $(MAKEINFO) --enable-encoding emacs-mime.texi
|
||||
emacs-mime.dvi: emacs-mime.texi
|
||||
$(ENVADD) $(TEXI2DVI) ${srcdir}/emacs-mime.texi
|
||||
|
||||
../info/pgg: pgg.texi
|
||||
cd $(srcdir); $(MAKEINFO) pgg.texi
|
||||
pgg.dvi: pgg.texi
|
||||
$(ENVADD) $(TEXI2DVI) ${srcdir}/pgg.texi
|
||||
|
||||
../info/mh-e: mh-e.texi
|
||||
cd $(srcdir); $(MAKEINFO) mh-e.texi
|
||||
mh-e.dvi: mh-e.texi
|
||||
$(ENVADD) $(TEXI2DVI) ${srcdir}/mh-e.texi
|
||||
|
||||
../info/reftex: reftex.texi
|
||||
cd $(srcdir); $(MAKEINFO) reftex.texi
|
||||
reftex.dvi: reftex.texi
|
||||
$(ENVADD) $(TEXI2DVI) ${srcdir}/reftex.texi
|
||||
|
||||
../info/sc: sc.texi
|
||||
cd $(srcdir); $(MAKEINFO) sc.texi
|
||||
sc.dvi: sc.texi
|
||||
$(ENVADD) $(TEXI2DVI) ${srcdir}/sc.texi
|
||||
|
||||
../info/vip: vip.texi
|
||||
cd $(srcdir); $(MAKEINFO) vip.texi
|
||||
vip.dvi: vip.texi
|
||||
$(ENVADD) $(TEXI2DVI) ${srcdir}/vip.texi
|
||||
|
||||
../info/viper: viper.texi
|
||||
cd $(srcdir); $(MAKEINFO) viper.texi
|
||||
viper.dvi: viper.texi
|
||||
$(ENVADD) $(TEXI2DVI) ${srcdir}/viper.texi
|
||||
|
||||
../info/widget: widget.texi
|
||||
cd $(srcdir); $(MAKEINFO) widget.texi
|
||||
widget.dvi: widget.texi
|
||||
$(ENVADD) $(TEXI2DVI) ${srcdir}/widget.texi
|
||||
|
||||
../info/efaq: faq.texi
|
||||
cd $(srcdir); $(MAKEINFO) faq.texi
|
||||
faq.dvi: faq.texi
|
||||
$(ENVADD) $(TEXI2DVI) ${srcdir}/faq.texi
|
||||
|
||||
../etc/GNU: gnu1.texi gnu.texi
|
||||
cd $(srcdir) && makeinfo --no-headers -o ../etc/GNU gnu1.texi
|
||||
|
||||
../info/autotype: autotype.texi
|
||||
cd $(srcdir); $(MAKEINFO) autotype.texi
|
||||
autotype.dvi: autotype.texi
|
||||
$(ENVADD) $(TEXI2DVI) ${srcdir}/autotype.texi
|
||||
|
||||
../info/calc: calc.texi
|
||||
cd $(srcdir); $(MAKEINFO) calc.texi
|
||||
|
||||
calc.dvi: calc.texi
|
||||
$(ENVADD) $(TEXI2DVI) ${srcdir}/calc.texi
|
||||
|
||||
# This is produced with --no-split to avoid making files whose
|
||||
# names clash on DOS 8+3 filesystems
|
||||
../info/idlwave: idlwave.texi
|
||||
idlwave : $(infodir)/idlwave
|
||||
$(infodir)/idlwave: idlwave.texi
|
||||
cd $(srcdir); $(MAKEINFO) --no-split idlwave.texi
|
||||
idlwave.dvi: idlwave.texi
|
||||
$(ENVADD) $(TEXI2DVI) ${srcdir}/idlwave.texi
|
||||
|
||||
../info/eudc: eudc.texi
|
||||
cd $(srcdir); $(MAKEINFO) eudc.texi
|
||||
eudc.dvi: eudc.texi
|
||||
$(ENVADD) $(TEXI2DVI) ${srcdir}/eudc.texi
|
||||
# The following target uses an explicit -o switch to work around
|
||||
# the @setfilename directive in info.texi, which is required for
|
||||
# the Texinfo distribution.
|
||||
###info : $(infodir)/info # circular!
|
||||
$(infodir)/info: info.texi
|
||||
cd $(srcdir); $(MAKEINFO) --no-split info.texi -o $@
|
||||
info.dvi: info.texi
|
||||
$(ENVADD) $(TEXI2DVI) ${srcdir}/info.texi
|
||||
|
||||
../info/ebrowse: ebrowse.texi
|
||||
cd $(srcdir); $(MAKEINFO) ebrowse.texi
|
||||
ebrowse.dvi: ebrowse.texi
|
||||
$(ENVADD) $(TEXI2DVI) ${srcdir}/ebrowse.texi
|
||||
message : $(infodir)/message
|
||||
$(infodir)/message: message.texi
|
||||
cd $(srcdir); $(MAKEINFO) message.texi
|
||||
message.dvi: message.texi
|
||||
$(ENVADD) $(TEXI2DVI) ${srcdir}/message.texi
|
||||
|
||||
../info/woman: woman.texi
|
||||
cd $(srcdir); $(MAKEINFO) woman.texi
|
||||
woman.dvi: woman.texi
|
||||
$(ENVADD) $(TEXI2DVI) ${srcdir}/woman.texi
|
||||
mh-e : $(infodir)/mh-e
|
||||
$(infodir)/mh-e: mh-e.texi
|
||||
cd $(srcdir); $(MAKEINFO) mh-e.texi
|
||||
mh-e.dvi: mh-e.texi
|
||||
$(ENVADD) $(TEXI2DVI) ${srcdir}/mh-e.texi
|
||||
|
||||
../info/org: org.texi
|
||||
cd $(srcdir); $(MAKEINFO) org.texi
|
||||
org.dvi: org.texi
|
||||
$(ENVADD) $(TEXI2DVI) ${srcdir}/org.texi
|
||||
|
||||
../info/url: url.texi
|
||||
cd $(srcdir); $(MAKEINFO) url.texi
|
||||
url.dvi: url.texi
|
||||
$(ENVADD) $(TEXI2DVI) ${srcdir}/url.texi
|
||||
|
||||
../info/speedbar: speedbar.texi
|
||||
cd $(srcdir); $(MAKEINFO) speedbar.texi
|
||||
speedbar.dvi: speedbar.texi
|
||||
$(ENVADD) $(TEXI2DVI) ${srcdir}/speedbar.texi
|
||||
|
||||
../info/tramp: tramp.texi trampver.texi
|
||||
cd $(srcdir); $(MAKEINFO) -D emacs tramp.texi
|
||||
tramp.dvi: tramp.texi trampver.texi
|
||||
$(ENVADD) $(TEXI2DVI) ${srcdir}/tramp.texi
|
||||
|
||||
../info/ses: ses.texi
|
||||
cd $(srcdir); $(MAKEINFO) ses.texi
|
||||
ses.dvi: ses.texi
|
||||
$(ENVADD) $(TEXI2DVI) ${srcdir}/ses.texi
|
||||
|
||||
../info/smtpmail: smtpmail.texi
|
||||
cd $(srcdir); $(MAKEINFO) smtpmail.texi
|
||||
smtpmail.dvi: smtpmail.texi
|
||||
$(ENVADD) $(TEXI2DVI) ${srcdir}/smtpmail.texi
|
||||
|
||||
../info/flymake: flymake.texi
|
||||
cd $(srcdir); $(MAKEINFO) flymake.texi
|
||||
flymake.dvi: flymake.texi
|
||||
$(ENVADD) $(TEXI2DVI) ${srcdir}/flymake.texi
|
||||
|
||||
../info/newsticker: newsticker.texi
|
||||
newsticker : $(infodir)/newsticker
|
||||
$(infodir)/newsticker: newsticker.texi
|
||||
cd $(srcdir); $(MAKEINFO) newsticker.texi
|
||||
newsticker.dvi: newsticker.texi
|
||||
$(ENVADD) $(TEXI2DVI) ${srcdir}/newsticker.texi
|
||||
|
||||
../info/rcirc: rcirc.texi
|
||||
org : $(infodir)/org
|
||||
$(infodir)/org: org.texi
|
||||
cd $(srcdir); $(MAKEINFO) org.texi
|
||||
org.dvi: org.texi
|
||||
$(ENVADD) $(TEXI2DVI) ${srcdir}/org.texi
|
||||
|
||||
pcl-cvs : $(infodir)/pcl-cvs
|
||||
$(infodir)/pcl-cvs: pcl-cvs.texi
|
||||
cd $(srcdir); $(MAKEINFO) pcl-cvs.texi
|
||||
pcl-cvs.dvi: pcl-cvs.texi
|
||||
$(ENVADD) $(TEXI2DVI) ${srcdir}/pcl-cvs.texi
|
||||
|
||||
pgg : $(infodir)/pgg
|
||||
$(infodir)/pgg: pgg.texi
|
||||
cd $(srcdir); $(MAKEINFO) pgg.texi
|
||||
pgg.dvi: pgg.texi
|
||||
$(ENVADD) $(TEXI2DVI) ${srcdir}/pgg.texi
|
||||
|
||||
rcirc : $(infodir)/rcirc
|
||||
$(infodir)/rcirc: rcirc.texi
|
||||
cd $(srcdir); $(MAKEINFO) rcirc.texi
|
||||
rcirc.dvi: rcirc.texi
|
||||
$(ENVADD) $(TEXI2DVI) ${srcdir}/rcirc.texi
|
||||
|
||||
../info/erc: erc.texi
|
||||
cd $(srcdir); $(MAKEINFO) erc.texi
|
||||
erc.dvi: erc.texi
|
||||
$(ENVADD) $(TEXI2DVI) ${srcdir}/erc.texi
|
||||
reftex : $(infodir)/reftex
|
||||
$(infodir)/reftex: reftex.texi
|
||||
cd $(srcdir); $(MAKEINFO) reftex.texi
|
||||
reftex.dvi: reftex.texi
|
||||
$(ENVADD) $(TEXI2DVI) ${srcdir}/reftex.texi
|
||||
|
||||
sc : $(infodir)/sc
|
||||
$(infodir)/sc: sc.texi
|
||||
cd $(srcdir); $(MAKEINFO) sc.texi
|
||||
sc.dvi: sc.texi
|
||||
$(ENVADD) $(TEXI2DVI) ${srcdir}/sc.texi
|
||||
|
||||
ses : $(infodir)/ses
|
||||
$(infodir)/ses: ses.texi
|
||||
cd $(srcdir); $(MAKEINFO) ses.texi
|
||||
ses.dvi: ses.texi
|
||||
$(ENVADD) $(TEXI2DVI) ${srcdir}/ses.texi
|
||||
|
||||
sieve : $(infodir)/sieve
|
||||
$(infodir)/sieve: sieve.texi
|
||||
cd $(srcdir); $(MAKEINFO) sieve.texi
|
||||
sieve.dvi: sieve.texi
|
||||
$(ENVADD) $(TEXI2DVI) ${srcdir}/sieve.texi
|
||||
|
||||
smtpmail : $(infodir)/smtpmail
|
||||
$(infodir)/smtpmail: smtpmail.texi
|
||||
cd $(srcdir); $(MAKEINFO) smtpmail.texi
|
||||
smtpmail.dvi: smtpmail.texi
|
||||
$(ENVADD) $(TEXI2DVI) ${srcdir}/smtpmail.texi
|
||||
|
||||
speedbar : $(infodir)/speedbar
|
||||
$(infodir)/speedbar: speedbar.texi
|
||||
cd $(srcdir); $(MAKEINFO) speedbar.texi
|
||||
speedbar.dvi: speedbar.texi
|
||||
$(ENVADD) $(TEXI2DVI) ${srcdir}/speedbar.texi
|
||||
|
||||
tramp : $(infodir)/tramp
|
||||
$(infodir)/tramp: tramp.texi trampver.texi
|
||||
cd $(srcdir); $(MAKEINFO) -D emacs tramp.texi
|
||||
tramp.dvi: tramp.texi trampver.texi
|
||||
$(ENVADD) $(TEXI2DVI) ${srcdir}/tramp.texi
|
||||
|
||||
url : $(infodir)/url
|
||||
$(infodir)/url: url.texi
|
||||
cd $(srcdir); $(MAKEINFO) url.texi
|
||||
url.dvi: url.texi
|
||||
$(ENVADD) $(TEXI2DVI) ${srcdir}/url.texi
|
||||
|
||||
vip : $(infodir)/vip
|
||||
$(infodir)/vip: vip.texi
|
||||
cd $(srcdir); $(MAKEINFO) vip.texi
|
||||
vip.dvi: vip.texi
|
||||
$(ENVADD) $(TEXI2DVI) ${srcdir}/vip.texi
|
||||
|
||||
viper : $(infodir)/viper
|
||||
$(infodir)/viper: viper.texi
|
||||
cd $(srcdir); $(MAKEINFO) viper.texi
|
||||
viper.dvi: viper.texi
|
||||
$(ENVADD) $(TEXI2DVI) ${srcdir}/viper.texi
|
||||
|
||||
widget : $(infodir)/widget
|
||||
$(infodir)/widget: widget.texi
|
||||
cd $(srcdir); $(MAKEINFO) widget.texi
|
||||
widget.dvi: widget.texi
|
||||
$(ENVADD) $(TEXI2DVI) ${srcdir}/widget.texi
|
||||
|
||||
woman : $(infodir)/woman
|
||||
$(infodir)/woman: woman.texi
|
||||
cd $(srcdir); $(MAKEINFO) woman.texi
|
||||
woman.dvi: woman.texi
|
||||
$(ENVADD) $(TEXI2DVI) ${srcdir}/woman.texi
|
||||
|
||||
|
||||
mostlyclean:
|
||||
rm -f *.log *.cp *.fn *.ky *.pg *.vr core *.tp *.core gnustmp.*
|
||||
rm -f *.log *.cp *.fn *.ky *.op *.ops *.pg *.vr core *.tp \
|
||||
*.tps *.core gnustmp.*
|
||||
rm -f *.aux *.cps *.fns *.kys *.pgs *.vrs *.toc
|
||||
|
||||
clean: mostlyclean
|
||||
rm -f *.dvi
|
||||
|
||||
distclean: clean
|
||||
# rm -f Makefile
|
||||
|
||||
maintainer-clean: distclean
|
||||
rm -f *.aux *.cps *.fns *.kys *.pgs *.vrs *.toc
|
||||
for file in $(INFO_TARGETS); do rm -f $${file}*; done
|
||||
|
||||
|
||||
# Formerly this directory had texindex.c and getopt.c in it
|
||||
# and this makefile built them to make texindex.
|
||||
# That caused trouble because this is run entirely in the source directory.
|
||||
# Since we expect to get texi2dvi from elsewhere,
|
||||
# it is ok to expect texindex from elsewhere also.
|
||||
### Makefile ends here
|
|
@ -1,5 +1,5 @@
|
|||
\input texinfo @c -*-texinfo-*-
|
||||
@setfilename ../info/ada-mode
|
||||
@setfilename ../../info/ada-mode
|
||||
@settitle Ada Mode
|
||||
|
||||
@copying
|
|
@ -3,7 +3,7 @@
|
|||
@c Copyright (C) 1994, 1995, 2001, 2002, 2003, 2004,
|
||||
@c 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
@c Author: Daniel.Pfeiffer@Informatik.START.dbp.de, fax (+49 69) 7588-2389
|
||||
@setfilename ../info/autotype
|
||||
@setfilename ../../info/autotype
|
||||
@c @node Autotypist, Picture, Abbrevs, Top
|
||||
@c @chapter Features for Automatic Typing
|
||||
@settitle Features for Automatic Typing
|
|
@ -1,7 +1,7 @@
|
|||
\input texinfo @c -*-texinfo-*-
|
||||
@comment %**start of header (This is for running Texinfo on a region.)
|
||||
@c smallbook
|
||||
@setfilename ../info/calc
|
||||
@setfilename ../../info/calc
|
||||
@c [title]
|
||||
@settitle GNU Emacs Calc 2.1 Manual
|
||||
@setchapternewpage odd
|
||||
|
@ -1204,10 +1204,11 @@ Carl Witty, whose eagle eyes discovered many typographical and factual
|
|||
errors in the Calc manual; Tim Kay, who drove the development of
|
||||
Embedded mode; Ove Ewerlid, who made many suggestions relating to the
|
||||
algebra commands and contributed some code for polynomial operations;
|
||||
Randal Schwartz, who suggested the @code{calc-eval} function; Robert
|
||||
J. Chassell, who suggested the Calc Tutorial and exercises; and Juha
|
||||
Randal Schwartz, who suggested the @code{calc-eval} function; Juha
|
||||
Sarlin, who first worked out how to split Calc into quickly-loading
|
||||
parts. Bob Weiner helped immensely with the Lucid Emacs port.
|
||||
parts; Bob Weiner, who helped immensely with the Lucid Emacs port; and
|
||||
Robert J. Chassell, who suggested the Calc Tutorial and exercises as
|
||||
well as many other things.
|
||||
|
||||
@cindex Bibliography
|
||||
@cindex Knuth, Art of Computer Programming
|
||||
|
@ -11053,17 +11054,44 @@ Please note that there is no ``year 0''; the day before
|
|||
days 0 and @mathit{-1} respectively in Calc's internal numbering scheme.
|
||||
|
||||
@cindex Julian day counting
|
||||
Another day counting system in common use is, confusingly, also
|
||||
called ``Julian.'' It was invented in 1583 by Joseph Justus
|
||||
Scaliger, who named it in honor of his father Julius Caesar
|
||||
Scaliger. For obscure reasons he chose to start his day
|
||||
numbering on Jan 1, 4713 BC at noon, which in Calc's scheme
|
||||
Another day counting system in common use is, confusingly, also called
|
||||
``Julian.'' The Julian day number is the numbers of days since
|
||||
12:00 noon (GMT) on Jan 1, 4713 BC, which in Calc's scheme (in GMT)
|
||||
is @mathit{-1721423.5} (recall that Calc starts at midnight instead
|
||||
of noon). Thus to convert a Calc date code obtained by
|
||||
unpacking a date form into a Julian day number, simply add
|
||||
1721423.5. The Julian code for @samp{6:00am Jan 9, 1991}
|
||||
is 2448265.75. The built-in @kbd{t J} command performs
|
||||
this conversion for you.
|
||||
of noon). Thus to convert a Calc date code obtained by unpacking a
|
||||
date form into a Julian day number, simply add 1721423.5 after
|
||||
compensating for the time zone difference. The built-in @kbd{t J}
|
||||
command performs this conversion for you.
|
||||
|
||||
The Julian day number is based on the Julian cycle, which was invented
|
||||
in 1583 by Joseph Justus Scaliger. Scaliger named it the Julian cycle
|
||||
since it is involves the Julian calendar, but some have suggested that
|
||||
Scaliger named it in honor of his father, Julius Caesar Scaliger. The
|
||||
Julian cycle is based it on three other cycles: the indiction cycle,
|
||||
the Metonic cycle, and the solar cycle. The indiction cycle is a 15
|
||||
year cycle originally used by the Romans for tax purposes but later
|
||||
used to date medieval documents. The Metonic cycle is a 19 year
|
||||
cycle; 19 years is close to being a common multiple of a solar year
|
||||
and a lunar month, and so every 19 years the phases of the moon will
|
||||
occur on the same days of the year. The solar cycle is a 28 year
|
||||
cycle; the Julian calendar repeats itself every 28 years. The
|
||||
smallest time period which contains multiples of all three cycles is
|
||||
the least common multiple of 15 years, 19 years and 28 years, which
|
||||
(since they're pairwise relatively prime) is
|
||||
@texline @math{15\times 19\times 28 = 7980} years.
|
||||
@infoline 15*19*28 = 7980 years.
|
||||
This is the length of a Julian cycle. Working backwards, the previous
|
||||
year in which all three cycles began was 4713 BC, and so Scalinger
|
||||
chose that year as the beginning of a Julian cycle. Since at the time
|
||||
there were no historical records from before 4713 BC, using this year
|
||||
as a starting point had the advantage of avoiding negative year
|
||||
numbers. In 1849, the astronomer John Herschel (son of William
|
||||
Herschel) suggested using the number of days since the beginning of
|
||||
the Julian cycle as an astronomical dating system; this idea was taken
|
||||
up by other astronomers. (At the time, noon was the start of the
|
||||
astronomical day. Herschel originally suggested counting the days
|
||||
since Jan 1, 4713 BC at noon Alexandria time; this was later amended to
|
||||
noon GMT.) Julian day numbering is largely used in astronomy.
|
||||
|
||||
@cindex Unix time format
|
||||
The Unix operating system measures time as an integer number of
|
||||
|
@ -16656,9 +16684,9 @@ The last two arguments default to zero if omitted.
|
|||
@cindex Julian day counts, conversions
|
||||
The @kbd{t J} (@code{calc-julian}) [@code{julian}] command converts
|
||||
a date form into a Julian day count, which is the number of days
|
||||
since noon on Jan 1, 4713 BC. A pure date is converted to an integer
|
||||
Julian count representing noon of that day. A date/time form is
|
||||
converted to an exact floating-point Julian count, adjusted to
|
||||
since noon (GMT) on Jan 1, 4713 BC. A pure date is converted to an
|
||||
integer Julian count representing noon of that day. A date/time form
|
||||
is converted to an exact floating-point Julian count, adjusted to
|
||||
interpret the date form in the current time zone but the Julian
|
||||
day count in Greenwich Mean Time. A numeric prefix argument allows
|
||||
you to specify the time zone; @pxref{Time Zones}. Use a prefix of
|
||||
|
@ -18599,7 +18627,7 @@ Given a positive numeric prefix argument @expr{M}, it produces a random
|
|||
integer @expr{N} in the range
|
||||
@texline @math{0 \le N < M}.
|
||||
@infoline @expr{0 <= N < M}.
|
||||
Each of the @expr{M} values appears with equal probability.
|
||||
Each possible value @expr{N} appears with equal probability.
|
||||
|
||||
With no numeric prefix argument, the @kbd{k r} command takes its argument
|
||||
from the stack instead. Once again, if this is a positive integer @expr{M}
|
||||
|
@ -27494,8 +27522,8 @@ If the value on the stack does not contain any units, @kbd{u c} will
|
|||
prompt first for the old units which this value should be considered
|
||||
to have, then for the new units. Assuming the old and new units you
|
||||
give are consistent with each other, the result also will not contain
|
||||
any units. For example, @kbd{@w{u c} cm @key{RET} in @key{RET}} converts the number
|
||||
2 on the stack to 5.08.
|
||||
any units. For example, @kbd{@w{u c} cm @key{RET} in @key{RET}}
|
||||
converts the number 2 on the stack to 5.08.
|
||||
|
||||
@kindex u b
|
||||
@pindex calc-base-units
|
||||
|
@ -27619,6 +27647,29 @@ column of the Units Table.
|
|||
@section Predefined Units
|
||||
|
||||
@noindent
|
||||
The definitions of many units have changed over the years. For example,
|
||||
the meter was originally defined in 1791 as one ten-millionth of the
|
||||
distance from the equator to the north pole. In order to be more
|
||||
precise, the definition was adjusted several times, and now a meter is
|
||||
defined as the distance that light will travel in a vacuum in
|
||||
1/299792458 of a second; consequently, the speed of light in a
|
||||
vacuum is exactly 299792458 m/s. Many other units have been
|
||||
redefined in terms of fundamental physical processes; a second, for
|
||||
example, is currently defined as 9192631770 periods of a certain
|
||||
radiation related to the cesium-133 atom. The only SI unit that is not
|
||||
based on a fundamental physical process (although there are efforts to
|
||||
change this) is the kilogram, which was originally defined as the mass
|
||||
of one liter of water, but is now defined as the mass of the
|
||||
International Prototype Kilogram (IPK), a cylinder of platinum-iridium
|
||||
kept at the Bureau International des Poids et Mesures in S@`evres,
|
||||
France. (There are several copies of the IPK throughout the world.)
|
||||
The British imperial units, once defined in terms of physical objects,
|
||||
were redefined in 1963 in terms of SI units. The US customary units,
|
||||
which were the same as British units until the British imperial system
|
||||
was created in 1824, were also defined in terms of the SI units in 1893.
|
||||
Because of these redefinitions, conversions between metric, British
|
||||
Imperial, and US customary units can often be done precisely.
|
||||
|
||||
Since the exact definitions of many kinds of units have evolved over the
|
||||
years, and since certain countries sometimes have local differences in
|
||||
their definitions, it is a good idea to examine Calc's definition of a
|
|
@ -81,7 +81,7 @@ the second with them pointing to the XEmacs manuals.
|
|||
@comment No overfull hbox marks in the dvi file.
|
||||
@finalout
|
||||
|
||||
@setfilename ../info/ccmode
|
||||
@setfilename ../../info/ccmode
|
||||
@settitle CC Mode Manual
|
||||
@footnotestyle end
|
||||
|
||||
|
@ -208,9 +208,9 @@ license to the document, as described in section 6 of the license.
|
|||
@vskip 0pt plus 1filll
|
||||
@insertcopying
|
||||
|
||||
This manual was generated from $Revision$ of $RCSfile$, which can be
|
||||
This manual was generated from $Revision: 1.2 $ of $RCSfile: cc-mode.texi,v $, which can be
|
||||
downloaded from
|
||||
@url{http://cvs.savannah.gnu.org/viewcvs/emacs/emacs/man/cc-mode.texi}.
|
||||
@url{http://cvs.savannah.gnu.org/viewcvs/emacs/emacs/doc/misc/cc-mode.texi}.
|
||||
@end titlepage
|
||||
|
||||
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
@ -1,5 +1,5 @@
|
|||
\input texinfo @c -*-texinfo-*-
|
||||
@setfilename ../info/cl
|
||||
@setfilename ../../info/cl
|
||||
@settitle Common Lisp Extensions
|
||||
|
||||
@copying
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
@comment %**start of header (This is for running Texinfo on a region.)
|
||||
@c FOR GNU EMACS USE ../info/dired-x BELOW
|
||||
@setfilename ../info/dired-x
|
||||
@setfilename ../../info/dired-x
|
||||
@c dired-x.el REVISION NUMBER
|
||||
@settitle Dired Extra Version 2 User's Manual
|
||||
@iftex
|
1462
doc/misc/ebrowse.texi
Normal file
1462
doc/misc/ebrowse.texi
Normal file
File diff suppressed because it is too large
Load diff
|
@ -7,7 +7,7 @@
|
|||
@comment Using ediff.info instead of ediff in setfilename breaks DOS.
|
||||
@comment @setfilename ediff
|
||||
@comment @setfilename ediff.info
|
||||
@setfilename ../info/ediff
|
||||
@setfilename ../../info/ediff
|
||||
|
||||
@settitle Ediff User's Manual
|
||||
@synindex vr cp
|
1832
doc/misc/emacs-mime.texi
Normal file
1832
doc/misc/emacs-mime.texi
Normal file
File diff suppressed because it is too large
Load diff
|
@ -1,6 +1,6 @@
|
|||
\input texinfo
|
||||
@c %**start of header
|
||||
@setfilename ../info/erc
|
||||
@setfilename ../../info/erc
|
||||
@settitle ERC Manual
|
||||
@c %**end of header
|
||||
|
||||
|
@ -68,6 +68,10 @@ and modified without restriction.
|
|||
* Advanced Usage:: Cool ways of using ERC.
|
||||
* Getting Help and Reporting Bugs::
|
||||
* History:: The history of ERC.
|
||||
* Copying:: The GNU General Public License gives you
|
||||
permission to redistribute ERC on
|
||||
certain terms; it also explains that
|
||||
there is no warranty.
|
||||
* GNU Free Documentation License:: The license for this documentation.
|
||||
* Concept Index:: Search for terms.
|
||||
|
||||
|
@ -389,7 +393,7 @@ buffers in Emacs. We call these ``query buffers''.
|
|||
|
||||
@item highlighting
|
||||
|
||||
Some occurences of words can be highlighted, which makes it easier to
|
||||
Some occurrences of words can be highlighted, which makes it easier to
|
||||
track different kinds of conversations.
|
||||
|
||||
@item notification
|
||||
|
@ -900,7 +904,7 @@ stuff, to the current ERC buffer."
|
|||
@c previous chapter)
|
||||
|
||||
This section has not yet been written. For now, the easiest way to
|
||||
check out the available option for ERC is to do
|
||||
check out the available options for ERC is to do
|
||||
@kbd{M-x customize-group erc RET}.
|
||||
|
||||
|
||||
|
@ -916,7 +920,7 @@ or if you have bugs to report, there are several places you can go.
|
|||
@itemize @bullet
|
||||
|
||||
@item
|
||||
@uref{http://www.emacswiki.org/cgi-bin/wiki/EmacsIRCClient} is the
|
||||
@uref{http://www.emacswiki.org/cgi-bin/wiki/ERC} is the
|
||||
emacswiki.org page for ERC. Anyone may add tips, hints, or bug
|
||||
descriptions to it.
|
||||
|
||||
|
@ -929,14 +933,11 @@ The mailing lists are also available on Gmane.
|
|||
accessing the mailing lists, adding content to them, and searching them.
|
||||
|
||||
@enumerate
|
||||
@item gmane.emacs.erc.announce
|
||||
Announcements
|
||||
@item gmane.emacs.erc.announce: Announcements
|
||||
|
||||
@item gmane.emacs.erc.discuss
|
||||
General discussion
|
||||
@item gmane.emacs.erc.discuss: General discussion
|
||||
|
||||
@item gmane.emacs.erc.cvs
|
||||
Log messages for changes to the ERC source code
|
||||
@item gmane.emacs.erc.cvs: Log messages for changes to the ERC source code
|
||||
|
||||
@end enumerate
|
||||
|
||||
|
@ -948,7 +949,7 @@ questions.
|
|||
@end itemize
|
||||
|
||||
|
||||
@node History, GNU Free Documentation License, Getting Help and Reporting Bugs, Top
|
||||
@node History, Copying, Getting Help and Reporting Bugs, Top
|
||||
@comment node-name, next, previous, up
|
||||
@chapter History
|
||||
@cindex history, of ERC
|
||||
|
@ -1010,8 +1011,12 @@ our revision control system. Our mailing list address changed as well.
|
|||
|
||||
@end itemize
|
||||
|
||||
@node GNU Free Documentation License, Concept Index, History, Top
|
||||
@appendix GNU Free Documentation License
|
||||
@node Copying, GNU Free Documentation License, History, Top
|
||||
@comment node-name, next, previous, up
|
||||
@include gpl.texi
|
||||
|
||||
@node GNU Free Documentation License, Concept Index, Copying, Top
|
||||
@comment node-name, next, previous, up
|
||||
@include doclicense.texi
|
||||
|
||||
@node Concept Index, , GNU Free Documentation License, Top
|
948
doc/misc/eshell.texi
Normal file
948
doc/misc/eshell.texi
Normal file
|
@ -0,0 +1,948 @@
|
|||
\input texinfo @c -*-texinfo-*-
|
||||
@c %**start of header
|
||||
@setfilename ../../info/eshell
|
||||
@settitle Eshell: The Emacs Shell
|
||||
@synindex vr fn
|
||||
@c %**end of header
|
||||
|
||||
@copying
|
||||
This manual is for Eshell, the Emacs shell.
|
||||
|
||||
Copyright @copyright{} 1999, 2000, 2001, 2002, 2003, 2004,
|
||||
2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
@quotation
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.2 or
|
||||
any later version published by the Free Software Foundation; with no
|
||||
Invariant Sections, with the Front-Cover texts being ``A GNU
|
||||
Manual'', and with the Back-Cover Texts as in (a) below. A copy of the
|
||||
license is included in the section entitled ``GNU Free Documentation
|
||||
License'' in the Emacs manual.
|
||||
|
||||
(a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
|
||||
this GNU Manual, like GNU software. Copies published by the Free
|
||||
Software Foundation raise funds for GNU development.''
|
||||
|
||||
This document is part of a collection distributed under the GNU Free
|
||||
Documentation License. If you want to distribute this document
|
||||
separately from the collection, you can do so by adding a copy of the
|
||||
license to the document, as described in section 6 of the license.
|
||||
@end quotation
|
||||
@end copying
|
||||
|
||||
@dircategory Emacs
|
||||
@direntry
|
||||
* Eshell: (eshell). A command shell implemented in Emacs Lisp.
|
||||
@end direntry
|
||||
|
||||
@setchapternewpage on
|
||||
|
||||
@titlepage
|
||||
@sp 4
|
||||
@c The title is printed in a large font.
|
||||
@center @titlefont{User's Guide}
|
||||
@sp
|
||||
@center @titlefont{to}
|
||||
@sp
|
||||
@center @titlefont{Eshell: The Emacs Shell}
|
||||
@ignore
|
||||
@sp 2
|
||||
@center release 2.4
|
||||
@c -release-
|
||||
@end ignore
|
||||
@sp 3
|
||||
@center John Wiegley
|
||||
@c -date-
|
||||
|
||||
@page
|
||||
@vskip 0pt plus 1filll
|
||||
@insertcopying
|
||||
@end titlepage
|
||||
|
||||
@contents
|
||||
|
||||
@c ================================================================
|
||||
@c The real text starts here
|
||||
@c ================================================================
|
||||
|
||||
@ifnottex
|
||||
@node Top, What is Eshell?, (dir), (dir)
|
||||
@top Eshell
|
||||
|
||||
This manual documents Eshell, a shell-like command interpretor
|
||||
implemented in Emacs Lisp. It invokes no external processes except for
|
||||
those requested by the user. It is intended to be a functional
|
||||
replacement for command shells such as @command{bash}, @command{zsh},
|
||||
@command{rc}, or @command{4dos}; since Emacs itself is capable of
|
||||
handling the sort of tasks accomplished by those tools.
|
||||
@c This manual is updated to release 2.4 of Eshell.
|
||||
@end ifnottex
|
||||
|
||||
@menu
|
||||
* What is Eshell?:: A brief introduction to the Emacs Shell.
|
||||
* Command basics:: The basics of command usage.
|
||||
* Commands::
|
||||
* Arguments::
|
||||
* Input/Output::
|
||||
* Process control::
|
||||
* Extension modules::
|
||||
* Extras and Goodies::
|
||||
* Bugs and ideas:: Known problems, and future ideas.
|
||||
* GNU Free Documentation License:: The license for this documentation.
|
||||
* Concept Index::
|
||||
* Function and Variable Index::
|
||||
* Key Index::
|
||||
@end menu
|
||||
|
||||
@node What is Eshell?
|
||||
@chapter What is Eshell?
|
||||
@cindex what is Eshell?
|
||||
@cindex Eshell, what it is
|
||||
|
||||
Eshell is a @dfn{command shell} written in Emacs Lisp. Everything it
|
||||
does, it uses Emacs' facilities to do. This means that Eshell is as
|
||||
portable as Emacs itself. It also means that cooperation with Lisp code
|
||||
is natural and seamless.
|
||||
|
||||
What is a command shell? To properly understand the role of a shell,
|
||||
it's necessary to visualize what a computer does for you. Basically, a
|
||||
computer is a tool; in order to use that tool, you must tell it what to
|
||||
do---or give it ``commands.'' These commands take many forms, such as
|
||||
clicking with a mouse on certain parts of the screen. But that is only
|
||||
one form of command input.
|
||||
|
||||
By far the most versatile way to express what you want the computer to
|
||||
do is by using an abbreviated language called @dfn{script}. In
|
||||
script, instead of telling the computer, ``list my files, please'',
|
||||
one writes a standard abbreviated command word---@samp{ls}. Typing
|
||||
@samp{ls} in a command shell is a script way of telling the computer
|
||||
to list your files.@footnote{This is comparable to viewing the
|
||||
contents of a folder using a graphical display.}
|
||||
|
||||
The real flexibility of this approach is apparent only when you realize
|
||||
that there are many, many different ways to list files. Perhaps you
|
||||
want them sorted by name, sorted by date, in reverse order, or grouped
|
||||
by type. Most graphical browsers have simple ways to express this. But
|
||||
what about showing only a few files, or only files that meet a certain
|
||||
criteria? In very complex and specific situations, the request becomes
|
||||
too difficult to express using a mouse or pointing device. It is just
|
||||
these kinds of requests that are easily solved using a command shell.
|
||||
|
||||
For example, what if you want to list every Word file on your hard
|
||||
drive, larger than 100 kilobytes in size, and which hasn't been looked
|
||||
at in over six months? That is a good candidate list for deletion, when
|
||||
you go to clean up your hard drive. But have you ever tried asking your
|
||||
computer for such a list? There is no way to do it! At least, not
|
||||
without using a command shell.
|
||||
|
||||
The role of a command shell is to give you more control over what your
|
||||
computer does for you. Not everyone needs this amount of control, and
|
||||
it does come at a cost: Learning the necessary script commands to
|
||||
express what you want done. A complicated query, such as the example
|
||||
above, takes time to learn. But if you find yourself using your
|
||||
computer frequently enough, it is more than worthwhile in the long run.
|
||||
Any tool you use often deserves the time spent learning to master it.
|
||||
@footnote{For the understandably curious, here is what that command
|
||||
looks like: But don't let it fool you; once you know what's going on,
|
||||
it's easier than it looks: @code{ls -lt **/*.doc(Lk+50aM+5)}.}
|
||||
|
||||
@menu
|
||||
* Contributors to Eshell:: People who have helped out!
|
||||
@end menu
|
||||
|
||||
@node Contributors to Eshell
|
||||
@section Contributors to Eshell
|
||||
@cindex contributors
|
||||
@cindex authors
|
||||
|
||||
Contributions to Eshell are welcome. I have limited time to work on
|
||||
this project, but I will gladly add any code you contribute to me to
|
||||
this package.
|
||||
|
||||
The following persons have made contributions to Eshell.
|
||||
|
||||
@itemize @bullet
|
||||
@item
|
||||
Eli Zaretskii made it possible for Eshell to run without requiring
|
||||
asynchronous subprocess support. This is important for MS-DOS, which
|
||||
does not have such support.@refill
|
||||
|
||||
@item
|
||||
Miles Bader contributed many fixes during the port to Emacs 21.@refill
|
||||
|
||||
@item
|
||||
Stefan Monnier fixed the things which bothered him, which of course made
|
||||
things better for all.@refill
|
||||
|
||||
@item
|
||||
Gerd Moellmann also helped to contribute bug fixes during the initial
|
||||
integration with Emacs 21.@refill
|
||||
|
||||
@item
|
||||
Alex Schroeder contributed code for interactively querying the user
|
||||
before overwriting files.@refill
|
||||
|
||||
@item
|
||||
Sudish Joseph helped with some XEmacs compatibility issues.@refill
|
||||
@end itemize
|
||||
|
||||
Apart from these, a lot of people have sent suggestions, ideas,
|
||||
requests, bug reports and encouragement. Thanks a lot! Without you
|
||||
there would be no new releases of Eshell.
|
||||
|
||||
@node Command basics
|
||||
@chapter Basic overview
|
||||
|
||||
A command shell is a means of entering verbally-formed commands. This
|
||||
is really all that it does, and every feature described in this manual
|
||||
is a means to that end. Therefore, it's important to take firm hold on
|
||||
exactly what a command is, and how it fits in the overall picture of
|
||||
things.
|
||||
|
||||
@menu
|
||||
* Commands verbs:: Commands always begin with a verb.
|
||||
* Command arguments:: Some verbs require arguments.
|
||||
@end menu
|
||||
|
||||
@node Commands verbs
|
||||
@section Commands verbs
|
||||
|
||||
Commands are expressed using @dfn{script}, a special shorthand language
|
||||
computers can understand with no trouble. Script is an extremely simple
|
||||
language; oddly enough, this is what makes it look so complicated!
|
||||
Whereas normal languages use a variety of embellishments, the form of a
|
||||
script command is always:
|
||||
|
||||
@example
|
||||
@var{verb} [@var{arguments}]
|
||||
@end example
|
||||
|
||||
The verb expresses what you want your computer to do. There are a fixed
|
||||
number of verbs, although this number is usually quite large. On the
|
||||
author's computer, it reaches almost 1400 in number. But of course,
|
||||
only a handful of these are really necessary.
|
||||
|
||||
Sometimes, the verb is all that's written. A verb is always a single
|
||||
word, usually related to the task it performs. @command{reboot} is a
|
||||
good example. Entering that on GNU/Linux will reboot the
|
||||
computer---assuming you have sufficient privileges.
|
||||
|
||||
Other verbs require more information. These are usually very capable
|
||||
verbs, and must be told specifically what to do. The extra information
|
||||
is given in the form of @dfn{arguments}. For example, the
|
||||
@command{echo} verb prints back whatever arguments you type. It
|
||||
requires these arguments to know what to echo. A proper use of
|
||||
@command{echo} looks like this:
|
||||
|
||||
@example
|
||||
echo This is an example of using echo!
|
||||
@end example
|
||||
|
||||
This script command causes the computer to echo back: ``This is an
|
||||
example of using echo!''
|
||||
|
||||
Although command verbs are always simple words, like @command{reboot} or
|
||||
@command{echo}, arguments may have a wide variety of forms. There are
|
||||
textual arguments, numerical arguments---even Lisp arguments.
|
||||
Distinguishing these different types of arguments requires special
|
||||
typing, for the computer to know exactly what you mean.
|
||||
|
||||
@node Command arguments
|
||||
@section Command arguments
|
||||
|
||||
Eshell recognizes several different kinds of command arguments:
|
||||
|
||||
@enumerate
|
||||
@item Strings (also called textual arguments)
|
||||
@item Numbers (floating point or integer)
|
||||
@item Lisp lists
|
||||
@item Lisp symbols
|
||||
@item Emacs buffers
|
||||
@item Emacs process handles
|
||||
@end enumerate
|
||||
|
||||
Most users need to worry only about the first two. The third, Lisp lists,
|
||||
occur very frequently, but almost always behind the scenes.
|
||||
|
||||
Strings are the most common type of argument, and consist of nearly any
|
||||
character. Special characters---those used by Eshell
|
||||
specifically---must be preceded by a backslash (@samp{\}). When in doubt, it
|
||||
is safe to add backslashes anywhere and everywhere.
|
||||
|
||||
Here is a more complicated @command{echo} example:
|
||||
|
||||
@example
|
||||
echo A\ Multi-word\ Argument\ With\ A\ \$\ dollar
|
||||
@end example
|
||||
|
||||
Beyond this, things get a bit more complicated. While not beyond the
|
||||
reach of someone wishing to learn, it is definitely beyond the scope of
|
||||
this manual to present it all in a simplistic manner. Get comfortable
|
||||
with Eshell as a basic command invocation tool, and learn more about the
|
||||
commands on your system; then come back when it all sits more familiarly
|
||||
on your mind. Have fun!
|
||||
|
||||
@node Commands
|
||||
@chapter Commands
|
||||
|
||||
@menu
|
||||
* Invocation::
|
||||
* Completion::
|
||||
* Aliases::
|
||||
* History::
|
||||
* Scripts::
|
||||
* Built-ins::
|
||||
@end menu
|
||||
|
||||
Essentially, a command shell is all about invoking commands---and
|
||||
everything that entails. So understanding how Eshell invokes commands
|
||||
is the key to comprehending how it all works.
|
||||
|
||||
@node Invocation
|
||||
@section Invocation
|
||||
|
||||
Unlike regular system shells, Eshell never invokes kernel functions
|
||||
directly, such as @code{exec(3)}. Instead, it uses the Lisp functions
|
||||
available in the Emacs Lisp library. It does this by transforming the
|
||||
command you specify into a callable Lisp form.@footnote{To see the Lisp
|
||||
form that will be invoked, type: @samp{eshell-parse-command "echo
|
||||
hello"}}
|
||||
|
||||
This transformation, from the string of text typed at the command
|
||||
prompt, to the ultimate invocation of either a Lisp function or external
|
||||
command, follows these steps:
|
||||
|
||||
@enumerate
|
||||
@item Parse the command string into separate arguments.
|
||||
@item
|
||||
@end enumerate
|
||||
|
||||
@node Completion
|
||||
@section Completion
|
||||
|
||||
@node Aliases
|
||||
@section Aliases
|
||||
|
||||
@node History
|
||||
@section History
|
||||
|
||||
Eshell knows a few built-in variables:
|
||||
|
||||
@table @code
|
||||
|
||||
@item $+
|
||||
@vindex $+
|
||||
This variable always contains the current working directory.
|
||||
|
||||
@item $-
|
||||
@vindex $-
|
||||
This variable always contains the previous working directory (the
|
||||
current working directory from before the last @code{cd} command).
|
||||
|
||||
@end table
|
||||
|
||||
@node Scripts
|
||||
@section Scripts
|
||||
|
||||
|
||||
@node Built-ins
|
||||
@section Built-in commands
|
||||
|
||||
Here is a list of built-in commands that Eshell knows about:
|
||||
|
||||
@table @code
|
||||
|
||||
@item cd
|
||||
@findex cd
|
||||
This command changes the current working directory. Usually, it is
|
||||
invoked as @samp{cd foo} where @file{foo} is the new working
|
||||
directory. But @code{cd} knows about a few special arguments:
|
||||
|
||||
When it receives no argument at all, it changes to the home directory.
|
||||
|
||||
Giving the command @samp{cd -} changes back to the previous working
|
||||
directory (this is the same as @samp{cd $-}).
|
||||
|
||||
The command @samp{cd =} shows the directory stack. Each line is
|
||||
numbered.
|
||||
|
||||
With @samp{cd =foo}, Eshell searches the directory stack for a
|
||||
directory matching the regular expression @samp{foo} and changes to
|
||||
that directory.
|
||||
|
||||
With @samp{cd -42}, you can access the directory stack by number.
|
||||
|
||||
@end table
|
||||
|
||||
|
||||
@node Arguments
|
||||
@chapter Arguments
|
||||
|
||||
@menu
|
||||
* The Parser::
|
||||
* Variables::
|
||||
* Substitution::
|
||||
* Globbing::
|
||||
* Predicates::
|
||||
@end menu
|
||||
|
||||
@node The Parser
|
||||
@section The Parser
|
||||
|
||||
@node Variables
|
||||
@section Variables
|
||||
|
||||
@node Substitution
|
||||
@section Substitution
|
||||
|
||||
@node Globbing
|
||||
@section Globbing
|
||||
|
||||
@node Predicates
|
||||
@section Predicates
|
||||
|
||||
|
||||
@node Input/Output
|
||||
@chapter Input/Output
|
||||
|
||||
@node Process control
|
||||
@chapter Process control
|
||||
|
||||
|
||||
@node Extension modules
|
||||
@chapter Extension modules
|
||||
|
||||
@menu
|
||||
* Writing a module::
|
||||
* Module testing::
|
||||
* Directory handling::
|
||||
* Key rebinding::
|
||||
* Smart scrolling::
|
||||
* Terminal emulation::
|
||||
* Built-in UNIX commands::
|
||||
@end menu
|
||||
|
||||
@node Writing a module
|
||||
@section Writing a module
|
||||
|
||||
@node Module testing
|
||||
@section Module testing
|
||||
|
||||
@node Directory handling
|
||||
@section Directory handling
|
||||
|
||||
@node Key rebinding
|
||||
@section Key rebinding
|
||||
|
||||
@node Smart scrolling
|
||||
@section Smart scrolling
|
||||
|
||||
@node Terminal emulation
|
||||
@section Terminal emulation
|
||||
|
||||
@node Built-in UNIX commands
|
||||
@section Built-in UNIX commands
|
||||
|
||||
|
||||
@node Extras and Goodies
|
||||
@chapter Extras and Goodies
|
||||
|
||||
@node Bugs and ideas
|
||||
@chapter Bugs and ideas
|
||||
@cindex reporting bugs and ideas
|
||||
@cindex bugs, how to report them
|
||||
@cindex author, how to reach
|
||||
@cindex email to the author
|
||||
@cindex FAQ
|
||||
@cindex problems, list of common
|
||||
|
||||
If you find a bug or misfeature, don't hesitate to let me know! Send
|
||||
email to @email{johnw@@gnu.org}. Feature requests should also be sent
|
||||
there. I prefer discussing one thing at a time. If you find several
|
||||
unrelated bugs, please report them separately.
|
||||
|
||||
If you have ideas for improvements, or if you have written some
|
||||
extensions to this package, I would like to hear from you. I hope you
|
||||
find this package useful!
|
||||
|
||||
@menu
|
||||
* Known problems::
|
||||
@end menu
|
||||
|
||||
@node Known problems
|
||||
@section Known problems
|
||||
@cindex known bugs
|
||||
@cindex bugs, known
|
||||
|
||||
Below is complete list of known problems with Eshell version 2.4.2,
|
||||
which is the version included with Emacs 22.
|
||||
|
||||
@table @asis
|
||||
@item Documentation incomplete
|
||||
|
||||
@item Differentiate between aliases and functions
|
||||
|
||||
Allow for a bash-compatible syntax, such as:
|
||||
|
||||
@example
|
||||
alias arg=blah
|
||||
function arg () @{ blah $* @}
|
||||
@end example
|
||||
|
||||
@item @samp{for i in 1 2 3 @{ grep -q a b && *echo has it @} | wc -l} outputs result after prompt
|
||||
|
||||
In fact, piping to a process from a looping construct doesn't work in
|
||||
general. If I change the call to @code{eshell-copy-handles} in
|
||||
@code{eshell-rewrite-for-command} to use @code{eshell-protect}, it seems
|
||||
to work, but the output occurs after the prompt is displayed. The whole
|
||||
structured command thing is too complicated at present.
|
||||
|
||||
@item Error with @command{bc} in @code{eshell-test}
|
||||
|
||||
On some XEmacs system, the subprocess interaction test fails
|
||||
inexplicably, although @command{bc} works fine at the command prompt.
|
||||
|
||||
@item Eshell does not delete @file{*Help*} buffers in XEmacs 21.1.8+
|
||||
|
||||
In XEmacs 21.1.8, the @file{*Help*} buffer has been renamed such that
|
||||
multiple instances of the @file{*Help*} buffer can exist.
|
||||
|
||||
@item Pcomplete sometimes gets stuck
|
||||
|
||||
You press @key{TAB}, but no completions appear, even though the
|
||||
directory has matching files. This behavior is rare.
|
||||
|
||||
@item @samp{grep python $<rpm -qa>} doesn't work, but using @samp{*grep} does
|
||||
|
||||
This happens because the @code{grep} Lisp function returns immediately,
|
||||
and then the asynchronous @command{grep} process expects to examine the
|
||||
temporary file, which has since been deleted.
|
||||
|
||||
@item Problem with C-r repeating text
|
||||
|
||||
If the text @emph{before point} reads "./run", and you type @kbd{C-r r u
|
||||
n}, it will repeat the line for every character typed.
|
||||
|
||||
@item Backspace doesn't scroll back after continuing (in smart mode)
|
||||
|
||||
Hitting space during a process invocation, such as @command{make}, will
|
||||
cause it to track the bottom of the output; but backspace no longer
|
||||
scrolls back.
|
||||
|
||||
@item It's not possible to fully @code{unload-feature} Eshell
|
||||
|
||||
@item Menu support was removed, but never put back
|
||||
|
||||
@item Using C-p and C-n with rebind gets into a locked state
|
||||
|
||||
This happened a few times in Emacs 21, but has been unreproducible
|
||||
since.
|
||||
|
||||
@item If an interactive process is currently running, @kbd{M-!} doesn't work
|
||||
|
||||
@item Use a timer instead of @code{sleep-for} when killing child processes
|
||||
|
||||
@item Piping to a Lisp function is not supported
|
||||
|
||||
Make it so that the Lisp command on the right of the pipe is repeatedly
|
||||
called with the input strings as arguments. This will require changing
|
||||
@code{eshell-do-pipeline} to handle non-process targets.
|
||||
|
||||
@item Input redirection is not supported
|
||||
|
||||
See the above entry.
|
||||
|
||||
@item Problem running @command{less} without arguments on Windows
|
||||
|
||||
The result in the Eshell buffer is:
|
||||
|
||||
@example
|
||||
Spawning child process: invalid argument
|
||||
@end example
|
||||
|
||||
Also a new @command{less} buffer was created with nothing in it@dots{}
|
||||
(presumably this holds the output of @command{less}).
|
||||
|
||||
If @command{less.exe} is invoked from the Eshell command line, the
|
||||
expected output is written to the buffer.
|
||||
|
||||
Note that this happens on NT-Emacs 20.6.1 on Windows 2000. The term.el
|
||||
package and the supplied shell both use the @command{cmdproxy} program
|
||||
for running shells.
|
||||
|
||||
@item Implement @samp{-r}, @samp{-n} and @samp{-s} switches for @command{cp}
|
||||
|
||||
@item Make @kbd{M-5 M-x eshell} switch to ``*eshell<5>*'', creating if need be
|
||||
|
||||
@item @samp{mv @var{dir} @var{file}.tar} does not remove directories
|
||||
|
||||
This is because the tar option --remove-files doesn't do so. Should it
|
||||
be Eshell's job?
|
||||
|
||||
@item Bind @code{standard-output} and @code{standard-error}
|
||||
|
||||
This would be so that if a Lisp function calls @code{print}, everything
|
||||
will happen as it should (albeit slowly).
|
||||
|
||||
@item When an extension module fails to load, @samp{cd /} gives a Lisp error
|
||||
|
||||
@item If a globbing pattern returns one match, should it be a list?
|
||||
|
||||
@item Make sure syntax table is correct in Eshell mode
|
||||
|
||||
So that @kbd{M-DEL} acts in a predictable manner, etc.
|
||||
|
||||
@item Allow all Eshell buffers to share the same history and list-dir
|
||||
|
||||
@item There is a problem with script commands that output to @file{/dev/null}
|
||||
|
||||
If a script file, somewhere in the middle, uses @samp{> /dev/null},
|
||||
output from all subsequent commands is swallowed.
|
||||
|
||||
@item Split up parsing of text after @samp{$} in @file{esh-var.el}
|
||||
|
||||
Make it similar to the way that @file{esh-arg.el} is structured.
|
||||
Then add parsing of @samp{$[?\n]}.
|
||||
|
||||
@item After pressing @kbd{M-RET}, redisplay before running the next command
|
||||
|
||||
@item Argument predicates and modifiers should work anywhere in a path
|
||||
|
||||
@example
|
||||
/usr/local/src/editors/vim $ vi **/CVS(/)/Root(.)
|
||||
Invalid regexp: "Unmatched ( or \\("
|
||||
@end example
|
||||
|
||||
With @command{zsh}, the glob above expands to all files named
|
||||
@file{Root} in directories named @file{CVS}.
|
||||
|
||||
@item Typing @samp{echo $@{locate locate@}/bin<TAB>} results in a Lisp error
|
||||
|
||||
Perhaps it should interpolate all permutations, and make that the
|
||||
globbing result, since otherwise hitting return here will result in
|
||||
``(list of filenames)/bin'', which is never valuable. Thus, one could
|
||||
@command{cat} only C backup files by using @samp{ls $@{identity *.c@}~}.
|
||||
In that case, having an alias command name @command{glob} for
|
||||
@command{identity} would be useful.
|
||||
|
||||
@item Once symbolic mode is supported for @command{umask}, implement @command{chmod} in Lisp
|
||||
|
||||
@item Create @code{eshell-expand-file-name}
|
||||
|
||||
This would use a data table to transform things such as @samp{~+},
|
||||
@samp{...}, etc.
|
||||
|
||||
@item Abstract @file{em-smart.el} into @file{smart-scroll.el}
|
||||
|
||||
It only really needs: to be hooked onto the output filter and the
|
||||
pre-command hook, and to have the input-end and input-start markers.
|
||||
And to know whether the last output group was ``successful.''
|
||||
|
||||
@item Allow for fully persisting the state of Eshell
|
||||
|
||||
This would include: variables, history, buffer, input, dir stack, etc.
|
||||
|
||||
@item Implement D as an argument predicate
|
||||
|
||||
It means that files beginning with a dot should be included in the
|
||||
glob match.
|
||||
|
||||
@item A comma in a predicate list should mean OR
|
||||
|
||||
At the moment, this is not supported.
|
||||
|
||||
@item Error if a glob doesn't expand due to a predicate
|
||||
|
||||
An error should be generated only if @code{eshell-error-if-no-glob} is
|
||||
non-@code{nil}.
|
||||
|
||||
@item @samp{(+ RET SPC TAB} does not cause @code{indent-according-to-mode} to occur
|
||||
|
||||
@item Create @code{eshell-auto-accumulate-list}
|
||||
|
||||
This is a list of commands for which, if the user presses @kbd{RET}, the
|
||||
text is staged as the next Eshell command, rather than being sent to the
|
||||
current interactive process.
|
||||
|
||||
@item Display file and line number if an error occurs in a script
|
||||
|
||||
@item @command{wait} doesn't work with process ids at the moment
|
||||
|
||||
@item Enable the direct-to-process input code in @file{em-term.el}
|
||||
|
||||
@item Problem with repeating @samp{echo $@{find /tmp@}}
|
||||
|
||||
With smart display active, if @kbd{RET} is held down, after a while it
|
||||
can't keep up anymore and starts outputting blank lines. It only
|
||||
happens if an asynchronous process is involved@dots{}
|
||||
|
||||
I think the problem is that @code{eshell-send-input} is resetting the
|
||||
input target location, so that if the asynchronous process is not done
|
||||
by the time the next @kbd{RET} is received, the input processor thinks
|
||||
that the input is meant for the process; which, when smart display is
|
||||
enabled, will be the text of the last command line! That is a bug in
|
||||
itself.
|
||||
|
||||
In holding down @kbd{RET} while an asynchronous process is running,
|
||||
there will be a point in between termination of the process, and the
|
||||
running of @code{eshell-post-command-hook}, which would cause
|
||||
@code{eshell-send-input} to call @code{eshell-copy-old-input}, and then
|
||||
process that text as a command to be run after the process. Perhaps
|
||||
there should be a way of killing pending input between the death of the
|
||||
process, and the @code{post-command-hook}.
|
||||
|
||||
@item Allow for a more aggressive smart display mode
|
||||
|
||||
Perhaps toggled by a command, that makes each output block a smart
|
||||
display block.
|
||||
|
||||
@item Create more meta variables
|
||||
|
||||
@table @samp
|
||||
@item $!
|
||||
The reason for the failure of the last disk command, or the text of the
|
||||
last Lisp error.
|
||||
|
||||
@item $=
|
||||
A special associate array, which can take references of the form
|
||||
@samp{$=[REGEXP]}. It indexes into the directory ring.
|
||||
@end table
|
||||
|
||||
@item Eshell scripts can't execute in the background
|
||||
|
||||
@item Support zsh's ``Parameter Expansion'' syntax, i.e. @samp{$@{@var{name}:-@var{val}@}}
|
||||
|
||||
@item Write an @command{info} alias that can take arguments
|
||||
|
||||
So that the user can enter @samp{info chmod}, for example.
|
||||
|
||||
@item Create a mode @code{eshell-browse}
|
||||
|
||||
It would treat the Eshell buffer as a outline. Collapsing the outline
|
||||
hides all of the output text. Collapsing again would show only the
|
||||
first command run in each directory
|
||||
|
||||
@item Allow other revisions of a file to be referenced using @samp{file@{rev@}}
|
||||
|
||||
This would be expanded by @code{eshell-expand-file-name} (see above).
|
||||
|
||||
@item Print ``You have new mail'' when the ``Mail'' icon is turned on
|
||||
|
||||
@item Implement @kbd{M-|} for Eshell
|
||||
|
||||
@item Implement input redirection
|
||||
|
||||
If it's a Lisp function, input redirection implies @command{xargs} (in a
|
||||
way@dots{}). If input redirection is added, also update the
|
||||
@code{file-name-quote-list}, and the delimiter list.
|
||||
|
||||
@item Allow @samp{#<@var{word} @var{arg}>} as a generic syntax
|
||||
|
||||
With the handling of @emph{word} specified by an
|
||||
@code{eshell-special-alist}.
|
||||
|
||||
@item In @code{eshell-veal-using-options}, allow a @code{:complete} tag
|
||||
|
||||
It would be used to provide completion rules for that command. Then the
|
||||
macro will automagically define the completion function.
|
||||
|
||||
@item For @code{eshell-command-on-region}, apply redirections to the result
|
||||
|
||||
So that @samp{+ > 'blah} would cause the result of the @code{+} (using
|
||||
input from the current region) to be inserting into the symbol
|
||||
@code{blah}.
|
||||
|
||||
If an external command is being invoked, the input is sent as standard
|
||||
input, as if a @samp{cat <region> |} had been invoked.
|
||||
|
||||
If a Lisp command, or an alias, is invoked, then if the line has no
|
||||
newline characters, it is divided by whitespace and passed as arguments
|
||||
to the Lisp function. Otherwise, it is divided at the newline
|
||||
characters. Thus, invoking @code{+} on a series of numbers will add
|
||||
them; @code{min} would display the smallest figure, etc.
|
||||
|
||||
@item Write @code{eshell-script-mode} as a minor mode
|
||||
|
||||
It would provide syntax, abbrev, highlighting and indenting support like
|
||||
@code{emacs-lisp-mode} and @code{shell-mode}.
|
||||
|
||||
@item In the history mechanism, finish the @command{bash}-style support
|
||||
|
||||
This means @samp{!n}, @samp{!#}, @samp{!:%}, and @samp{!:1-} as separate
|
||||
from @samp{!:1*}.
|
||||
|
||||
@item Support the -n command line option for @command{history}
|
||||
|
||||
@item Implement @command{fc} in Lisp
|
||||
|
||||
@item Specifying a frame as a redirection target should imply the currently active window's buffer
|
||||
|
||||
@item Implement @samp{>@var{func-or-func-list}}
|
||||
|
||||
This would allow for an ``output translators'', that take a function to
|
||||
modify output with, and a target. Devise a syntax that works well with
|
||||
pipes, and can accommodate multiple functions (i.e., @samp{>'(upcase
|
||||
regexp-quote)} or @samp{>'upcase}).
|
||||
|
||||
@item Allow Eshell to read/write to/from standard input and output
|
||||
|
||||
This would be optional, rather than always using the Eshell buffer.
|
||||
This would allow it to be run from the command line (perhaps).
|
||||
|
||||
@item Write a @command{help} command
|
||||
|
||||
It would call subcommands with @option{--help}, or @option{-h} or
|
||||
@option{/?}, as appropriate.
|
||||
|
||||
@item Implement @command{stty} in Lisp
|
||||
|
||||
@item Support @command{rc}'s matching operator, e.g. @samp{~ (@var{list}) @var{regexp}}
|
||||
|
||||
@item Implement @command{bg} and @command{fg} as editors of @code{eshell-process-list}
|
||||
|
||||
Using @command{bg} on a process that is already in the background does
|
||||
nothing. Specifying redirection targets replaces (or adds) to the list
|
||||
current being used.
|
||||
|
||||
@item Have @command{jobs} print only the processes for the current shell
|
||||
|
||||
@item How can Eshell learn if a background process has requested input?
|
||||
|
||||
@item Support @samp{2>&1} and @samp{>&} and @samp{2>} and @samp{|&}
|
||||
|
||||
The syntax table for parsing these should be customizable, such that the
|
||||
user could change it to use rc syntax: @samp{>[2=1]}.
|
||||
|
||||
@item Allow @samp{$_[-1]}, which would indicate the last element of the array
|
||||
|
||||
@item Make @samp{$x[*]} equal to listing out the full contents of @samp{x}
|
||||
|
||||
Return them as a list, so that @samp{$_[*]} is all the arguments of the
|
||||
last command.
|
||||
|
||||
@item Copy ANSI code handling from @file{term.el} into @file{em-term.el}
|
||||
|
||||
Make it possible for the user to send char-by-char to the underlying
|
||||
process. Ultimately, I should be able to move away from using term.el
|
||||
altogether, since everything but the ANSI code handling is already part
|
||||
of Eshell. Then, things would work correctly on MS-Windows as well
|
||||
(which doesn't have @file{/bin/sh}, although @file{term.el} tries to use
|
||||
it).
|
||||
|
||||
@item Make the shell spawning commands be visual
|
||||
|
||||
That is, make (@command{su}, @command{bash}, @command{telnet},
|
||||
@command{rlogin}, @command{rsh}, etc.) be part of
|
||||
@code{eshell-visual-commands}. The only exception is if the shell is
|
||||
being used to invoke a single command. Then, the behavior should be
|
||||
based on what that command is.
|
||||
|
||||
@item Create a smart viewing command named @command{open}
|
||||
|
||||
This would search for some way to open its argument (similar to opening
|
||||
a file in the Windows Explorer).
|
||||
|
||||
@item Alias @command{read} to be the same as @command{open}, only read-only
|
||||
|
||||
@item Write a @command{tail} command which uses @code{view-file}
|
||||
|
||||
It would move point to the end of the buffer, and then turns on
|
||||
auto-revert mode in that buffer at frequent intervals---and a
|
||||
@command{head} alias which assumes an upper limit of
|
||||
@code{eshell-maximum-line-length} characters per line.
|
||||
|
||||
@item Make @command{dgrep} load @code{dired}, mark everything, then invoke @code{dired-do-search}
|
||||
|
||||
@item Write mesh.c
|
||||
|
||||
This would run Emacs with the appropriate arguments to invoke Eshell
|
||||
only. That way, it could be listed as a login shell.
|
||||
|
||||
@item Use an intangible @code{PS2} string for multi-line input prompts
|
||||
|
||||
@item Auto-detect when a command is visual, by checking @code{TERMCAP} usage
|
||||
|
||||
@item The first keypress after @kbd{M-x watson} triggers `eshell-send-input'
|
||||
|
||||
@item Make @kbd{/} electric
|
||||
|
||||
So that it automatically expands and corrects pathnames. Or make
|
||||
pathname completion for Pcomplete auto-expand @samp{/u/i/std<TAB>} to
|
||||
@samp{/usr/include/std<TAB>}.
|
||||
|
||||
@item Write the @command{pushd} stack to disk along with @code{last-dir-ring}
|
||||
|
||||
@item Add options to @code{eshell/cat} which would allow it to sort and uniq
|
||||
|
||||
@item Implement @command{wc} in Lisp
|
||||
|
||||
Add support for counting sentences, paragraphs, pages, etc.
|
||||
|
||||
@item Once piping is added, implement @command{sort} and @command{uniq} in Lisp
|
||||
|
||||
@item Implement @command{touch} in Lisp
|
||||
|
||||
@item Implement @command{comm} in Lisp
|
||||
|
||||
@item Implement an @command{epatch} command in Lisp
|
||||
|
||||
This would call @code{ediff-patch-file}, or @code{ediff-patch-buffer},
|
||||
depending on its argument.
|
||||
|
||||
@item Have an option such that @samp{ls -l} generates a dired buffer
|
||||
|
||||
@item Write a version of @command{xargs} based on command rewriting
|
||||
|
||||
That is, @samp{find X | xargs Y} would be indicated using @samp{Y
|
||||
$@{find X@}}. Maybe @code{eshell-do-pipelines} could be changed to
|
||||
perform this on-thy-fly rewriting.
|
||||
|
||||
@item Write an alias for @command{less} that brings up a @code{view-mode} buffer
|
||||
|
||||
Such that the user can press @key{SPC} and @key{DEL}, and then @key{q}
|
||||
to return to Eshell. It would be equivalent to:
|
||||
@samp{X > #<buffer Y>; view-buffer #<buffer Y>}.
|
||||
|
||||
@item Make @code{eshell-mode} as much a full citizen as @code{shell-mode}
|
||||
|
||||
Everywhere in Emacs where @code{shell-mode} is specially noticed, add
|
||||
@code{eshell-mode} there.
|
||||
|
||||
@item Permit the umask to be selectively set on a @command{cp} target
|
||||
|
||||
@item Problem using @kbd{M-x eshell} after using @code{eshell-command}
|
||||
|
||||
If the first thing that I do after entering Emacs is to run
|
||||
@code{eshell-command} and invoke @command{ls}, and then use @kbd{M-x
|
||||
eshell}, it doesn't display anything.
|
||||
|
||||
@item @kbd{M-RET} during a long command (using smart display) doesn't work
|
||||
|
||||
Since it keeps the cursor up where the command was invoked.
|
||||
|
||||
@end table
|
||||
|
||||
@node GNU Free Documentation License
|
||||
@appendix GNU Free Documentation License
|
||||
@include doclicense.texi
|
||||
|
||||
@node Concept Index
|
||||
@unnumbered Concept Index
|
||||
|
||||
@printindex cp
|
||||
|
||||
@node Function and Variable Index
|
||||
@unnumbered Function and Variable Index
|
||||
|
||||
@printindex fn
|
||||
|
||||
@node Key Index
|
||||
@unnumbered Key Index
|
||||
|
||||
@printindex ky
|
||||
@bye
|
||||
|
||||
@ignore
|
||||
arch-tag: 776409ba-cb15-42b9-b2b6-d2bdc7ebad01
|
||||
@end ignore
|
985
doc/misc/eudc.texi
Normal file
985
doc/misc/eudc.texi
Normal file
|
@ -0,0 +1,985 @@
|
|||
\input texinfo.tex
|
||||
@c %**start of header
|
||||
@setfilename ../../info/eudc
|
||||
@settitle Emacs Unified Directory Client (EUDC) Manual
|
||||
@afourpaper
|
||||
@c %**end of header
|
||||
|
||||
@copying
|
||||
This file documents EUDC v1.30b.
|
||||
|
||||
EUDC is the Emacs Unified Directory Client, a common interface to
|
||||
directory servers using various protocols such as LDAP or the CCSO white
|
||||
pages directory system (PH/QI)
|
||||
|
||||
Copyright @copyright{} 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
@quotation
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.2 or
|
||||
any later version published by the Free Software Foundation; with no
|
||||
Invariant Sections, with the Front-Cover texts being ``A GNU
|
||||
Manual'', and with the Back-Cover Texts as in (a) below. A copy of the
|
||||
license is included in the section entitled ``GNU Free Documentation
|
||||
License'' in the Emacs manual.
|
||||
|
||||
(a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
|
||||
this GNU Manual, like GNU software. Copies published by the Free
|
||||
Software Foundation raise funds for GNU development.''
|
||||
|
||||
This document is part of a collection distributed under the GNU Free
|
||||
Documentation License. If you want to distribute this document
|
||||
separately from the collection, you can do so by adding a copy of the
|
||||
license to the document, as described in section 6 of the license.
|
||||
@end quotation
|
||||
@end copying
|
||||
|
||||
@dircategory Emacs
|
||||
@direntry
|
||||
* EUDC: (eudc). An Emacs client for directory servers (LDAP, PH).
|
||||
@end direntry
|
||||
|
||||
@footnotestyle end
|
||||
|
||||
@titlepage
|
||||
@title{EUDC Manual}
|
||||
@subtitle{The Emacs Unified Directory Client}
|
||||
@author by Oscar Figueiredo
|
||||
@code{1.30b}
|
||||
|
||||
@page
|
||||
@vskip 0pt plus 1fill
|
||||
@insertcopying
|
||||
@end titlepage
|
||||
|
||||
@ifnottex
|
||||
@node Top, Overview, (dir), (dir)
|
||||
@comment node-name, next, previous, up
|
||||
|
||||
|
||||
This manual documents EUDC v1.30b, the Emacs Unified Directory Client.
|
||||
|
||||
A common interface to directory servers using various protocols such as
|
||||
LDAP or the CCSO white pages directory system (PH/QI)
|
||||
|
||||
@end ifnottex
|
||||
|
||||
@menu
|
||||
* Overview:: Summary of EUDC features
|
||||
* Installation:: How to install EUDC
|
||||
* Usage:: The various usage possibilities explained
|
||||
* Credits:: Who's done what
|
||||
* GNU Free Documentation License:: The license for this documentation.
|
||||
* Command and Function Index::
|
||||
* Variables Index::
|
||||
@end menu
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@node Overview, Installation, Top, Top
|
||||
@comment node-name, next, previous, up
|
||||
@chapter Overview
|
||||
|
||||
EUDC, the @dfn{Emacs Unified Directory Client}, provides a common user
|
||||
interface to access directory servers using different directory
|
||||
protocols.
|
||||
|
||||
Currently supported back-ends are:
|
||||
|
||||
@itemize @bullet
|
||||
@item
|
||||
LDAP, Lightweight Directory Access Protocol
|
||||
@item
|
||||
CCSO PH/QI
|
||||
@item
|
||||
BBDB, Big Brother's Insidious Database
|
||||
@end itemize
|
||||
|
||||
The main features of the EUDC interface are:
|
||||
|
||||
@itemize @bullet
|
||||
@item
|
||||
Queries using a customizable form
|
||||
@item
|
||||
Inline query expansion (for instance you can expand a name
|
||||
to an email address in a mail message buffer using a server as an
|
||||
address book)
|
||||
@item
|
||||
Multiple servers can be tried in turn until a match is found for an
|
||||
inline query
|
||||
@item
|
||||
Fast minibuffer queries for email addresses and phone numbers
|
||||
@item
|
||||
Interface to BBDB to let you insert server records into your own BBDB database
|
||||
(@pxref{Top,,BBDB,bbdb,BBDB Manual})
|
||||
@end itemize
|
||||
|
||||
@menu
|
||||
* LDAP:: What is LDAP ?
|
||||
* CCSO PH/QI:: What is CCSO, PH, QI ?
|
||||
* BBDB:: What is BBDB ?
|
||||
@end menu
|
||||
|
||||
|
||||
|
||||
@node LDAP, CCSO PH/QI, Overview, Overview
|
||||
@comment node-name, next, previous, up
|
||||
@section LDAP
|
||||
|
||||
LDAP, @dfn{the Lightweight Directory Access Protocol}, is a communication
|
||||
protocol for directory applications defined in RFC 1777.
|
||||
|
||||
Quoted from RFC 1777:
|
||||
|
||||
@quotation
|
||||
[LDAP] is designed to provide access to the X.500 Directory while not
|
||||
incurring the resource requirements of the Directory Access Protocol
|
||||
(DAP). This protocol is specifically targeted at simple management
|
||||
applications and browser applications that provide simple read/write
|
||||
interactive access to the X.500 Directory, and is intended to be a
|
||||
complement to the DAP itself.
|
||||
@end quotation
|
||||
|
||||
LDAP servers usually store (but are not limited to) information about
|
||||
people such as their name, phone number, email address, office
|
||||
location, etc@enddots{} More information about LDAP can be found at
|
||||
@url{http://www.openldap.org/}
|
||||
|
||||
EUDC requires external support to access LDAP directory servers
|
||||
(@pxref{LDAP Requirements})
|
||||
|
||||
|
||||
@node CCSO PH/QI, BBDB, LDAP, Overview
|
||||
@comment node-name, next, previous, up
|
||||
@section CCSO PH/QI
|
||||
|
||||
The Central Computing Services Office (CCSO) of the University of
|
||||
Illinois at Urbana Champaign (UIUC) created and freely distributes a
|
||||
directory system that is currently in use in more than 300 organizations
|
||||
around the world. The system records information about people such as
|
||||
their address, phone number, email, academic information or any other
|
||||
details it was configured to.
|
||||
|
||||
The system consists of two parts: a database server traditionally called
|
||||
@samp{qi} and a command-line client called @samp{ph}.
|
||||
@url{ftp://uiarchive.cso.uiuc.edu/pub/packages/ph} is the main
|
||||
distribution site. @url{http://www.uiuc.edu/cgi-bin/ph/lookup?Query=.}
|
||||
provides a listing of the active @samp{qi} servers.
|
||||
|
||||
The original command-line @samp{ph} client that comes with the
|
||||
@samp{ph/qi} distribution provides additional features like the
|
||||
possibility to communicate with the server in login-mode which makes it
|
||||
possible to change records in the database. This is not implemented in
|
||||
EUDC.
|
||||
|
||||
|
||||
@node BBDB, , CCSO PH/QI, Overview
|
||||
@comment node-name, next, previous, up
|
||||
@section BBDB
|
||||
|
||||
BBDB is the @dfn{Big Brother's Insidious Database}, a package for Emacs
|
||||
originally written by Jamie Zawinski which provides rolodex-like
|
||||
database functionality featuring tight integration with the Emacs mail
|
||||
and news readers.
|
||||
|
||||
It is often used as an enhanced email address book.
|
||||
|
||||
EUDC considers BBDB as a directory server back end just like LDAP or
|
||||
PH/QI servers, though BBDB has no client/server protocol and thus always
|
||||
resides locally on your machine. The point in this is not to offer an
|
||||
alternate way to query your BBDB database (BBDB itself provides much
|
||||
more flexible ways to do that), but rather to offer an interface to your
|
||||
local directory that is consistent with the interface to external
|
||||
directories (LDAP, PH/QI). This is particularly interesting when
|
||||
performing queries on multiple servers.
|
||||
|
||||
EUDC also offers a means to insert results from directory queries into
|
||||
your own local BBDB (@pxref{Creating BBDB Records})
|
||||
|
||||
@node Installation, Usage, Overview, Top
|
||||
@comment node-name, next, previous, up
|
||||
@chapter Installation
|
||||
|
||||
Add the following to your @file{.emacs} init file:
|
||||
@lisp
|
||||
(require 'eudc)
|
||||
@end lisp
|
||||
This will install EUDC at startup.
|
||||
|
||||
After installing EUDC you will find (the next time you launch Emacs) a
|
||||
new @code{Directory Search} submenu in the @samp{Tools} menu that will
|
||||
give you access to EUDC.
|
||||
|
||||
You may also find it useful to add the following to your @file{.emacs}
|
||||
initialization file to add a shortcut for email address expansion in
|
||||
email composition buffers (@pxref{Inline Query Expansion})
|
||||
|
||||
@lisp
|
||||
(eval-after-load
|
||||
"message"
|
||||
'(define-key message-mode-map [(control ?c) (tab)] 'eudc-expand-inline))
|
||||
(eval-after-load
|
||||
"sendmail"
|
||||
'(define-key mail-mode-map [(control ?c) (tab)] 'eudc-expand-inline))
|
||||
@end lisp
|
||||
|
||||
@menu
|
||||
* LDAP Requirements:: EUDC needs external support for LDAP
|
||||
@end menu
|
||||
|
||||
@node LDAP Requirements, , Installation, Installation
|
||||
@comment node-name, next, previous, up
|
||||
@section LDAP Requirements
|
||||
|
||||
LDAP support is added by means of @file{ldap.el} which is part of Emacs.
|
||||
@file{ldap.el} needs an external command line utility named
|
||||
@file{ldapsearch} which is available as part of LDAP toolkits:
|
||||
|
||||
@itemize @bullet
|
||||
@item
|
||||
Open LDAP Libraries
|
||||
(@url{http://www.openldap.org/})
|
||||
@item
|
||||
University of Michigan's LDAP Client software
|
||||
(@url{http://www.umich.edu/~dirsvcs/ldap/})
|
||||
@end itemize
|
||||
|
||||
|
||||
@node Usage, Credits, Installation, Top
|
||||
@comment node-name, next, previous, up
|
||||
@chapter Usage
|
||||
|
||||
This chapter describes the usage of EUDC. Most functions and
|
||||
customization options are available through the @samp{Directory Search}
|
||||
submenu of the @samp{Tools} submenu.
|
||||
|
||||
@menu
|
||||
* Querying Servers:: How queries are performed and handled
|
||||
* Query Form:: How to use and customize the query form
|
||||
* Display of Query Results:: Controlling how query results are presented
|
||||
* Inline Query Expansion:: How to use and customize inline queries
|
||||
* The Server Hotlist:: How to use and manage the server hotlist
|
||||
* Multi-server Queries:: How to query multiple servers successively
|
||||
* Creating BBDB Records:: How to insert query results into your BBDB
|
||||
* Server/Protocol Locals:: Customizing on a per server/protocol basis
|
||||
@end menu
|
||||
|
||||
|
||||
@node Querying Servers, Query Form, Usage, Usage
|
||||
@comment node-name, next, previous, up
|
||||
@section Querying Servers
|
||||
|
||||
EUDC's basic functionality is to let you query a directory server and
|
||||
return the results back to you. There are several things you may want
|
||||
to customize in this process.
|
||||
|
||||
|
||||
@menu
|
||||
* Selecting a Server:: The first thing to do
|
||||
* Return Attributes:: Configuring what the server should return
|
||||
* Duplicate Attributes:: What to do when records have duplicate attributes
|
||||
@end menu
|
||||
|
||||
@node Selecting a Server, Return Attributes, Querying Servers, Querying Servers
|
||||
@subsection Selecting a Server
|
||||
|
||||
Before doing any query you will need to set the directory server. You
|
||||
need to specify the name of the host machine running the server software
|
||||
and the protocol to use. If you do not set the server in any fashion,
|
||||
EUDC will ask you for one when you make your first query.
|
||||
|
||||
You can set the server by selecting one from your hotlist of servers
|
||||
(@pxref{The Server Hotlist}) available in the @samp{Server} submenu or
|
||||
by selecting @samp{New Server} in that same menu.
|
||||
|
||||
LDAP servers generally require some configuration before you can perform
|
||||
queries on them. In particular, the @dfn{search base} must be
|
||||
configured. If the server you select has no configured search base then
|
||||
EUDC will propose you to configure it at this point. A customization
|
||||
buffer will be displayed where you can edit the search base and other
|
||||
parameters for the server.
|
||||
|
||||
@defvar eudc-server
|
||||
The name or IP address of the remote directory server. A TCP port number
|
||||
may be specified by appending a colon and a number to the name of the
|
||||
server. You will not need this unless your server runs on a port other
|
||||
than the default (which depends on the protocol).
|
||||
If the directory server resides on your own computer (which is the case
|
||||
if you use the BBDB back end) then `localhost' is a reasonable value but
|
||||
it will be ignored anyway.
|
||||
@end defvar
|
||||
|
||||
@defvar eudc-protocol
|
||||
The directory protocol to use to query the server. Currently supported
|
||||
protocols in this version of EUDC are @code{ph}, @code{ldap} and @code{bbdb}.
|
||||
@end defvar
|
||||
|
||||
@deffn Command eudc-set-server
|
||||
This command accessible from @samp{New Server} submenu lets you specify a
|
||||
new directory server and protocol.
|
||||
@end deffn
|
||||
|
||||
@node Return Attributes, Duplicate Attributes, Selecting a Server, Querying Servers
|
||||
@subsection Return Attributes
|
||||
|
||||
Directory servers may be configured to return a default set of
|
||||
attributes for each record matching a query if the query specifies none.
|
||||
The variable @code{eudc-default-return-attributes} controls the return
|
||||
attributes you want to see, if different from the server defaults.
|
||||
|
||||
@defvar eudc-default-return-attributes
|
||||
A list of the default attributes to extract from directory entries. If
|
||||
set to the symbol @code{all} then all available attributes are
|
||||
returned. A value of @code{nil}, the default, means to return the
|
||||
default attributes as configured in the server.
|
||||
@end defvar
|
||||
|
||||
The server may return several matching records to a query. Some of the
|
||||
records may however not contain all the attributes you requested. You can
|
||||
discard those records.
|
||||
|
||||
@defopt eudc-strict-return-matches
|
||||
If non-@code{nil}, entries that do not contain all the requested return
|
||||
attributes are ignored. Default is @code{t}.
|
||||
@end defopt
|
||||
|
||||
@node Duplicate Attributes, , Return Attributes, Querying Servers
|
||||
@subsection Duplicate Attributes
|
||||
|
||||
Directory standards may authorize different instances of the same
|
||||
attribute in a record. For instance the record of a person may contain
|
||||
several email fields containing different email addresses. When using
|
||||
a QI directory server this is difficult to distinguish from attributes
|
||||
having multi-line values such as the postal address that may contain a
|
||||
line for the street and another one for the zip code and city name. In
|
||||
both cases, EUDC will consider the attribute duplicated.
|
||||
|
||||
EUDC has several methods to deal with duplicated attributes. The
|
||||
available methods are:
|
||||
|
||||
@table @code
|
||||
@item list
|
||||
Makes a list with the different values of the duplicate attribute. The
|
||||
record is returned with only one instance of the attribute with a list
|
||||
of all the different values as a value. This is the default method that
|
||||
is used to handle duplicate fields for which no other method has been
|
||||
specified.
|
||||
@item first
|
||||
Discards all the duplicate values of the field keeping only the first
|
||||
one.
|
||||
@item concat
|
||||
Concatenates the different values using a newline as a separator. The
|
||||
record keeps only one instance of the field the value of which is a
|
||||
single multi-line string.
|
||||
@item duplicate
|
||||
Duplicates the whole record into as many instances as there are different
|
||||
values for the field. This is the default for the email field. Thus a
|
||||
record containing 3 different email addresses is duplicated into three
|
||||
different records each having a single email address. This is
|
||||
particularly useful in combination with @code{select} as the method to
|
||||
handle multiple matches in inline expansion queries (@pxref{Inline Query
|
||||
Expansion}) because you are presented with the 3 addresses in a
|
||||
selection buffer
|
||||
@end table
|
||||
|
||||
Because a method may not be applicable to all fields, the variable
|
||||
@code{eudc-duplicate-attribute-handling-method} lets you specify either a
|
||||
default method for all fields or a method for each individual field.
|
||||
|
||||
@defvar eudc-duplicate-attribute-handling-method
|
||||
A method to handle entries containing duplicate attributes. This is
|
||||
either an alist of elements @code{(@var{attr} . @var{method})}, or a symbol
|
||||
@var{method}. The alist form of the variable associates a method to an
|
||||
individual attribute name; the second form specifies a method applicable
|
||||
to all attribute names. Available methods are: @code{list},
|
||||
@code{first}, @code{concat}, and @code{duplicate} (see above). The default is
|
||||
@code{list}.
|
||||
@end defvar
|
||||
|
||||
|
||||
|
||||
@node Query Form, Display of Query Results, Querying Servers, Usage
|
||||
@comment node-name, next, previous, up
|
||||
@section Query Form
|
||||
|
||||
The simplest way to query your directory server is to use the query
|
||||
form. You display the query form with the @samp{Query with Form} menu
|
||||
item or by invoking the command @kbd{M-x eudc-query-form}. The attribute
|
||||
names presented in this form are defined by the
|
||||
@code{eudc-query-form-attributes} variable (unless a non-@code{nil}
|
||||
argument is supplied to @code{eudc-query-form}).
|
||||
|
||||
Since the different directory protocols to which EUDC interfaces may
|
||||
use different names for equivalent attributes, EUDC defines its own set
|
||||
of attribute names and a mapping between these names and their
|
||||
protocol-specific equivalent through the variable
|
||||
@code{eudc-protocol-attributes-translation-alist}. Names currently
|
||||
defined by EUDC are @code{name}, @code{firstname}, @code{email} and
|
||||
@code{phone}.
|
||||
|
||||
@defvar eudc-query-form-attributes
|
||||
@findex eudc-get-attribute-list
|
||||
A list of attributes presented in the query form. Attribute names in
|
||||
this list should be either EUDC attribute names or valid attribute
|
||||
names. You can get a list of valid attribute names for the current
|
||||
protocol with the @samp{List Valid Attribute Names} menu item or the
|
||||
@kbd{M-x eudc-get-attribute-list} command. Defaults to @code{name},
|
||||
@code{email} and @code{phone}.
|
||||
@end defvar
|
||||
|
||||
@deffn Command eudc-query-form get-fields-from-server
|
||||
Display a form to query the directory server. If given a non-@code{nil}
|
||||
argument the function first queries the server for the existing fields
|
||||
and displays a corresponding form. Not all protocols may support a
|
||||
non-@code{nil} argument here.
|
||||
@end deffn
|
||||
|
||||
Since the names of the fields may not be explicit enough or adapted to
|
||||
be directly displayed as prompt strings in the form, the variable
|
||||
@code{eudc-user-attribute-names-alist} lets you define more explicit
|
||||
names for directory attribute names. This variable is ignored if
|
||||
@code{eudc-use-raw-directory-names} is non-@code{nil}.
|
||||
|
||||
@defvar eudc-user-attribute-names-alist
|
||||
This is an alist of user-defined names for the directory attributes used in
|
||||
query/response forms. Prompt strings for attributes that are not in this
|
||||
alist are derived by splitting the attribute name at underscores and
|
||||
capitalizing the individual words.
|
||||
@end defvar
|
||||
|
||||
@defvar eudc-use-raw-directory-names
|
||||
If non-@code{nil}, use attributes names as defined in the directory.
|
||||
Otherwise, directory query/response forms display the user attribute
|
||||
names defined in @code{eudc-user-attribute-names-alist}.
|
||||
@end defvar
|
||||
|
||||
@node Display of Query Results, Inline Query Expansion, Query Form, Usage
|
||||
@comment node-name, next, previous, up
|
||||
@section Display of Query Results
|
||||
|
||||
Upon successful completion of a form query, EUDC will display a buffer
|
||||
containing the results of the query.
|
||||
|
||||
The fields that are returned for each record
|
||||
are controlled by @code{eudc-default-return-attributes} (@pxref{Return
|
||||
Attributes}).
|
||||
|
||||
The display of each individual field can be performed by an arbitrary
|
||||
function which allows specific processing for binary values, such as
|
||||
images or audio samples, as well as values with semantics, such as
|
||||
URLs.
|
||||
|
||||
@defvar eudc-attribute-display-method-alist
|
||||
An alist specifying methods to display attribute values. Each member of
|
||||
the list is of the form @code{(@var{name} . @var{func})} where
|
||||
@var{name} is a lowercased string naming a directory attribute
|
||||
(translated according to @code{eudc-user-attribute-names-alist} if
|
||||
@code{eudc-use-raw-directory-names} is non-@code{nil}) and @var{func} a
|
||||
function that will be passed the corresponding attribute values for
|
||||
display.
|
||||
@end defvar
|
||||
|
||||
This variable has protocol-local definitions (see @pxref{Server/Protocol
|
||||
Locals}). For instance, it is defined as follows for LDAP:
|
||||
|
||||
@lisp
|
||||
(eudc-protocol-set 'eudc-attribute-display-method-alist
|
||||
'(("jpegphoto" . eudc-display-jpeg-inline)
|
||||
("labeledurl" . eudc-display-url)
|
||||
("audio" . eudc-display-sound)
|
||||
("labeledurl" . eudc-display-url)
|
||||
("url" . eudc-display-url))
|
||||
'ldap)
|
||||
@end lisp
|
||||
|
||||
EUDC provides a set of built-in functions to display binary value types:
|
||||
|
||||
@defun eudc-display-generic-binary data
|
||||
Display a button for unidentified binary @var{data}.
|
||||
@end defun
|
||||
|
||||
@defun eudc-display-url url
|
||||
Display URL and make it clickable.
|
||||
@end defun
|
||||
|
||||
@defun eudc-display-sound data
|
||||
Display a button to play the sound @var{data}.
|
||||
@end defun
|
||||
|
||||
@defun eudc-display-jpeg-inline data
|
||||
Display the JPEG @var{data} inline at point if possible.
|
||||
@end defun
|
||||
|
||||
@defun eudc-display-jpeg-as-button data
|
||||
Display a button for the JPEG @var{data}.
|
||||
@end defun
|
||||
|
||||
Right-clicking on a binary value button pops up a contextual menu with
|
||||
options to process the value. Among these are saving the attribute
|
||||
value to a file or sending it to an external viewer command. External
|
||||
viewers should expect the value on their standard input and should
|
||||
display it or perform arbitrary processing on it. Messages sent to
|
||||
standard output are discarded. External viewers are listed in the
|
||||
variable @code{eudc-external-viewers} which you can customize.
|
||||
|
||||
@defvar eudc-external-viewers
|
||||
This is a list of viewer program specifications. Each specification is
|
||||
a list whose first element is a string naming the viewer for unique
|
||||
identification, the second element is the executable program which
|
||||
should be invoked and the following elements are arguments that should
|
||||
be passed to the program.
|
||||
@end defvar
|
||||
|
||||
|
||||
@node Inline Query Expansion, The Server Hotlist, Display of Query Results, Usage
|
||||
@comment node-name, next, previous, up
|
||||
@section Inline Query Expansion
|
||||
|
||||
Inline query expansion is a powerful method to get completion from your
|
||||
directory server. The most common usage is for expanding names to email
|
||||
addresses in mail message buffers. The expansion is performed by the
|
||||
command @kbd{M-x eudc-expand-inline} which is available from the
|
||||
@samp{Expand Inline Query} menu item but can also be conveniently
|
||||
bound to a key shortcut (@pxref{Installation}). The operation is
|
||||
controlled by the variables @code{eudc-inline-expansion-format},
|
||||
@code{eudc-inline-query-format},
|
||||
@code{eudc-expanding-overwrites-query} and
|
||||
@code{eudc-multiple-match-handling-method}.
|
||||
|
||||
If the query fails for a server, other servers may be tried successively
|
||||
until one of them finds a match (@pxref{Multi-server Queries}).
|
||||
|
||||
@deffn Command eudc-expand-inline replace-p
|
||||
Query the server and expand the query string before point. The query
|
||||
string consists of the buffer substring from the point back to the
|
||||
preceding comma, colon or beginning of
|
||||
line. @code{eudc-inline-query-format} controls how individual words
|
||||
are mapped onto directory attribute names. After querying the server
|
||||
for the given string, the expansion specified by
|
||||
@code{eudc-inline-expansion-format} is inserted in the buffer at
|
||||
point. If @var{replace-p} is @code{t} then this expansion replaces the
|
||||
query string in the buffer. If @code{eudc-expanding-overwrites-query}
|
||||
is non-@code{nil} then the meaning of @var{replace-p} is negated.
|
||||
@end deffn
|
||||
|
||||
@defvar eudc-inline-query-format
|
||||
Format of an inline expansion query.
|
||||
This is actually a list of @var{format}s. A @var{format} is a list of
|
||||
one or more EUDC attribute names. A @var{format} applies if it contains
|
||||
as many attributes as individual words in the inline query string. If
|
||||
several @var{format}s apply then they are tried in order until a match
|
||||
is found. If @code{nil} all the words will be mapped onto the default
|
||||
server/protocol attribute name (generally @code{name}).
|
||||
|
||||
For instance, use the following
|
||||
@lisp
|
||||
(setq eudc-inline-query-format '((name)
|
||||
(firstname)
|
||||
(firstname name)))
|
||||
@end lisp
|
||||
@noindent
|
||||
to indicate that single word expansion queries are to be considered as
|
||||
surnames and if no match is found then they should be tried as first
|
||||
names. Inline queries consisting of two words are considered as
|
||||
consisting of a first name followed by a surname. If the query consists
|
||||
of more than two words, then the first one is considered as the first
|
||||
name and the remaining words are all considered as surname constituents.
|
||||
|
||||
@var{format}s are in fact not limited to EUDC attribute names, you can
|
||||
use server or protocol specific names in them. It may be safer if you
|
||||
do so, to set the variable @code{eudc-inline-query-format} in a protocol
|
||||
or server local fashion (see @pxref{Server/Protocol Locals}).
|
||||
|
||||
For instance you could use the following to match up to three words
|
||||
against the @code{cn} attribute of LDAP servers:
|
||||
@lisp
|
||||
(eudc-protocol-set 'eudc-inline-query-format
|
||||
'((cn)
|
||||
(cn cn)
|
||||
(cn cn cn))
|
||||
'ldap)
|
||||
@end lisp
|
||||
@end defvar
|
||||
|
||||
@defvar eudc-inline-expansion-format
|
||||
This variable lets you control exactly what is inserted into the buffer
|
||||
upon an inline expansion request. It is a list whose first element is a
|
||||
string passed to @code{format}. Remaining elements are symbols
|
||||
corresponding to directory attribute names. The corresponding attribute
|
||||
values are passed as additional arguments to @code{format}. Default is
|
||||
@code{("%s" email)} but you may want to consider a value like @code{("%s
|
||||
<%s>" name email)}
|
||||
@end defvar
|
||||
|
||||
@defvar eudc-multiple-match-handling-method
|
||||
This variable controls what to do when multiple entries match a query
|
||||
for an inline expansion. Possible values are:
|
||||
@table @code
|
||||
@item first
|
||||
The first match is considered as being the only one, the others are
|
||||
discarded.
|
||||
@item select
|
||||
A selection buffer pops up where you can choose a particular match. This
|
||||
is the default value of the variable.
|
||||
@item all
|
||||
The expansion uses all records successively
|
||||
@item abort
|
||||
An error is signaled. The expansion aborts.
|
||||
@end table
|
||||
|
||||
Default is @code{select}
|
||||
@end defvar
|
||||
|
||||
|
||||
|
||||
@node The Server Hotlist, Multi-server Queries, Inline Query Expansion, Usage
|
||||
@comment node-name, next, previous, up
|
||||
@section The Server Hotlist
|
||||
|
||||
EUDC lets you maintain a list of frequently used servers so that you
|
||||
can easily switch from one to another. This hotlist appears in the
|
||||
@samp{Server} submenu. You select a server in this list by clicking on
|
||||
its name. You can add the current server to the list with the command
|
||||
@kbd{M-x eudc-bookmark-current-server}. The list is contained in the variable
|
||||
@code{eudc-server-hotlist} which is stored in and retrieved from the file
|
||||
designated by @code{eudc-options-file}. EUDC also provides a facility to
|
||||
edit the hotlist interactively (@pxref{The Hotlist Edit Buffer}).
|
||||
|
||||
The hotlist is also used to make queries on multiple servers
|
||||
successively (@pxref{Multi-server Queries}). The order in which the
|
||||
servers are tried is the order they appear in the hotlist, therefore it
|
||||
is important to sort the hotlist appropriately.
|
||||
|
||||
@deffn Command eudc-bookmark-server server
|
||||
Add @var{server} to the hotlist of servers
|
||||
@end deffn
|
||||
|
||||
@deffn Command eudc-bookmark-current-server
|
||||
Add the current server to the hotlist of servers
|
||||
@end deffn
|
||||
|
||||
@defvar eudc-options-file
|
||||
The name of a file where EUDC stores its internal variables
|
||||
(the hotlist and the current server). EUDC will try to load
|
||||
that file upon initialization so, if you choose a file name
|
||||
different from the defaults @file{~/.eudc-options}, be sure to set this
|
||||
variable to the appropriate value @emph{before} EUDC is itself
|
||||
loaded.
|
||||
@end defvar
|
||||
|
||||
@menu
|
||||
* The Hotlist Edit Buffer:: An interactive hotlist editing facility
|
||||
@end menu
|
||||
|
||||
@node The Hotlist Edit Buffer, , The Server Hotlist, The Server Hotlist
|
||||
@comment node-name, next, previous, up
|
||||
@subsection The Hotlist Edit Buffer
|
||||
|
||||
The hotlist edit buffer offers a means to manage a list of frequently
|
||||
used servers. Commands are available in the context pop-up menu
|
||||
generally bound to the right mouse button. Those commands also have
|
||||
equivalent key bindings.
|
||||
|
||||
@deffn Command eudc-hotlist-add-server
|
||||
Bound to @kbd{a}.
|
||||
Add a new server to the hotlist on the line after point
|
||||
@end deffn
|
||||
|
||||
@deffn Command eudc-hotlist-delete-server
|
||||
Bound to @kbd{d}.
|
||||
Delete the server on the line point is on
|
||||
@end deffn
|
||||
|
||||
@deffn Command eudc-hotlist-select-server
|
||||
Bound to @kbd{s}.
|
||||
Select the server the point is on as the current directory server for
|
||||
the next queries
|
||||
@end deffn
|
||||
|
||||
@deffn Command eudc-hotlist-transpose-servers
|
||||
Bound to @kbd{t}.
|
||||
Bubble up the server the point is on to the top of the list
|
||||
@end deffn
|
||||
|
||||
@deffn Command eudc-hotlist-quit-edit
|
||||
Bound to @kbd{q}.
|
||||
Save the changes and quit the hotlist edit buffer. Use @kbd{x} or
|
||||
@kbd{M-x kill-buffer} to exit without saving.
|
||||
@end deffn
|
||||
|
||||
|
||||
@node Multi-server Queries, Creating BBDB Records, The Server Hotlist, Usage
|
||||
@comment node-name, next, previous, up
|
||||
@section Multi-server Queries
|
||||
|
||||
When using inline query expansion (@pxref{Inline Query Expansion}), EUDC
|
||||
can try to query successively a sequence of directory servers until one
|
||||
of them successfully finds a match for the query.
|
||||
|
||||
@defvar eudc-inline-expansion-servers
|
||||
This variable controls which servers are tried and in which order when
|
||||
trying to perform an inline query. Possible values are:
|
||||
@table @code
|
||||
@item current-server
|
||||
Only the current directory server is tried
|
||||
@item hotlist
|
||||
The servers in the hotlist are tried in order until one finds a match
|
||||
for the query or `eudc-max-servers-to-query' is reached
|
||||
@item server-then-hotlist
|
||||
The current server then the servers in the hotlist are tried in the
|
||||
order they appear in the hotlist until one of them finds a match or
|
||||
`eudc-max-servers-to-query' is reached. This is the default.
|
||||
@end table
|
||||
@end defvar
|
||||
|
||||
@defvar eudc-max-servers-to-query
|
||||
This variable indicates the maximum number of servers to query when
|
||||
performing a multi-server query. The default, @code{nil}, indicates
|
||||
that all available servers should be tried.
|
||||
@end defvar
|
||||
|
||||
|
||||
|
||||
@node Creating BBDB Records, Server/Protocol Locals, Multi-server Queries, Usage
|
||||
@comment node-name, next, previous, up
|
||||
@section Creating BBDB Records
|
||||
|
||||
@findex eudc-insert-record-at-point-into-bbdb
|
||||
@findex eudc-try-bbdb-insert
|
||||
With EUDC, you can automatically create BBDB records
|
||||
(@pxref{Top,,BBDB,bbdb,BBDB Manual}) from records you get from a
|
||||
directory server. You do this by moving point to the appropriate
|
||||
record in a query result display buffer and invoking the command
|
||||
@kbd{M-x eudc-insert-record-at-point-into-bbdb} with the
|
||||
keyboard binding @kbd{b}@footnote{This key binding does not actually
|
||||
call @code{eudc-insert-record-at-point-into-bbdb} but uses
|
||||
@code{eudc-try-bbdb-insert} instead.}, or with the menu. EUDC
|
||||
cannot update an existing BBDB record and will signal an error if you
|
||||
try to insert a record matching an existing one.
|
||||
|
||||
@findex eudc-batch-export-records-to-bbdb
|
||||
It is also possible to export to BBDB the whole batch of records
|
||||
contained in the directory query result with the command
|
||||
@kbd{M-x eudc-batch-export-records-to-bbdb}.
|
||||
|
||||
Because directory systems may not enforce a strict record format, local
|
||||
server installations may use different attribute names and have
|
||||
different ways to organize the information. Furthermore BBDB has its own
|
||||
record structure. For these reasons converting a record from its
|
||||
external directory format to the BBDB format is a highly customizable
|
||||
process.
|
||||
|
||||
@defvar eudc-bbdb-conversion-alist
|
||||
The value of this variable should be a symbol naming an alist defining a
|
||||
mapping between BBDB field names onto directory attribute names records.
|
||||
This is a protocol-local variable and is initialized upon protocol
|
||||
switch (@pxref{Server/Protocol Locals}). The alist is made of cells of the
|
||||
form @code{(@var{bbdb-field} . @var{spec-or-list})}.
|
||||
@var{bbdb-field} is the name of a field
|
||||
that must be defined in your BBDB environment (standard field names are
|
||||
@code{name}, @code{company}, @code{net}, @code{phone}, @code{address}
|
||||
and @code{notes}).
|
||||
@var{spec-or-list} is either a single mapping specification or a list of
|
||||
mapping specifications. Lists of mapping specifications are valid for
|
||||
the @code{phone} and @code{address} BBDB fields only. @var{spec}s are
|
||||
actually s-expressions which are evaluated as follows:
|
||||
|
||||
@table @asis
|
||||
@item a string
|
||||
evaluates to itself
|
||||
@item a symbol
|
||||
evaluates to the symbol value. Symbols corresponding to directory
|
||||
attribute names present in the record evaluate to the value of the field
|
||||
in the record
|
||||
@item a form
|
||||
is evaluated as a function. The argument list may contain attribute
|
||||
names which evaluate to the corresponding values in the record. The form
|
||||
evaluation should return something appropriate for the particular
|
||||
@var{bbdb-field} (see @code{bbdb-create-internal}).
|
||||
@code{eudc-bbdbify-phone} and @code{eudc-bbdbify-address} are provided as
|
||||
convenience functions to parse phones and addresses.
|
||||
@end table
|
||||
@end defvar
|
||||
|
||||
The default value of the PH-specific value of that variable is
|
||||
@code{eudc-ph-bbdb-conversion-alist}:
|
||||
|
||||
@lisp
|
||||
((name . name)
|
||||
(net . email)
|
||||
(address . (eudc-bbdbify-address address "Address"))
|
||||
(phone . ((eudc-bbdbify-phone phone "Phone")
|
||||
(eudc-bbdbify-phone office_phone "Office Phone"))))
|
||||
@end lisp
|
||||
|
||||
This means that:
|
||||
|
||||
@itemize @bullet
|
||||
@item
|
||||
the @code{name} field of the BBDB record gets its value
|
||||
from the @code{name} attribute of the directory record
|
||||
@item
|
||||
the @code{net} field of the BBDB record gets its value
|
||||
from the @code{email} attribute of the directory record
|
||||
@item
|
||||
the @code{address} field of the BBDB record is obtained by parsing the
|
||||
@code{address} attribute of the directory record with the function
|
||||
@code{eudc-bbdbify-address}
|
||||
@item
|
||||
two @code{phone} fields are created (when possible) in the BBDB record.
|
||||
The first one has @cite{Phone} for location and its value is obtained by
|
||||
parsing the @code{phone} attribute of the PH/QI record with the function
|
||||
@code{eudc-bbdbify-phone}. The second one has @cite{Office Phone} for location
|
||||
its value is obtained by parsing the @code{office_phone} attribute of the
|
||||
PH/QI record with the function @code{eudc-bbdbify-phone}.
|
||||
@end itemize
|
||||
|
||||
@defun eudc-bbdbify-phone phone location
|
||||
This is a convenience function provided for use in
|
||||
@code{eudc-bbdb-conversion-alist}. It parses @var{phone} into a vector
|
||||
compatible with @code{bbdb-create-internal}. @var{phone} is either a string
|
||||
supposedly containing a phone number or a list of such strings which are
|
||||
concatenated. @var{location} is used as the phone location for BBDB.
|
||||
@end defun
|
||||
|
||||
@defun eudc-bbdbify-address addr location
|
||||
This is a convenience function provided for use in
|
||||
@code{eudc-bbdb-conversion-alist}. It parses @var{addr} into a vector
|
||||
compatible with @code{bbdb-create-internal}. @var{addr} should be an
|
||||
address string of no more than four lines or a list of lines. The last
|
||||
line is searched for the zip code, city and state name. @var{location}
|
||||
is used as the phone location for BBDB.
|
||||
@end defun
|
||||
|
||||
Note that only a subset of the attributes you selected with
|
||||
@code{eudc-default-return-attributes} and that are actually displayed may
|
||||
actually be inserted as part of the newly created BBDB record.
|
||||
|
||||
|
||||
@node Server/Protocol Locals, , Creating BBDB Records, Usage
|
||||
@comment node-name, next, previous, up
|
||||
@section Server/Protocol Locals
|
||||
|
||||
EUDC can be customized independently for each server or directory
|
||||
protocol. All variables can be given local bindings that are activated
|
||||
when a particular server and/or protocol becomes active. This is much
|
||||
like buffer-local bindings but on a per server or per protocol basis.
|
||||
|
||||
@menu
|
||||
* Manipulating local bindings:: Functions to set and query local bindings
|
||||
@end menu
|
||||
|
||||
@node Manipulating local bindings, , Server/Protocol Locals, Server/Protocol Locals
|
||||
@comment node-name, next, previous, up
|
||||
@subsection Manipulating local bindings
|
||||
|
||||
EUDC offers functions that let you set and query variables on a per
|
||||
server or per protocol basis.
|
||||
|
||||
The following predicates allow you to test the existence of
|
||||
server/protocol local bindings for a particular variable.
|
||||
|
||||
@defun eudc-server-local-variable-p var
|
||||
Return non-@code{nil} if @var{var} has server-local bindings
|
||||
@end defun
|
||||
|
||||
@defun eudc-protocol-local-variable-p var
|
||||
Return non-@code{nil} if @var{var} has protocol-local bindings
|
||||
@end defun
|
||||
|
||||
The following functions allow you to set the value of a variable with
|
||||
various degrees of locality.
|
||||
|
||||
@defun eudc-default-set var val
|
||||
Set the EUDC default value of @var{var} to @var{val}.
|
||||
The current binding of @var{var} (if local to the current server or
|
||||
protocol) is not changed.
|
||||
@end defun
|
||||
|
||||
@defun eudc-protocol-set var val &optional protocol
|
||||
Set the binding of @var{var} local to @var{protocol} to @var{val}. If
|
||||
omitted, @var{protocol} defaults to the current value of
|
||||
@code{eudc-protocol}. The current binding of @var{var} is changed only
|
||||
if @var{protocol} is omitted.
|
||||
@end defun
|
||||
|
||||
@defun eudc-server-set var val &optional server
|
||||
Set the binding of @var{var} local to @var{server} to @var{val}. If
|
||||
omitted, @var{server} defaults to the current value of
|
||||
@code{eudc-server}. The current binding of @var{var} is changed only if
|
||||
@var{server} is omitted.
|
||||
@end defun
|
||||
|
||||
@defun eudc-set var val
|
||||
Set the most local (server, protocol or default) binding of @var{var} to
|
||||
@var{val}. The current binding of @var{var} is also set to @var{val}.
|
||||
@end defun
|
||||
|
||||
The following variables allow you to query the various bindings of a
|
||||
variable (local or non-local).
|
||||
|
||||
@defun eudc-variable-default-value var
|
||||
Return the default binding of @var{var} (outside of a particular server
|
||||
or protocol local binding).
|
||||
Return @code{unbound} if @var{var} has no EUDC default value.
|
||||
@end defun
|
||||
|
||||
@defun eudc-variable-protocol-value var &optional protocol
|
||||
Return the value of @var{var} local to @var{protocol}. Return
|
||||
@code{unbound} if @var{var} has no value local to @var{protocol}.
|
||||
@var{protocol} defaults to @code{eudc-protocol}.
|
||||
@end defun
|
||||
|
||||
@defun eudc-variable-server-value var [server]
|
||||
Return the value of @var{var} local to @var{server}.
|
||||
Return @code{unbound} if @var{var} has no value local to @var{server}.
|
||||
@var{server} defaults to @code{eudc-server}.
|
||||
@end defun
|
||||
|
||||
Changing a protocol-local or server-local value of a variable has no
|
||||
effect on its current value. The following command is used to
|
||||
synchronize the current values of variables with their local values
|
||||
given the current @code{eudc-server} and @code{eudc-protocol}:
|
||||
|
||||
@defun eudc-update-local-variables
|
||||
Update all EUDC variables according to their local settings.
|
||||
@end defun
|
||||
|
||||
|
||||
|
||||
@node Credits, GNU Free Documentation License, Usage, Top
|
||||
@comment node-name, next, previous, up
|
||||
@chapter Credits
|
||||
|
||||
EUDC was written by Oscar Figueiredo based on @file{ph.el} by the
|
||||
same author.
|
||||
|
||||
Thanks to Soren Dayton for his suggestions, his enthusiasm and his help
|
||||
in testing and proofreading the code and docs of @file{ph.el}.
|
||||
|
||||
@node GNU Free Documentation License, Command and Function Index, Credits, Top
|
||||
@appendix GNU Free Documentation License
|
||||
@include doclicense.texi
|
||||
|
||||
@node Command and Function Index, Variables Index, GNU Free Documentation License, Top
|
||||
@comment node-name, next, previous, up
|
||||
@unnumbered Command and Function Index
|
||||
|
||||
@printindex fn
|
||||
|
||||
@node Variables Index, , Command and Function Index, Top
|
||||
@comment node-name, next, previous, up
|
||||
@unnumbered Variables Index
|
||||
|
||||
@printindex vr
|
||||
|
||||
@setchapternewpage odd
|
||||
@contents
|
||||
@bye
|
||||
|
||||
@ignore
|
||||
arch-tag: 1b79460b-4ea1-441d-ab45-05ddd16ef241
|
||||
@end ignore
|
|
@ -1,6 +1,6 @@
|
|||
\input texinfo @c -*- mode: texinfo; -*-
|
||||
@c %**start of header
|
||||
@setfilename ../info/efaq
|
||||
@setfilename ../../info/efaq
|
||||
@settitle GNU Emacs FAQ
|
||||
@c %**end of header
|
||||
|
||||
|
@ -836,7 +836,7 @@ Make sure the first line of the Texinfo file looks like this:
|
|||
|
||||
You may need to change @samp{texinfo} to the full pathname of the
|
||||
@file{texinfo.tex} file, which comes with Emacs as
|
||||
@file{man/texinfo.tex} (or copy or link it into the current directory).
|
||||
@file{doc/misc/texinfo.tex} (or copy or link it into the current directory).
|
||||
|
||||
@item
|
||||
Type @kbd{texi2dvi @var{texinfo-source}}, where @var{texinfo-source} is
|
||||
|
@ -1013,7 +1013,8 @@ while.
|
|||
@item
|
||||
In the Emacs distribution. Since Emacs 18.56, the FAQ at the time
|
||||
of release has been part of the Emacs distribution as either
|
||||
@file{etc/FAQ} or @file{man/faq.texi} (@pxref{File-name conventions}).
|
||||
@file{etc/FAQ}, @file{man/faq.texi}, or (from version 23 onwards)
|
||||
@file{doc/misc/faq.texi} (@pxref{File-name conventions}).
|
||||
|
||||
@item
|
||||
Via anonymous ftp and e-mail from @file{rtfm.mit.edu} (and its mirror in
|
762
doc/misc/flymake.texi
Normal file
762
doc/misc/flymake.texi
Normal file
|
@ -0,0 +1,762 @@
|
|||
\input texinfo @c -*-texinfo-*-
|
||||
@comment %**start of header
|
||||
@setfilename ../../info/flymake
|
||||
@set VERSION 0.3
|
||||
@set UPDATED April 2004
|
||||
@settitle GNU Flymake @value{VERSION}
|
||||
@syncodeindex pg cp
|
||||
@comment %**end of header
|
||||
|
||||
@copying
|
||||
This manual is for GNU Flymake (version @value{VERSION}, @value{UPDATED}),
|
||||
which is a universal on-the-fly syntax checker for GNU Emacs.
|
||||
|
||||
Copyright @copyright{} 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
@quotation
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.2 or
|
||||
any later version published by the Free Software Foundation; with no
|
||||
Invariant Sections, with the Front-Cover texts being ``A GNU Manual,''
|
||||
and with the Back-Cover Texts as in (a) below. A copy of the license
|
||||
is included in the section entitled ``GNU Free Documentation License''
|
||||
in the Emacs manual.
|
||||
|
||||
(a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
|
||||
this GNU Manual, like GNU software. Copies published by the Free
|
||||
Software Foundation raise funds for GNU development.''
|
||||
|
||||
This document is part of a collection distributed under the GNU Free
|
||||
Documentation License. If you want to distribute this document
|
||||
separately from the collection, you can do so by adding a copy of the
|
||||
license to the document, as described in section 6 of the license.
|
||||
@end quotation
|
||||
@end copying
|
||||
|
||||
@dircategory Emacs
|
||||
@direntry
|
||||
* Flymake: (flymake). A universal on-the-fly syntax checker.
|
||||
@end direntry
|
||||
|
||||
@titlepage
|
||||
@title GNU Flymake
|
||||
@subtitle for version @value{VERSION}, @value{UPDATED}
|
||||
@author Pavel Kobiakov(@email{pk_at_work@@yahoo.com})
|
||||
@page
|
||||
@vskip 0pt plus 1filll
|
||||
@insertcopying
|
||||
@end titlepage
|
||||
|
||||
@contents
|
||||
|
||||
@ifnottex
|
||||
@node Top
|
||||
@top GNU Flymake
|
||||
@end ifnottex
|
||||
|
||||
@menu
|
||||
* Overview of Flymake::
|
||||
* Installing Flymake::
|
||||
* Using Flymake::
|
||||
* Configuring Flymake::
|
||||
* Flymake Implementation::
|
||||
* GNU Free Documentation License::
|
||||
* Index::
|
||||
@end menu
|
||||
|
||||
@node Overview of Flymake
|
||||
@chapter Overview
|
||||
@cindex Overview of Flymake
|
||||
|
||||
Flymake is a universal on-the-fly syntax checker implemented as an
|
||||
Emacs minor mode. Flymake runs the pre-configured syntax check tool
|
||||
(compiler for C++ files, @code{perl} for perl files, etc.) in the
|
||||
background, passing it a temporary copy of the current buffer, and
|
||||
parses the output for known error/warning message patterns. Flymake
|
||||
then highlights erroneous lines (i.e. lines for which at least one
|
||||
error or warning has been reported by the syntax check tool), and
|
||||
displays an overall buffer status in the mode line. Status information
|
||||
displayed by Flymake contains total number of errors and warnings
|
||||
reported for the buffer during the last syntax check.
|
||||
|
||||
@code{flymake-goto-next-error} and @code{flymake-goto-prev-error}
|
||||
functions allow for easy navigation to the next/previous erroneous
|
||||
line, respectively.
|
||||
|
||||
Calling @code{flymake-display-err-menu-for-current-line} will popup a
|
||||
menu containing error messages reported by the syntax check tool for
|
||||
the current line. Errors/warnings belonging to another file, such as a
|
||||
@code{.h} header file included by a @code{.c} file, are shown in the
|
||||
current buffer as belonging to the first line. Menu items for such
|
||||
messages also contain a filename and a line number. Selecting such a
|
||||
menu item will automatically open the file and jump to the line with
|
||||
error.
|
||||
|
||||
Syntax check is done 'on-the-fly'. It is started whenever
|
||||
|
||||
@itemize @bullet
|
||||
@item buffer is loaded
|
||||
@item a newline character is added to the buffer
|
||||
@item some changes were made to the buffer more than @code{0.5} seconds ago (the
|
||||
delay is configurable).
|
||||
@end itemize
|
||||
|
||||
Flymake is a universal syntax checker in the sense that it's easily
|
||||
extended to support new syntax check tools and error message
|
||||
patterns. @xref{Configuring Flymake}.
|
||||
|
||||
@node Installing Flymake
|
||||
@chapter Installing
|
||||
@cindex Installing Flymake
|
||||
|
||||
|
||||
Flymake is packaged in a single file, @code{flymake.el}.
|
||||
|
||||
To install/update Flymake, place @code{flymake.el} to a directory
|
||||
somewhere on Emacs load path. You might also want to byte-compile
|
||||
@code{flymake.el} to improve performance.
|
||||
|
||||
Also, place the following line in the @code{.emacs} file.
|
||||
|
||||
@lisp
|
||||
(require 'flymake)
|
||||
@end lisp
|
||||
|
||||
You might also map the most frequently used Flymake functions, such as
|
||||
@code{flymake-goto-next-error}, to some keyboard shortcuts:
|
||||
|
||||
@lisp
|
||||
(global-set-key [f3] 'flymake-display-err-menu-for-current-line)
|
||||
(global-set-key [f4] 'flymake-goto-next-error)
|
||||
@end lisp
|
||||
|
||||
@node Using Flymake
|
||||
@chapter Using Flymake
|
||||
@cindex Using Flymake
|
||||
|
||||
@menu
|
||||
* Flymake mode::
|
||||
* Running the syntax check::
|
||||
* Navigating to error lines::
|
||||
* Viewing error messages::
|
||||
* Syntax check statuses::
|
||||
* Troubleshooting::
|
||||
@end menu
|
||||
|
||||
@node Flymake mode
|
||||
@section Flymake mode
|
||||
@cindex flymake-mode
|
||||
|
||||
Flymake is an Emacs minor mode. To use Flymake, you
|
||||
must first activate @code{flymake-mode} by using the
|
||||
@code{flymake-mode} function.
|
||||
|
||||
Instead of manually activating @code{flymake-mode}, you can configure
|
||||
Flymake to automatically enable @code{flymake-mode} upon opening any
|
||||
file for which syntax check is possible. To do so, place the following
|
||||
line in @code{.emacs}:
|
||||
|
||||
@lisp
|
||||
(add-hook 'find-file-hook 'flymake-find-file-hook)
|
||||
@end lisp
|
||||
|
||||
@node Running the syntax check
|
||||
@section Running the syntax check
|
||||
@cindex Manually starting the syntax check
|
||||
|
||||
When @code{flymake-mode} is active, syntax check is started
|
||||
automatically on any of the three conditions mentioned above. Syntax
|
||||
check can also be started manually by using the
|
||||
@code{flymake-start-syntax-check-for-current-buffer} function. This
|
||||
can be used, for example, when changes were made to some other buffer
|
||||
affecting the current buffer.
|
||||
|
||||
@node Navigating to error lines
|
||||
@section Navigating to error lines
|
||||
@cindex Navigating to error lines
|
||||
|
||||
After syntax check is completed, lines for which at least one error or
|
||||
warning has been reported are highlighted, and total number of errors
|
||||
and warning is shown in the mode line. Use the following functions to
|
||||
navigate the highlighted lines.
|
||||
|
||||
@multitable @columnfractions 0.25 0.75
|
||||
|
||||
@item @code{flymake-goto-next-error}
|
||||
@tab Moves point to the next erroneous line, if any.
|
||||
|
||||
@item @code{flymake-goto-prev-error}
|
||||
@tab Moves point to the previous erroneous line.
|
||||
|
||||
@end multitable
|
||||
|
||||
These functions treat erroneous lines as a linked list. Therefore,
|
||||
@code{flymake-goto-next-error} will go to the first erroneous line
|
||||
when invoked in the end of the buffer.
|
||||
|
||||
@node Viewing error messages
|
||||
@section Viewing error messages
|
||||
@cindex Viewing error messages
|
||||
|
||||
To view error messages belonging to the current line, use the
|
||||
@code{flymake-display-err-menu-for-current-line} function. If there's
|
||||
at least one error or warning reported for the current line, this
|
||||
function will display a popup menu with error/warning texts.
|
||||
Selecting the menu item whose error belongs to another file brings
|
||||
forward that file with the help of the
|
||||
@code{flymake-goto-file-and-line} function.
|
||||
|
||||
@node Syntax check statuses
|
||||
@section Syntax check statuses
|
||||
@cindex Syntax check statuses
|
||||
|
||||
After syntax check is finished, its status is displayed in the mode line.
|
||||
The following statuses are defined.
|
||||
|
||||
@multitable @columnfractions 0.25 0.75
|
||||
@item Flymake* or Flymake:E/W*
|
||||
@tab Flymake is currently running. For the second case, E/W contains the
|
||||
error and warning count for the previous run.
|
||||
|
||||
@item Flymake
|
||||
@tab Syntax check is not running. Usually this means syntax check was
|
||||
successfully passed (no errors, no warnings). Other possibilities are:
|
||||
syntax check was killed as a result of executing
|
||||
@code{flymake-compile}, or syntax check cannot start as compilation
|
||||
is currently in progress.
|
||||
|
||||
@item Flymake:E/W
|
||||
@tab Number of errors/warnings found by the syntax check process.
|
||||
|
||||
@item Flymake:!
|
||||
@tab Flymake was unable to find master file for the current buffer.
|
||||
@end multitable
|
||||
|
||||
The following errors cause a warning message and switch flymake mode
|
||||
OFF for the buffer.
|
||||
|
||||
@multitable @columnfractions 0.25 0.75
|
||||
@item CFGERR
|
||||
@tab Syntax check process returned nonzero exit code, but no
|
||||
errors/warnings were reported. This indicates a possible configuration
|
||||
error (for example, no suitable error message patterns for the
|
||||
syntax check tool).
|
||||
|
||||
@item NOMASTER
|
||||
@tab Flymake was unable to find master file for the current buffer.
|
||||
|
||||
@item NOMK
|
||||
@tab Flymake was unable to find a suitable buildfile for the current buffer.
|
||||
|
||||
@item PROCERR
|
||||
@tab Flymake was unable to launch a syntax check process.
|
||||
@end multitable
|
||||
|
||||
|
||||
@node Troubleshooting
|
||||
@section Troubleshooting
|
||||
@cindex Logging
|
||||
@cindex Troubleshooting
|
||||
|
||||
Flymake uses a simple logging facility for indicating important points
|
||||
in the control flow. The logging facility sends logging messages to
|
||||
the @code{*Messages*} buffer. The information logged can be used for
|
||||
resolving various problems related to Flymake.
|
||||
|
||||
Logging output is controlled by the @code{flymake-log-level}
|
||||
variable. @code{3} is the most verbose level, and @code{-1} switches
|
||||
logging off.
|
||||
|
||||
@node Configuring Flymake
|
||||
@chapter Configuring and Extending Flymake
|
||||
@cindex Configuring and Extending Flymake
|
||||
|
||||
@menu
|
||||
* Customizable variables::
|
||||
* Adding support for a new syntax check tool::
|
||||
@end menu
|
||||
|
||||
Flymake was designed to be easily extended for supporting new syntax
|
||||
check tools and error message patterns.
|
||||
|
||||
@node Customizable variables
|
||||
@section Customizable variables
|
||||
@cindex Customizable variables
|
||||
|
||||
This section summarizes variables used for Flymake
|
||||
configuration.
|
||||
|
||||
@table @code
|
||||
@item flymake-log-level
|
||||
Controls logging output, see @ref{Troubleshooting}.
|
||||
|
||||
@item flymake-allowed-file-name-masks
|
||||
A list of @code{(filename-regexp, init-function, cleanup-function
|
||||
getfname-function)} for configuring syntax check tools. @xref{Adding
|
||||
support for a new syntax check tool}.
|
||||
|
||||
@item flymake-buildfile-dirs
|
||||
A list of directories (relative paths) for searching a
|
||||
buildfile. @xref{Locating the buildfile}.
|
||||
|
||||
@item flymake-master-file-dirs
|
||||
A list of directories for searching a master file. @xref{Locating a
|
||||
master file}.
|
||||
|
||||
@item flymake-get-project-include-dirs-function
|
||||
A function used for obtaining a list of project include dirs (C/C++
|
||||
specific). @xref{Getting the include directories}.
|
||||
|
||||
@item flymake-master-file-count-limit
|
||||
@itemx flymake-check-file-limit
|
||||
Used when looking for a master file. @xref{Locating a master file}.
|
||||
|
||||
@item flymake-err-line-patterns
|
||||
Patterns for error/warning messages in the form @code{(regexp file-idx
|
||||
line-idx col-idx err-text-idx)}. @xref{Parsing the output}.
|
||||
|
||||
@item flymake-compilation-prevents-syntax-check
|
||||
A flag indicating whether compilation and syntax check of the same
|
||||
file cannot be run simultaneously.
|
||||
|
||||
@item flymake-no-changes-timeout
|
||||
If any changes are made to the buffer, syntax check is automatically
|
||||
started after @code{flymake-no-changes-timeout} seconds.
|
||||
|
||||
@item flymake-gui-warnings-enabled
|
||||
A boolean flag indicating whether Flymake will show message boxes for
|
||||
non-recoverable errors. If @code{flymake-gui-warnings-enabled} is
|
||||
@code{nil}, these errors will only be logged to the @code{*Messages*}
|
||||
buffer.
|
||||
|
||||
@item flymake-start-syntax-check-on-newline
|
||||
A boolean flag indicating whether to start syntax check after a
|
||||
newline character is added to the buffer.
|
||||
|
||||
@item flymake-errline
|
||||
A custom face for highlighting lines for which at least one error has
|
||||
been reported.
|
||||
|
||||
@item flymake-warnline
|
||||
A custom face for highlighting lines for which at least one warning
|
||||
and no errors have been reported.
|
||||
|
||||
@end table
|
||||
|
||||
@node Adding support for a new syntax check tool
|
||||
@section Adding support for a new syntax check tool
|
||||
@cindex Adding support for a new syntax check tool
|
||||
|
||||
@menu
|
||||
* Example -- Configuring a tool called directly::
|
||||
* Example -- Configuring a tool called via make::
|
||||
@end menu
|
||||
|
||||
Syntax check tools are configured using the
|
||||
@code{flymake-allowed-file-name-masks} list. Each item of this list
|
||||
has the following format:
|
||||
|
||||
@lisp
|
||||
(filename-regexp, init-function, cleanup-function, getfname-function)
|
||||
@end lisp
|
||||
|
||||
@table @code
|
||||
@item filename-regexp
|
||||
This field is used as a key for locating init/cleanup/getfname
|
||||
functions for the buffer. Items in
|
||||
@code{flymake-allowed-file-name-masks} are searched sequentially. The
|
||||
first item with @code{filename-regexp} matching buffer filename is
|
||||
selected. If no match is found, @code{flymake-mode} is switched off.
|
||||
|
||||
@item init-function
|
||||
@code{init-function} is required to initialize the syntax check,
|
||||
usually by creating a temporary copy of the buffer contents. The
|
||||
function must return @code{(list cmd-name arg-list)}. If
|
||||
@code{init-function} returns null, syntax check is aborted, by
|
||||
@code{flymake-mode} is not switched off.
|
||||
|
||||
@item cleanup-function
|
||||
@code{cleanup-function} is called after the syntax check process is
|
||||
complete and should take care of proper deinitialization, which is
|
||||
usually deleting a temporary copy created by the @code{init-function}.
|
||||
|
||||
@item getfname-function
|
||||
This function is used for translating filenames reported by the syntax
|
||||
check tool into ``real'' filenames. Filenames reported by the tool
|
||||
will be different from the real ones, as actually the tool works with
|
||||
the temporary copy. In most cases, the default implementation
|
||||
provided by Flymake, @code{flymake-get-real-file-name}, can be used as
|
||||
@code{getfname-function}.
|
||||
|
||||
@end table
|
||||
|
||||
To add support for a new syntax check tool, write corresponding
|
||||
@code{init-function}, and, optionally @code{cleanup-function} and
|
||||
@code{getfname-function}. If the format of error messages reported by
|
||||
the new tool is not yet supported by Flymake, add a new entry to
|
||||
the @code{flymake-err-line-patterns} list.
|
||||
|
||||
The following sections contain some examples of configuring Flymake
|
||||
support for various syntax check tools.
|
||||
|
||||
@node Example -- Configuring a tool called directly
|
||||
@subsection Example -- Configuring a tool called directly
|
||||
@cindex Adding support for perl
|
||||
|
||||
In this example, we will add support for @code{perl} as a syntax check
|
||||
tool. @code{perl} supports the @code{-c} option which does syntax
|
||||
checking.
|
||||
|
||||
First, we write the @code{init-function}:
|
||||
|
||||
@lisp
|
||||
(defun flymake-perl-init ()
|
||||
(let* ((temp-file (flymake-init-create-temp-buffer-copy
|
||||
'flymake-create-temp-inplace))
|
||||
(local-file (concat (flymake-build-relative-filename
|
||||
(file-name-directory
|
||||
(buffer-file-name
|
||||
(current-buffer)))
|
||||
(file-name-directory temp-file))
|
||||
(file-name-nondirectory temp-file))))
|
||||
(list "perl" (list "-wc " local-file))))
|
||||
@end lisp
|
||||
|
||||
@code{flymake-perl-init} creates a temporary copy of the buffer
|
||||
contents with the help of
|
||||
@code{flymake-init-create-temp-buffer-copy}, and builds an appropriate
|
||||
command line.
|
||||
|
||||
Next, we add a new entry to the
|
||||
@code{flymake-allowed-file-name-masks}:
|
||||
|
||||
@lisp
|
||||
(setq flymake-allowed-file-name-masks
|
||||
(cons '(".+\\.pl$"
|
||||
flymake-perl-init
|
||||
flymake-simple-cleanup
|
||||
flymake-get-real-file-name)
|
||||
flymake-allowed-file-name-masks))
|
||||
@end lisp
|
||||
|
||||
Note that we use standard @code{cleanup-function} and
|
||||
@code{getfname-function}.
|
||||
|
||||
Finally, we add an entry to @code{flymake-err-line-patterns}:
|
||||
|
||||
@lisp
|
||||
(setq flymake-err-line-patterns
|
||||
(cons '("\\(.*\\) at \\([^ \n]+\\) line \\([0-9]+\\)[,.\n]"
|
||||
2 3 nil 1)
|
||||
flymake-err-line-patterns))
|
||||
@end lisp
|
||||
|
||||
@node Example -- Configuring a tool called via make
|
||||
@subsection Example -- Configuring a tool called via make
|
||||
@cindex Adding support for C (gcc+make)
|
||||
|
||||
In this example we will add support for C files syntax checked by
|
||||
@code{gcc} called via @code{make}.
|
||||
|
||||
We're not required to write any new functions, as Flymake already has
|
||||
functions for @code{make}. We just add a new entry to the
|
||||
@code{flymake-allowed-file-name-masks}:
|
||||
|
||||
@lisp
|
||||
(setq flymake-allowed-file-name-masks
|
||||
(cons '(".+\\.c$"
|
||||
flymake-simple-make-init
|
||||
flymake-simple-cleanup
|
||||
flymake-get-real-file-name)
|
||||
flymake-allowed-file-name-masks))
|
||||
@end lisp
|
||||
|
||||
@code{flymake-simple-make-init} builds the following @code{make}
|
||||
command line:
|
||||
|
||||
@lisp
|
||||
(list "make"
|
||||
(list "-s" "-C"
|
||||
base-dir
|
||||
(concat "CHK_SOURCES=" source)
|
||||
"SYNTAX_CHECK_MODE=1"
|
||||
"check-syntax"))
|
||||
@end lisp
|
||||
|
||||
@code{base-dir} is a directory containing @code{Makefile}, see @ref{Locating the buildfile}.
|
||||
|
||||
Thus, @code{Makefile} must contain the @code{check-syntax} target. In
|
||||
our case this target might look like this:
|
||||
|
||||
@verbatim
|
||||
check-syntax:
|
||||
gcc -o nul -S ${CHK_SOURCES}
|
||||
@end verbatim
|
||||
|
||||
The format of error messages reported by @code{gcc} is already
|
||||
supported by Flymake, so we don't have to add a new entry to
|
||||
@code{flymake-err-line-patterns}.
|
||||
|
||||
@node Flymake Implementation
|
||||
@chapter Flymake Implementation
|
||||
@cindex Implementation details
|
||||
|
||||
@menu
|
||||
* Determining whether syntax check is possible::
|
||||
* Making a temporary copy::
|
||||
* Locating a master file::
|
||||
* Getting the include directories::
|
||||
* Locating the buildfile::
|
||||
* Starting the syntax check process::
|
||||
* Parsing the output::
|
||||
* Highlighting erroneous lines::
|
||||
* Interaction with other modes::
|
||||
@end menu
|
||||
|
||||
Syntax check is started by calling @code{flymake-start-syntax-check-for-current-buffer}.
|
||||
Flymake first determines whether it is able to do syntax
|
||||
check. It then saves a copy of the buffer in a temporary file in the
|
||||
buffer's directory (or in the system temp directory -- for java
|
||||
files), creates a syntax check command and launches a process with
|
||||
this command. The output is parsed using a list of error message patterns,
|
||||
and error information (file name, line number, type and text) is
|
||||
saved. After the process has finished, Flymake highlights erroneous
|
||||
lines in the buffer using the accumulated error information.
|
||||
|
||||
@node Determining whether syntax check is possible
|
||||
@section Determining whether syntax check is possible
|
||||
@cindex Syntax check models
|
||||
@cindex Master file
|
||||
|
||||
Syntax check is considered possible if there's an entry in
|
||||
@code{flymake-allowed-file-name-masks} matching buffer's filename and
|
||||
its @code{init-function} returns non-@code{nil} value.
|
||||
|
||||
Two syntax check modes are distinguished:
|
||||
|
||||
@enumerate
|
||||
|
||||
@item
|
||||
Buffer can be syntax checked in a standalone fashion, that is, the
|
||||
file (its temporary copy, in fact) can be passed over to the compiler to
|
||||
do the syntax check. Examples are C/C++ (.c, .cpp) and Java (.java)
|
||||
sources.
|
||||
|
||||
@item
|
||||
Buffer can be syntax checked, but additional file, called master file,
|
||||
is required to perform this operation. A master file is a file that
|
||||
includes the current file, so that running a syntax check tool on it
|
||||
will also check syntax in the current file. Examples are C/C++ (.h,
|
||||
.hpp) headers.
|
||||
|
||||
@end enumerate
|
||||
|
||||
These modes are handled inside init/cleanup/getfname functions, see
|
||||
@ref{Adding support for a new syntax check tool}.
|
||||
|
||||
Flymake contains implementations of all functionality required to
|
||||
support different syntax check modes described above (making
|
||||
temporary copies, finding master files, etc.), as well as some
|
||||
tool-specific (routines for @code{make}, @code{Ant}, etc.) code.
|
||||
|
||||
|
||||
@node Making a temporary copy
|
||||
@section Making a temporary copy
|
||||
@cindex Temporary copy of the buffer
|
||||
@cindex Master file
|
||||
|
||||
After the possibility of the syntax check has been determined, a
|
||||
temporary copy of the current buffer is made so that the most recent
|
||||
unsaved changes could be seen by the syntax check tool. Making a copy
|
||||
is quite straightforward in a standalone case (mode @code{1}), as it's
|
||||
just saving buffer contents to a temporary file.
|
||||
|
||||
Things get trickier, however, when master file is involved, as it
|
||||
requires to
|
||||
|
||||
@itemize @bullet
|
||||
@item locate a master file
|
||||
@item patch it to include the current file using its new (temporary)
|
||||
name.
|
||||
@end itemize
|
||||
|
||||
Locating a master file is discussed in the following section.
|
||||
|
||||
Patching just changes all appropriate lines of the master file so that they
|
||||
use the new (temporary) name of the current file. For example, suppose current
|
||||
file name is @code{file.h}, the master file is @code{file.cpp}, and
|
||||
it includes current file via @code{#include "file.h"}. Current file's copy
|
||||
is saved to file @code{file_flymake.h}, so the include line must be
|
||||
changed to @code{#include "file_flymake.h"}. Finally, patched master file
|
||||
is saved to @code{file_flymake_master.cpp}, and the last one is passed to
|
||||
the syntax check tool.
|
||||
|
||||
@node Locating a master file
|
||||
@section Locating a master file
|
||||
@cindex Master file
|
||||
|
||||
Master file is located in two steps.
|
||||
|
||||
First, a list of possible master files is built. A simple name
|
||||
matching is used to find the files. For a C++ header @code{file.h},
|
||||
Flymake searches for all @code{.cpp} files in the directories whose relative paths are
|
||||
stored in a customizable variable @code{flymake-master-file-dirs}, which
|
||||
usually contains something like @code{("." "./src")}. No more than
|
||||
@code{flymake-master-file-count-limit} entries is added to the master file
|
||||
list. The list is then sorted to move files with names @code{file.cpp} to
|
||||
the top.
|
||||
|
||||
Next, each master file in a list is checked to contain the appropriate
|
||||
include directives. No more than @code{flymake-check-file-limit} of each
|
||||
file are parsed.
|
||||
|
||||
For @code{file.h}, the include directives to look for are
|
||||
@code{#include "file.h"}, @code{#include "../file.h"}, etc. Each
|
||||
include is checked against a list of include directories
|
||||
(see @ref{Getting the include directories}) to be sure it points to the
|
||||
correct @code{file.h}.
|
||||
|
||||
First matching master file found stops the search. The master file is then
|
||||
patched and saved to disk. In case no master file is found, syntax check is
|
||||
aborted, and corresponding status (!) is reported in the mode line.
|
||||
|
||||
@node Getting the include directories
|
||||
@section Getting the include directories
|
||||
@cindex Include directories (C/C++ specific)
|
||||
|
||||
Two sets of include directories are distinguished: system include directories
|
||||
and project include directories. The former is just the contents of the
|
||||
@code{INCLUDE} environment variable. The latter is not so easy to obtain,
|
||||
and the way it can be obtained can vary greatly for different projects.
|
||||
Therefore, a customizable variable
|
||||
@code{flymake-get-project-include-dirs-function} is used to provide the
|
||||
way to implement the desired behavior.
|
||||
|
||||
The default implementation, @code{flymake-get-project-include-dirs-imp},
|
||||
uses a @code{make} call. This requires a correct base directory, that is, a
|
||||
directory containing a correct @code{Makefile}, to be determined.
|
||||
|
||||
As obtaining the project include directories might be a costly operation, its
|
||||
return value is cached in the hash table. The cache is cleared in the beginning
|
||||
of every syntax check attempt.
|
||||
|
||||
@node Locating the buildfile
|
||||
@section Locating the buildfile
|
||||
@cindex Locating the buildfile
|
||||
@cindex buildfile, locating
|
||||
@cindex Makefile, locating
|
||||
|
||||
Flymake can be configured to use different tools for performing syntax
|
||||
checks. For example, it can use direct compiler call to syntax check a perl
|
||||
script or a call to @code{make} for a more complicated case of a
|
||||
@code{C/C++} source. The general idea is that simple files, like perl
|
||||
scripts and html pages, can be checked by directly invoking a
|
||||
corresponding tool. Files that are usually more complex and generally
|
||||
used as part of larger projects, might require non-trivial options to
|
||||
be passed to the syntax check tool, like include directories for
|
||||
C++. The latter files are syntax checked using some build tool, like
|
||||
@code{make} or @code{Ant}.
|
||||
|
||||
All @code{make} configuration data is usually stored in a file called
|
||||
@code{Makefile}. To allow for future extensions, flymake uses a notion of
|
||||
buildfile to reference the 'project configuration' file.
|
||||
|
||||
Special function, @code{flymake-find-buildfile} is provided for locating buildfiles.
|
||||
Searching for a buildfile is done in a manner similar to that of searching
|
||||
for possible master files. A customizable variable
|
||||
@code{flymake-buildfile-dirs} holds a list of relative paths to the
|
||||
buildfile. They are checked sequentially until a buildfile is found. In case
|
||||
there's no build file, syntax check is aborted.
|
||||
|
||||
Buildfile values are also cached.
|
||||
|
||||
@node Starting the syntax check process
|
||||
@section Starting the syntax check process
|
||||
@cindex Syntax check process
|
||||
|
||||
The command line (command name and the list of arguments) for launching a process is returned by the
|
||||
initialization function. Flymake then just calls @code{start-process}
|
||||
to start an asynchronous process and configures process filter and
|
||||
sentinel which is used for processing the output of the syntax check
|
||||
tool.
|
||||
|
||||
@node Parsing the output
|
||||
@section Parsing the output
|
||||
@cindex Parsing the output
|
||||
|
||||
The output generated by the syntax check tool is parsed in the process
|
||||
filter/sentinel using the error message patterns stored in the
|
||||
@code{flymake-err-line-patterns} variable. This variable contains a
|
||||
list of items of the form @code{(regexp file-idx line-idx
|
||||
err-text-idx)}, used to determine whether a particular line is an
|
||||
error message and extract file name, line number and error text,
|
||||
respectively. Error type (error/warning) is also guessed by matching
|
||||
error text with the '@code{^[wW]arning}' pattern. Anything that was not
|
||||
classified as a warning is considered an error. Type is then used to
|
||||
sort error menu items, which shows error messages first.
|
||||
|
||||
Flymake is also able to interpret error message patterns missing err-text-idx
|
||||
information. This is done by merely taking the rest of the matched line
|
||||
(@code{(substring line (match-end 0))}) as error text. This trick allows
|
||||
to make use of a huge collection of error message line patterns from
|
||||
@code{compile.el}. All these error patterns are appended to
|
||||
the end of @code{flymake-err-line-patterns}.
|
||||
|
||||
The error information obtained is saved in a buffer local
|
||||
variable. The buffer for which the process output belongs is
|
||||
determined from the process-id@w{}->@w{}buffer mapping updated
|
||||
after every process launch/exit.
|
||||
|
||||
@node Highlighting erroneous lines
|
||||
@section Highlighting erroneous lines
|
||||
@cindex Erroneous lines, faces
|
||||
|
||||
Highlighting is implemented with overlays and happens in the process
|
||||
sentinel, after calling the cleanup function. Two customizable faces
|
||||
are used: @code{flymake-errline} and
|
||||
@code{flymake-warnline}. Errors belonging outside the current
|
||||
buffer are considered to belong to line 1 of the current buffer.
|
||||
|
||||
@node Interaction with other modes
|
||||
@section Interaction with other modes
|
||||
@cindex Interaction with other modes
|
||||
@cindex Interaction with compile mode
|
||||
|
||||
The only mode flymake currently knows about is @code{compile}.
|
||||
|
||||
Flymake can be configured to not start syntax check if it thinks the
|
||||
compilation is in progress. The check is made by the
|
||||
@code{flymake-compilation-is-running}, which tests the
|
||||
@code{compilation-in-progress} variable. The reason why this might be
|
||||
useful is saving CPU time in case both syntax check and compilation
|
||||
are very CPU intensive. The original reason for adding this feature,
|
||||
though, was working around a locking problem with MS Visual C++ compiler.
|
||||
|
||||
Flymake also provides an alternative command for starting compilation,
|
||||
@code{flymake-compile}:
|
||||
|
||||
@lisp
|
||||
(defun flymake-compile ()
|
||||
"Kill all flymake syntax checks then start compilation."
|
||||
(interactive)
|
||||
(flymake-stop-all-syntax-checks)
|
||||
(call-interactively 'compile))
|
||||
@end lisp
|
||||
|
||||
It just kills all the active syntax check processes before calling
|
||||
@code{compile}.
|
||||
|
||||
@node GNU Free Documentation License
|
||||
@appendix GNU Free Documentation License
|
||||
@include doclicense.texi
|
||||
|
||||
@node Index
|
||||
@unnumbered Index
|
||||
|
||||
@printindex cp
|
||||
|
||||
@bye
|
||||
|
||||
@ignore
|
||||
arch-tag: 9f0db077-5598-49ab-90b9-8df9248a63ec
|
||||
@end ignore
|
985
doc/misc/forms.texi
Normal file
985
doc/misc/forms.texi
Normal file
|
@ -0,0 +1,985 @@
|
|||
\input texinfo @c -*-texinfo-*-
|
||||
@c documentation for forms-mode
|
||||
@c Written by Johan Vromans, and edited by Richard Stallman
|
||||
|
||||
@comment %**start of header (This is for running Texinfo on a region.)
|
||||
@setfilename ../../info/forms
|
||||
@settitle Forms Mode User's Manual
|
||||
@syncodeindex vr cp
|
||||
@syncodeindex fn cp
|
||||
@syncodeindex ky cp
|
||||
@iftex
|
||||
@finalout
|
||||
@setchapternewpage odd
|
||||
@end iftex
|
||||
@c @smallbook
|
||||
@comment %**end of header (This is for running Texinfo on a region.)
|
||||
|
||||
@copying
|
||||
This file documents Forms mode, a form-editing major mode for GNU Emacs.
|
||||
|
||||
Copyright @copyright{} 1989, 1997, 2001, 2002, 2003, 2004,
|
||||
2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
@quotation
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.2 or
|
||||
any later version published by the Free Software Foundation; with no
|
||||
Invariant Sections, with the Front-Cover texts being ``A GNU
|
||||
Manual,'' and with the Back-Cover Texts as in (a) below. A copy of the
|
||||
license is included in the section entitled ``GNU Free Documentation
|
||||
License'' in the Emacs manual.
|
||||
|
||||
(a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
|
||||
this GNU Manual, like GNU software. Copies published by the Free
|
||||
Software Foundation raise funds for GNU development.''
|
||||
|
||||
This document is part of a collection distributed under the GNU Free
|
||||
Documentation License. If you want to distribute this document
|
||||
separately from the collection, you can do so by adding a copy of the
|
||||
license to the document, as described in section 6 of the license.
|
||||
@end quotation
|
||||
@end copying
|
||||
|
||||
@dircategory Emacs
|
||||
@direntry
|
||||
* Forms: (forms). Emacs package for editing data bases
|
||||
by filling in forms.
|
||||
@end direntry
|
||||
|
||||
@titlepage
|
||||
@sp 6
|
||||
@center @titlefont{Forms Mode User's Manual}
|
||||
@sp 4
|
||||
@center Forms-Mode version 2
|
||||
@sp 1
|
||||
@center for GNU Emacs 22.1
|
||||
@sp 1
|
||||
@center April 2007
|
||||
@sp 5
|
||||
@center Johan Vromans
|
||||
@center @i{jvromans@@squirrel.nl}
|
||||
@page
|
||||
@vskip 0pt plus 1filll
|
||||
@insertcopying
|
||||
@end titlepage
|
||||
|
||||
@ifnottex
|
||||
@node Top
|
||||
@top Forms Mode
|
||||
|
||||
Forms mode is an Emacs major mode for working with simple textual data
|
||||
bases in a forms-oriented manner. In Forms mode, the information in
|
||||
these files is presented in an Emacs window in a user-defined format,
|
||||
one record at a time. The user can view records or modify their
|
||||
contents.
|
||||
|
||||
Forms mode is not a simple major mode, but requires two files to do its
|
||||
job: a control file and a data file. The data file holds the
|
||||
actual data to be presented. The control file describes
|
||||
how to present it.
|
||||
|
||||
@menu
|
||||
* Forms Example:: An example: editing the password data base.
|
||||
* Entering and Exiting Forms Mode::
|
||||
How to visit a file in Forms mode.
|
||||
* Forms Commands:: Special commands to use while in Forms mode.
|
||||
* Data File Format:: How to format the data file.
|
||||
* Control File Format:: How to control forms mode.
|
||||
* Format Description:: How to define the forms layout.
|
||||
* Modifying Forms Contents:: How to modify.
|
||||
* Miscellaneous:: Forms mode messages and other remarks.
|
||||
* Error Messages:: List of error messages forms mode can produce.
|
||||
* Long Example:: A more complex control file example.
|
||||
* GNU Free Documentation License:: The license for this documentation.
|
||||
* Credits:: Thanks everyone.
|
||||
* Index:: Index to this manual.
|
||||
@end menu
|
||||
@end ifnottex
|
||||
|
||||
@node Forms Example
|
||||
@chapter Forms Example
|
||||
|
||||
Let's illustrate Forms mode with an example. Suppose you are looking at
|
||||
the @file{/etc/passwd} file, and the screen looks like this:
|
||||
|
||||
@example
|
||||
====== /etc/passwd ======
|
||||
|
||||
User : root Uid: 0 Gid: 1
|
||||
|
||||
Name : Super User
|
||||
|
||||
Home : /
|
||||
|
||||
Shell: /bin/sh
|
||||
@end example
|
||||
|
||||
As you can see, the familiar fields from the entry for the super user
|
||||
are all there, but instead of being colon-separated on one single line,
|
||||
they make up a forms.
|
||||
|
||||
The contents of the forms consist of the contents of the fields of the
|
||||
record (e.g. @samp{root}, @samp{0}, @samp{1}, @samp{Super User})
|
||||
interspersed with normal text (e.g @samp{User : }, @samp{Uid: }).
|
||||
|
||||
If you modify the contents of the fields, Forms mode will analyze your
|
||||
changes and update the file appropriately. You cannot modify the
|
||||
interspersed explanatory text (unless you go to some trouble about it),
|
||||
because that is marked read-only (@pxref{Text Properties,,, elisp, The
|
||||
Emacs Lisp Reference Manual}).
|
||||
|
||||
The Forms mode control file specifies the relationship between the
|
||||
format of @file{/etc/passwd} and what appears on the screen in Forms
|
||||
mode. @xref{Control File Format}.
|
||||
|
||||
@node Entering and Exiting Forms Mode
|
||||
@chapter Entering and Exiting Forms Mode
|
||||
|
||||
@table @kbd
|
||||
@findex forms-find-file
|
||||
@item M-x forms-find-file @key{RET} @var{control-file} @key{RET}
|
||||
Visit a database using Forms mode. Specify the name of the
|
||||
@strong{control file}, not the data file!
|
||||
|
||||
@findex forms-find-file-other-window
|
||||
@item M-x forms-find-file-other-window @key{RET} @var{control-file} @key{RET}
|
||||
Similar, but displays the file in another window.
|
||||
@end table
|
||||
|
||||
The command @code{forms-find-file} evaluates the file
|
||||
@var{control-file}, and also visits it in Forms mode. What you see in
|
||||
its buffer is not the contents of this file, but rather a single record
|
||||
of the corresponding data file that is visited in its own buffer. So
|
||||
there are two buffers involved in Forms mode: the @dfn{forms buffer}
|
||||
that is initially used to visit the control file and that shows the
|
||||
records being browsed, and the @dfn{data buffer} that holds the data
|
||||
file being visited. The latter buffer is normally not visible.
|
||||
|
||||
Initially, the first record is displayed in the forms buffer.
|
||||
The mode line displays the major mode name @samp{Forms}, followed by the
|
||||
minor mode @samp{View} if the data base is read-only. The number of the
|
||||
current record (@var{n}) and the total number of records in the
|
||||
file(@var{t}) are shown in the mode line as @samp{@var{n}/@var{t}}. For
|
||||
example:
|
||||
|
||||
@example
|
||||
--%%-Emacs: passwd-demo (Forms View 1/54)----All-------
|
||||
@end example
|
||||
|
||||
If the buffer is not read-only, you may change the buffer to modify the
|
||||
fields in the record. When you move to a different record, the contents
|
||||
of the buffer are parsed using the specifications in
|
||||
@code{forms-format-list}, and the data file is updated. If the record
|
||||
has fields that aren't included in the display, they are not changed.
|
||||
|
||||
@vindex forms-mode-hooks
|
||||
Entering Forms mode runs the normal hook @code{forms-mode-hooks} to
|
||||
perform user-defined customization.
|
||||
|
||||
To save any modified data, you can use @kbd{C-x C-s}
|
||||
(@code{forms-save-buffer}). This does not save the forms buffer (which would
|
||||
be rather useless), but instead saves the buffer visiting the data file.
|
||||
|
||||
To terminate Forms mode, you can use @kbd{C-x C-s} (@code{forms-save-buffer})
|
||||
and then kill the forms buffer. However, the data buffer will still
|
||||
remain. If this is not desired, you have to kill this buffer too.
|
||||
|
||||
@node Forms Commands
|
||||
@chapter Forms Commands
|
||||
|
||||
The commands of Forms mode belong to the @kbd{C-c} prefix, with one
|
||||
exception: @key{TAB}, which moves to the next field. Forms mode uses
|
||||
different key maps for normal mode and read-only mode. In read-only
|
||||
Forms mode, you can access most of the commands without the @kbd{C-c}
|
||||
prefix, but you must type ordinary letters instead of control
|
||||
characters; for example, type @kbd{n} instead of @kbd{C-c C-n}.
|
||||
|
||||
If your Emacs has been built with X-toolkit support, Forms mode will
|
||||
provide its own menu with a number of Forms mode commands.
|
||||
|
||||
@table @kbd
|
||||
@findex forms-next-record
|
||||
@kindex C-c C-n
|
||||
@item C-c C-n
|
||||
Show the next record (@code{forms-next-record}). With a numeric
|
||||
argument @var{n}, show the @var{n}th next record.
|
||||
|
||||
@findex forms-prev-record
|
||||
@kindex C-c C-p
|
||||
@item C-c C-p
|
||||
Show the previous record (@code{forms-prev-record}). With a numeric
|
||||
argument @var{n}, show the @var{n}th previous record.
|
||||
|
||||
@findex forms-jump-record
|
||||
@kindex C-c C-l
|
||||
@item C-c C-l
|
||||
Jump to a record by number (@code{forms-jump-record}). Specify
|
||||
the record number with a numeric argument.
|
||||
|
||||
@findex forms-first-record
|
||||
@kindex C-c <
|
||||
@item C-c <
|
||||
Jump to the first record (@code{forms-first-record}).
|
||||
|
||||
@findex forms-last-record
|
||||
@kindex C-c >
|
||||
@item C-c >
|
||||
Jump to the last record (@code{forms-last-record}). This command also
|
||||
recalculates the number of records in the data file.
|
||||
|
||||
@findex forms-next-field
|
||||
@kindex TAB
|
||||
@item @key{TAB}
|
||||
@kindex C-c TAB
|
||||
@itemx C-c @key{TAB}
|
||||
Jump to the next field in the current record (@code{forms-next-field}).
|
||||
With a numeric argument @var{n}, jump forward @var{n} fields. If this command
|
||||
would move past the last field, it wraps around to the first field.
|
||||
|
||||
@findex forms-toggle-read-only
|
||||
@kindex C-c C-q
|
||||
@item C-c C-q
|
||||
Toggles read-only mode (@code{forms-toggle-read-only}). In read-only
|
||||
Forms mode, you cannot edit the fields; most Forms mode commands can be
|
||||
accessed without the prefix @kbd{C-c} if you use the normal letter
|
||||
instead (for example, type @kbd{n} instead of @kbd{C-c C-n}). In edit
|
||||
mode, you can edit the fields and thus change the contents of the data
|
||||
base; you must begin Forms mode commands with @code{C-c}. Switching
|
||||
to edit mode is allowed only if you have write access to the data file.
|
||||
|
||||
@findex forms-insert-record
|
||||
@kindex C-c C-o
|
||||
@item C-c C-o
|
||||
Create a new record and insert it before the current record
|
||||
(@code{forms-insert-record}). It starts out with empty (or default)
|
||||
contents for its fields; you can then edit the fields. With a numeric
|
||||
argument, the new record is created @emph{after} the current one.
|
||||
See also @code{forms-modified-record-filter} in @ref{Modifying Forms
|
||||
Contents}.
|
||||
|
||||
@findex forms-delete-record
|
||||
@kindex C-c C-k
|
||||
@item C-c C-k
|
||||
Delete the current record (@code{forms-delete-record}). You are
|
||||
prompted for confirmation before the record is deleted unless a numeric
|
||||
argument has been provided.
|
||||
|
||||
@findex forms-search-forward
|
||||
@kindex C-c C-s @var{regexp} @key{RET}
|
||||
@item C-c C-s @var{regexp} @key{RET}
|
||||
Search forward for @var{regexp} in all records following this one
|
||||
(@code{forms-search-forward}). If found, this record is shown.
|
||||
If you give an empty argument, the previous regexp is used again.
|
||||
|
||||
@findex forms-search-backward
|
||||
@kindex C-c C-r @var{regexp} @key{RET}
|
||||
@item C-c C-r @var{regexp} @key{RET}
|
||||
Search backward for @var{regexp} in all records following this one
|
||||
(@code{forms-search-backward}). If found, this record is shown.
|
||||
If you give an empty argument, the previous regexp is used again.
|
||||
|
||||
@ignore
|
||||
@findex forms-exit
|
||||
@kindex C-c C-x
|
||||
@item C-c C-x
|
||||
Terminate Forms mode processing (@code{forms-exit}). The data file is
|
||||
saved if it has been modified.
|
||||
|
||||
@findex forms-exit-no-save
|
||||
@item M-x forms-exit-no-save
|
||||
Terminates forms mode processing without saving modified data first.
|
||||
@end ignore
|
||||
|
||||
@findex forms-prev-field
|
||||
@item M-x forms-prev-field
|
||||
Similar to @code{forms-next-field} but moves backwards.
|
||||
|
||||
@findex forms-save-buffer
|
||||
@item M-x forms-save-buffer
|
||||
@kindex C-x C-s
|
||||
@itemx C-x C-s
|
||||
Forms mode replacement for @code{save-buffer}. When executed in the
|
||||
forms buffer it will save the contents of the (modified) data buffer
|
||||
instead. In Forms mode this function will be bound to @kbd{C-x C-s}.
|
||||
|
||||
@findex forms-print
|
||||
@item M-x forms-print
|
||||
This command can be used to make a formatted print
|
||||
of the contents of the data file.
|
||||
|
||||
@end table
|
||||
|
||||
In addition the command @kbd{M-x revert-buffer} is useful in Forms mode
|
||||
just as in other modes.
|
||||
|
||||
@ignore
|
||||
@vindex forms-forms-scroll
|
||||
@findex scroll-up
|
||||
@findex scroll-down
|
||||
If the variable @code{forms-forms-scrolls} is set to a value other
|
||||
than @code{nil} (which it is, by default), the Emacs functions
|
||||
@code{scroll-up} and @code{scroll-down} will perform a
|
||||
@code{forms-next-record} and @code{forms-prev-record} when in forms
|
||||
mode. So you can use your favorite page commands to page through the
|
||||
data file.
|
||||
|
||||
@vindex forms-forms-jump
|
||||
@findex beginning-of-buffer
|
||||
@findex end-of-buffer
|
||||
Likewise, if the variable @code{forms-forms-jump} is not @code{nil}
|
||||
(which it is, by default), Emacs functions @code{beginning-of-buffer}
|
||||
and @code{end-of-buffer} will perform @code{forms-first-record} and
|
||||
@code{forms-last-record} when in forms mode.
|
||||
@end ignore
|
||||
|
||||
The following function key definitions are set up in Forms mode
|
||||
(whether read-only or not):
|
||||
|
||||
@table @kbd
|
||||
@kindex next
|
||||
@item next
|
||||
forms-next-record
|
||||
|
||||
@kindex prior
|
||||
@item prior
|
||||
forms-prev-record
|
||||
|
||||
@kindex begin
|
||||
@item begin
|
||||
forms-first-record
|
||||
|
||||
@kindex end
|
||||
@item end
|
||||
forms-last-record
|
||||
|
||||
@kindex S-Tab
|
||||
@findex forms-prev-field
|
||||
@item S-Tab
|
||||
forms-prev-field
|
||||
@end table
|
||||
|
||||
@node Data File Format
|
||||
@chapter Data File Format
|
||||
|
||||
@cindex record
|
||||
@cindex field
|
||||
@vindex forms-field-sep
|
||||
Files for use with Forms mode are very simple---each @dfn{record}
|
||||
(usually one line) forms the contents of one form. Each record consists
|
||||
of a number of @dfn{fields}, which are separated by the value of the
|
||||
string @code{forms-field-sep}, which is @code{"\t"} (a Tab) by default.
|
||||
|
||||
@vindex forms-read-file-filter
|
||||
@vindex forms-write-file-filter
|
||||
If the format of the data file is not suitable enough you can define the
|
||||
filter functions @code{forms-read-file-filter} and
|
||||
@code{forms-write-file-filter}. @code{forms-read-file-filter} is called
|
||||
when the data file is read from disk into the data buffer. It operates
|
||||
on the data buffer, ignoring read-only protections. When the data file
|
||||
is saved to disk @code{forms-write-file-filter} is called to cancel the
|
||||
effects of @code{forms-read-file-filter}. After being saved,
|
||||
@code{forms-read-file-filter} is called again to prepare the data buffer
|
||||
for further processing.
|
||||
|
||||
@cindex pseudo-newline
|
||||
@vindex forms-multi-line
|
||||
Fields may contain text which shows up in the forms in multiple lines.
|
||||
These lines are separated in the field using a ``pseudo-newline''
|
||||
character which is defined by the value of the string
|
||||
@code{forms-multi-line}. Its default value is @code{"\^k"} (a Control-K
|
||||
character). If it is
|
||||
set to @code{nil}, multiple line fields are prohibited.
|
||||
|
||||
If the data file does not exist, it is automatically created.
|
||||
|
||||
@node Control File Format
|
||||
@chapter Control File Format
|
||||
|
||||
@cindex control file
|
||||
The Forms mode @dfn{control file} serves two purposes. First, it names
|
||||
the data file to use, and defines its format and properties. Second,
|
||||
the Emacs buffer it occupies is used by Forms mode to display the forms.
|
||||
|
||||
The contents of the control file are evaluated as a Lisp program. It
|
||||
should set the following Lisp variables to suitable values:
|
||||
|
||||
@table @code
|
||||
@vindex forms-file
|
||||
@item forms-file
|
||||
This variable specifies the name of the data file. Example:
|
||||
|
||||
@example
|
||||
(setq forms-file "my/data-file")
|
||||
@end example
|
||||
|
||||
If the control file doesn't set @code{forms-file}, Forms mode
|
||||
reports an error.
|
||||
|
||||
@vindex forms-format-list
|
||||
@item forms-format-list
|
||||
This variable describes the way the fields of the record are formatted on
|
||||
the screen. For details, see @ref{Format Description}.
|
||||
|
||||
@vindex forms-number-of-fields
|
||||
@item forms-number-of-fields
|
||||
This variable holds the number of fields in each record of the data
|
||||
file. Example:
|
||||
|
||||
@example
|
||||
(setq forms-number-of-fields 10)
|
||||
@end example
|
||||
@end table
|
||||
|
||||
If the control file does not set @code{forms-format-list} a default
|
||||
format is used. In this situation, Forms mode will deduce the number of
|
||||
fields from the data file providing this file exists and
|
||||
@code{forms-number-of-records} has not been set in the control file.
|
||||
|
||||
The control file can optionally set the following additional Forms mode
|
||||
variables. Most of them have default values that are good for most
|
||||
applications.
|
||||
|
||||
@table @code
|
||||
@vindex forms-field-sep
|
||||
@item forms-field-sep
|
||||
This variable may be used to designate the string which separates the
|
||||
fields in the records of the data file. If not set, it defaults to the
|
||||
string @code{"\t"} (a Tab character). Example:
|
||||
|
||||
@example
|
||||
(setq forms-field-sep "\t")
|
||||
@end example
|
||||
|
||||
@vindex forms-read-only
|
||||
@item forms-read-only
|
||||
If the value is non-@code{nil}, the data file is treated read-only. (Forms
|
||||
mode also treats the data file as read-only if you don't have access to
|
||||
write it.) Example:
|
||||
|
||||
@example
|
||||
(set forms-read-only t)
|
||||
@end example
|
||||
|
||||
@vindex forms-multi-line
|
||||
@item forms-multi-line
|
||||
This variable specifies the @dfn{pseudo newline} separator that allows
|
||||
multi-line fields. This separator goes between the ``lines'' within a
|
||||
field---thus, the field doesn't really contain multiple lines, but it
|
||||
appears that way when displayed in Forms mode. If the value is
|
||||
@code{nil}, multi-line text fields are prohibited. The pseudo newline
|
||||
must not be a character contained in @code{forms-field-sep}.
|
||||
|
||||
The default value is @code{"\^k"}, the character Control-K. Example:
|
||||
|
||||
@example
|
||||
(setq forms-multi-line "\^k")
|
||||
@end example
|
||||
|
||||
@ignore
|
||||
@vindex forms-forms-scroll
|
||||
@item forms-forms-scroll
|
||||
@xref{Forms Mode Commands}, for details.
|
||||
|
||||
@vindex forms-forms-jump
|
||||
@item forms-forms-jump
|
||||
@xref{Forms Mode Commands}, for details.
|
||||
@end ignore
|
||||
|
||||
@findex forms-read-file-filter
|
||||
@item forms-read-file-filter
|
||||
This variable holds the name of a function to be called after the data
|
||||
file has been read in. This can be used to transform the contents of the
|
||||
data file into a format more suitable for forms processing.
|
||||
If it is @code{nil}, no function is called. For example, to maintain a
|
||||
gzipped database:
|
||||
|
||||
@example
|
||||
(defun gzip-read-file-filter ()
|
||||
(shell-command-on-region (point-min) (point-max)
|
||||
"gzip -d" t t))
|
||||
(setq forms-read-file-filter 'gzip-read-file-filter)
|
||||
@end example
|
||||
|
||||
@findex forms-write-file-filter
|
||||
@item forms-write-file-filter
|
||||
This variable holds the name of a function to be called before writing
|
||||
out the contents of the data file.
|
||||
This can be used to undo the effects of @code{forms-read-file-filter}.
|
||||
If it is @code{nil}, no function is called. Example:
|
||||
|
||||
@example
|
||||
(defun gzip-write-file-filter ()
|
||||
(make-variable-buffer-local 'require-final-newline)
|
||||
(setq require-final-newline nil)
|
||||
(shell-command-on-region (point-min) (point-max)
|
||||
"gzip" t t))
|
||||
(setq forms-write-file-filter 'gzip-write-file-filter)
|
||||
@end example
|
||||
|
||||
@findex forms-new-record-filter
|
||||
@item forms-new-record-filter
|
||||
This variable holds a function to be called whenever a new record is created
|
||||
to supply default values for fields. If it is @code{nil}, no function is
|
||||
called.
|
||||
@xref{Modifying Forms Contents}, for details.
|
||||
|
||||
@findex forms-modified-record-filter
|
||||
@item forms-modified-record-filter
|
||||
This variable holds a function to be called whenever a record is
|
||||
modified, just before updating the Forms data file. If it is
|
||||
@code{nil}, no function is called.
|
||||
@xref{Modifying Forms Contents}, for details.
|
||||
|
||||
@findex forms-insert-after
|
||||
@item forms-insert-after
|
||||
If this variable is not @code{nil}, new records are created @emph{after} the
|
||||
current record. Also, upon visiting a file, the initial position will be
|
||||
at the last record instead of the first one.
|
||||
|
||||
@findex forms-check-number-of-fields
|
||||
@item forms-check-number-of-fields
|
||||
Normally each record is checked to contain the correct number of fields.
|
||||
Under certain circumstances, this can be undesirable.
|
||||
If this variable is set to @code{nil}, these checks will be bypassed.
|
||||
@end table
|
||||
|
||||
@node Format Description
|
||||
@chapter The Format Description
|
||||
|
||||
@vindex forms-format-list
|
||||
The variable @code{forms-format-list} specifies the format of the data
|
||||
in the data file, and how to convert the data for display in Forms mode.
|
||||
Its value must be a list of Forms mode @dfn{formatting elements}, each
|
||||
of which can be a string, a number, a Lisp list, or a Lisp symbol that
|
||||
evaluates to one of those. The formatting elements are processed in the
|
||||
order they appear in the list.
|
||||
|
||||
@table @var
|
||||
@item string
|
||||
A string formatting element is inserted in the forms ``as is,'' as text
|
||||
that the user cannot alter.
|
||||
|
||||
@item number
|
||||
A number element selects a field of the record. The contents of this
|
||||
field are inserted in the display at this point. Field numbers count
|
||||
starting from 1 (one).
|
||||
|
||||
@item list
|
||||
A formatting element that is a list specifies a function call. This
|
||||
function is called every time a record is displayed, and its result,
|
||||
which must be a string, is inserted in the display text. The function
|
||||
should do nothing but returning a string.
|
||||
|
||||
@vindex forms-fields
|
||||
The function you call can access the fields of the record as a list in
|
||||
the variable
|
||||
@code{forms-fields}.
|
||||
|
||||
@item symbol
|
||||
A symbol used as a formatting element should evaluate to a string, number,
|
||||
or list; the value is interpreted as a formatting element, as described
|
||||
above.
|
||||
@end table
|
||||
|
||||
If a record does not contain the number of fields as specified in
|
||||
@code{forms-number-of-fields}, a warning message will be printed. Excess
|
||||
fields are ignored, missing fields are set to empty.
|
||||
|
||||
The control file which displays @file{/etc/passwd} file as demonstrated
|
||||
in the beginning of this manual might look as follows:
|
||||
|
||||
@example
|
||||
;; @r{This demo visits @file{/etc/passwd}.}
|
||||
|
||||
(setq forms-file "/etc/passwd")
|
||||
(setq forms-number-of-fields 7)
|
||||
(setq forms-read-only t) ; @r{to make sure}
|
||||
(setq forms-field-sep ":")
|
||||
;; @r{Don't allow multi-line fields.}
|
||||
(setq forms-multi-line nil)
|
||||
|
||||
(setq forms-format-list
|
||||
(list
|
||||
"====== /etc/passwd ======\n\n"
|
||||
"User : " 1
|
||||
" Uid: " 3
|
||||
" Gid: " 4
|
||||
"\n\n"
|
||||
"Name : " 5
|
||||
"\n\n"
|
||||
"Home : " 6
|
||||
"\n\n"
|
||||
"Shell: " 7
|
||||
"\n"))
|
||||
@end example
|
||||
|
||||
When you construct the value of @code{forms-format-list}, you should
|
||||
usually either quote the whole value, like this,
|
||||
|
||||
@example
|
||||
(setq forms-format-list
|
||||
'(
|
||||
"====== " forms-file " ======\n\n"
|
||||
"User : " 1
|
||||
(make-string 20 ?-)
|
||||
@dots{}
|
||||
))
|
||||
@end example
|
||||
|
||||
@noindent
|
||||
or quote the elements which are lists, like this:
|
||||
|
||||
@example
|
||||
(setq forms-format-list
|
||||
(list
|
||||
"====== " forms-file " ======\n\n"
|
||||
"User : " 1
|
||||
'(make-string 20 ?-)
|
||||
@dots{}
|
||||
))
|
||||
@end example
|
||||
|
||||
Forms mode validates the contents of @code{forms-format-list} when you
|
||||
visit a database. If there are errors, processing is aborted with an
|
||||
error message which includes a descriptive text. @xref{Error Messages},
|
||||
for a detailed list of error messages.
|
||||
|
||||
If no @code{forms-format-list} is specified, Forms mode will supply a
|
||||
default format list. This list contains the name of the file being
|
||||
visited, and a simple label for each field indicating the field number.
|
||||
|
||||
@node Modifying Forms Contents
|
||||
@chapter Modifying The Forms Contents
|
||||
|
||||
If @code{forms-read-only} is @code{nil}, the user can modify the fields
|
||||
and records of the database.
|
||||
|
||||
All normal editing commands are available for editing the contents of the
|
||||
displayed record. You cannot delete or modify the fixed, explanatory
|
||||
text that comes from string formatting elements, but you can modify the
|
||||
actual field contents.
|
||||
|
||||
@ignore
|
||||
@c This is for the Emacs 18 version only.
|
||||
If the contents of the forms cannot be recognized properly, this is
|
||||
signaled using a descriptive text. @xref{Error Messages}, for more info.
|
||||
The cursor will indicate the last part of the forms which was
|
||||
successfully parsed. It's important to avoid entering field contents
|
||||
that would cause confusion with the field-separating fixed text.
|
||||
@end ignore
|
||||
|
||||
If the variable @code{forms-modified-record-filter} is non-@code{nil},
|
||||
it is called as a function before the new data is written to the data
|
||||
file. The function receives one argument, a vector that contains the
|
||||
contents of the fields of the record.
|
||||
|
||||
The function can refer to fields with @code{aref} and modify them with
|
||||
@code{aset}. The first field has number 1 (one); thus, element 0 of the
|
||||
vector is not used. The function should return the same vector it was
|
||||
passed; the (possibly modified) contents of the vector determine what is
|
||||
actually written in the file. Here is an example:
|
||||
|
||||
@example
|
||||
(defun my-modified-record-filter (record)
|
||||
;; @r{Modify second field.}
|
||||
(aset record 2 (current-time-string))
|
||||
;; @r{Return the field vector.}
|
||||
record)
|
||||
|
||||
(setq forms-modified-record-filter 'my-modified-record-filter)
|
||||
@end example
|
||||
|
||||
If the variable @code{forms-new-record-filter} is non-@code{nil}, its
|
||||
value is a function to be called to fill in default values for the
|
||||
fields of a new record. The function is passed a vector of empty
|
||||
strings, one for each field; it should return the same vector, with
|
||||
the desired field values stored in it. Fields are numbered starting
|
||||
from 1 (one). Example:
|
||||
|
||||
@example
|
||||
(defun my-new-record-filter (fields)
|
||||
(aset fields 5 (login-name))
|
||||
(aset fields 1 (current-time-string))
|
||||
fields)
|
||||
|
||||
(setq forms-new-record-filter 'my-new-record-filter)
|
||||
@end example
|
||||
|
||||
@node Miscellaneous
|
||||
@chapter Miscellaneous
|
||||
|
||||
@vindex forms-version
|
||||
The global variable @code{forms-version} holds the version information
|
||||
of the Forms mode software.
|
||||
|
||||
@findex forms-enumerate
|
||||
It is very convenient to use symbolic names for the fields in a record.
|
||||
The function @code{forms-enumerate} provides an elegant means to define
|
||||
a series of variables whose values are consecutive integers. The
|
||||
function returns the highest number used, so it can be used to set
|
||||
@code{forms-number-of-fields} also. For example:
|
||||
|
||||
@example
|
||||
(setq forms-number-of-fields
|
||||
(forms-enumerate
|
||||
'(field1 field2 field3 @dots{})))
|
||||
@end example
|
||||
|
||||
This sets @code{field1} to 1, @code{field2} to 2, and so on.
|
||||
|
||||
Care has been taken to keep the Forms mode variables buffer-local, so it
|
||||
is possible to visit multiple files in Forms mode simultaneously, even
|
||||
if they have different properties.
|
||||
|
||||
@findex forms-mode
|
||||
If you have visited the control file in normal fashion with
|
||||
@code{find-file} or a like command, you can switch to Forms mode with
|
||||
the command @code{M-x forms-mode}. If you put @samp{-*- forms -*-} in
|
||||
the first line of the control file, then visiting it enables Forms mode
|
||||
automatically. But this makes it hard to edit the control file itself,
|
||||
so you'd better think twice before using this.
|
||||
|
||||
The default format for the data file, using @code{"\t"} to separate
|
||||
fields and @code{"\^k"} to separate lines within a field, matches the
|
||||
file format of some popular database programs, e.g. FileMaker. So
|
||||
@code{forms-mode} can decrease the need to use proprietary software.
|
||||
|
||||
@node Error Messages
|
||||
@chapter Error Messages
|
||||
|
||||
This section describes all error messages which can be generated by
|
||||
forms mode. Error messages that result from parsing the control file
|
||||
all start with the text @samp{Forms control file error}. Messages
|
||||
generated while analyzing the definition of @code{forms-format-list}
|
||||
start with @samp{Forms format error}.
|
||||
|
||||
@table @code
|
||||
@item Forms control file error: `forms-file' has not been set
|
||||
The variable @code{forms-file} was not set by the control file.
|
||||
|
||||
@item Forms control file error: `forms-number-of-fields' has not been set
|
||||
The variable @code{forms-number-of-fields} was not set by the control
|
||||
file.
|
||||
|
||||
@item Forms control file error: `forms-number-of-fields' must be a number > 0
|
||||
The variable @code{forms-number-of-fields} did not contain a positive
|
||||
number.
|
||||
|
||||
@item Forms control file error: `forms-field-sep' is not a string
|
||||
@itemx Forms control file error: `forms-multi-line' must be nil or a one-character string
|
||||
The variable @code{forms-multi-line} was set to something other than
|
||||
@code{nil} or a single-character string.
|
||||
|
||||
@item Forms control file error: `forms-multi-line' is equal to 'forms-field-sep'
|
||||
The variable @code{forms-multi-line} may not be equal to
|
||||
@code{forms-field-sep} for this would make it impossible to distinguish
|
||||
fields and the lines in the fields.
|
||||
|
||||
@item Forms control file error: `forms-new-record-filter' is not a function
|
||||
@itemx Forms control file error: `forms-modified-record-filter' is not a function
|
||||
The variable has been set to something else than a function.
|
||||
|
||||
@item Forms control file error: `forms-format-list' is not a list
|
||||
The variable @code{forms-format-list} was not set to a Lisp list
|
||||
by the control file.
|
||||
|
||||
@item Forms format error: field number @var{xx} out of range 1..@var{nn}
|
||||
A field number was supplied in @code{forms-format-list} with a value of
|
||||
@var{xx}, which was not greater than zero and smaller than or equal to
|
||||
the number of fields in the forms, @var{nn}.
|
||||
|
||||
@item Forms format error: @var{fun} is not a function
|
||||
The first element of a list which is an element of
|
||||
@code{forms-format-list} was not a valid Lisp function.
|
||||
|
||||
@item Forms format error: invalid element @var{xx}
|
||||
A list element was supplied in @code{forms-format-list} which was not a
|
||||
string, number or list.
|
||||
|
||||
@ignore
|
||||
@c This applies to Emacs 18 only.
|
||||
@c Error messages generated while a modified form is being analyzed.
|
||||
|
||||
@item Parse error: not looking at `...'
|
||||
When re-parsing the contents of a forms, the text shown could not
|
||||
be found.
|
||||
|
||||
@item Parse error: cannot find `...'
|
||||
When re-parsing the contents of a forms, the text shown, which
|
||||
separates two fields, could not be found.
|
||||
|
||||
@item Parse error: cannot parse adjacent fields @var{xx} and @var{yy}
|
||||
Fields @var{xx} and @var{yy} were not separated by text, so could not be
|
||||
parsed again.
|
||||
@end ignore
|
||||
|
||||
@item Warning: this record has @var{xx} fields instead of @var{yy}
|
||||
The number of fields in this record in the data file did not match
|
||||
@code{forms-number-of-fields}. Missing fields will be made empty.
|
||||
|
||||
@item Multi-line fields in this record - update refused!
|
||||
The current record contains newline characters, hence can not be written
|
||||
back to the data file, for it would corrupt it. Probably you inserted a
|
||||
newline in a field, while @code{forms-multi-line} was @code{nil}.
|
||||
|
||||
@item Field separator occurs in record - update refused!
|
||||
The current record contains the field separator string inside one of the
|
||||
fields. It can not be written back to the data file, for it would
|
||||
corrupt it. Probably you inserted the field separator string in a field.
|
||||
|
||||
@item Record number @var{xx} out of range 1..@var{yy}
|
||||
A jump was made to non-existing record @var{xx}. @var{yy} denotes the
|
||||
number of records in the file.
|
||||
|
||||
@item Stuck at record @var{xx}
|
||||
An internal error prevented a specific record from being retrieved.
|
||||
|
||||
@item No write access to @code{"}@var{file}@code{"}
|
||||
An attempt was made to enable edit mode on a file that has been write
|
||||
protected.
|
||||
|
||||
@item Search failed: @var{regexp}
|
||||
The @var{regexp} could not be found in the data file. Forward searching
|
||||
is done from the current location until the end of the file, then
|
||||
retrying from the beginning of the file until the current location.
|
||||
Backward searching is done from the current location until the beginning
|
||||
of the file, then retrying from the end of the file until the current
|
||||
location.
|
||||
|
||||
@item Wrapped
|
||||
A search completed successfully after wrapping around.
|
||||
|
||||
@item Warning: number of records changed to @var{nn}
|
||||
Forms mode's idea of the number of records has been adjusted to the
|
||||
number of records actually present in the data file.
|
||||
|
||||
@item Problem saving buffers?
|
||||
An error occurred while saving the data file buffer. Most likely, Emacs
|
||||
did ask to confirm deleting the buffer because it had been modified, and
|
||||
you said `no'.
|
||||
@end table
|
||||
|
||||
@node Long Example
|
||||
@chapter Long Example
|
||||
|
||||
The following example exploits most of the features of Forms mode.
|
||||
This example is included in the distribution as file @file{forms-d2.el}.
|
||||
|
||||
@example
|
||||
;; demo2 -- demo forms-mode -*- emacs-lisp -*-
|
||||
|
||||
;; @r{This sample forms exploit most of the features of forms mode.}
|
||||
|
||||
;; @r{Set the name of the data file.}
|
||||
(setq forms-file "forms-d2.dat")
|
||||
|
||||
;; @r{Use @code{forms-enumerate} to set field names and number thereof.}
|
||||
(setq forms-number-of-fields
|
||||
(forms-enumerate
|
||||
'(arch-newsgroup ; 1
|
||||
arch-volume ; 2
|
||||
arch-issue ; and ...
|
||||
arch-article ; ... so
|
||||
arch-shortname ; ... ... on
|
||||
arch-parts
|
||||
arch-from
|
||||
arch-longname
|
||||
arch-keywords
|
||||
arch-date
|
||||
arch-remarks)))
|
||||
|
||||
;; @r{The following functions are used by this form for layout purposes.}
|
||||
;;
|
||||
(defun arch-tocol (target &optional fill)
|
||||
"Produces a string to skip to column TARGET.
|
||||
Prepends newline if needed.
|
||||
The optional FILL should be a character, used to fill to the column."
|
||||
(if (null fill)
|
||||
(setq fill ? ))
|
||||
(if (< target (current-column))
|
||||
(concat "\n" (make-string target fill))
|
||||
(make-string (- target (current-column)) fill)))
|
||||
;;
|
||||
(defun arch-rj (target field &optional fill)
|
||||
"Produces a string to skip to column TARGET\
|
||||
minus the width of field FIELD.
|
||||
Prepends newline if needed.
|
||||
The optional FILL should be a character,
|
||||
used to fill to the column."
|
||||
(arch-tocol (- target (length (nth field forms-fields))) fill))
|
||||
|
||||
;; @r{Record filters.}
|
||||
;;
|
||||
(defun new-record-filter (the-record)
|
||||
"Form a new record with some defaults."
|
||||
(aset the-record arch-from (user-full-name))
|
||||
(aset the-record arch-date (current-time-string))
|
||||
the-record) ; return it
|
||||
(setq forms-new-record-filter 'new-record-filter)
|
||||
|
||||
;; @r{The format list.}
|
||||
(setq forms-format-list
|
||||
(list
|
||||
"====== Public Domain Software Archive ======\n\n"
|
||||
arch-shortname
|
||||
" - " arch-longname
|
||||
"\n\n"
|
||||
"Article: " arch-newsgroup
|
||||
"/" arch-article
|
||||
" "
|
||||
'(arch-tocol 40)
|
||||
"Issue: " arch-issue
|
||||
" "
|
||||
'(arch-rj 73 10)
|
||||
"Date: " arch-date
|
||||
"\n\n"
|
||||
"Submitted by: " arch-from
|
||||
"\n"
|
||||
'(arch-tocol 79 ?-)
|
||||
"\n"
|
||||
"Keywords: " arch-keywords
|
||||
"\n\n"
|
||||
"Parts: " arch-parts
|
||||
"\n\n====== Remarks ======\n\n"
|
||||
arch-remarks
|
||||
))
|
||||
|
||||
;; @r{That's all, folks!}
|
||||
@end example
|
||||
|
||||
@node Credits
|
||||
@chapter Credits
|
||||
|
||||
Bug fixes and other useful suggestions were supplied by
|
||||
Harald Hanche-Olsen (@code{hanche@@imf.unit.no}),
|
||||
@code{cwitty@@portia.stanford.edu},
|
||||
Jonathan I. Kamens,
|
||||
Per Cederqvist (@code{ceder@@signum.se}),
|
||||
Michael Lipka (@code{lipka@@lip.hanse.de}),
|
||||
Andy Piper (@code{ajp@@eng.cam.ac.uk}),
|
||||
Frederic Pierresteguy (@code{F.Pierresteguy@@frcl.bull.fr}),
|
||||
Ignatios Souvatzis
|
||||
and Richard Stallman (@code{rms@@gnu.org}).
|
||||
|
||||
This documentation was slightly inspired by the documentation of ``rolo
|
||||
mode'' by Paul Davis at Schlumberger Cambridge Research
|
||||
(@code{davis%scrsu1%sdr.slb.com@@relay.cs.net}).
|
||||
|
||||
None of this would have been possible without GNU Emacs of the Free
|
||||
Software Foundation. Thanks, Richard!
|
||||
|
||||
@node GNU Free Documentation License
|
||||
@appendix GNU Free Documentation License
|
||||
@include doclicense.texi
|
||||
|
||||
@node Index
|
||||
@unnumbered Index
|
||||
@printindex cp
|
||||
|
||||
@contents
|
||||
@bye
|
||||
|
||||
@ignore
|
||||
arch-tag: 2ac9810b-aa49-4ea6-8030-d7f1ecd467ed
|
||||
@end ignore
|
29544
doc/misc/gnus.texi
Normal file
29544
doc/misc/gnus.texi
Normal file
File diff suppressed because it is too large
Load diff
721
doc/misc/gpl.texi
Normal file
721
doc/misc/gpl.texi
Normal file
|
@ -0,0 +1,721 @@
|
|||
@c The GNU General Public License.
|
||||
@center Version 3, 29 June 2007
|
||||
|
||||
@c This file is intended to be included within another document,
|
||||
@c hence no sectioning command or @node.
|
||||
|
||||
@display
|
||||
Copyright @copyright{} 2007 Free Software Foundation, Inc. @url{http://fsf.org/}
|
||||
|
||||
Everyone is permitted to copy and distribute verbatim copies of this
|
||||
license document, but changing it is not allowed.
|
||||
@end display
|
||||
|
||||
@heading Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom
|
||||
to share and change all versions of a program---to make sure it remains
|
||||
free software for all its users. We, the Free Software Foundation,
|
||||
use the GNU General Public License for most of our software; it
|
||||
applies also to any other work released this way by its authors. You
|
||||
can apply it to your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you
|
||||
have certain responsibilities if you distribute copies of the
|
||||
software, or if you modify it: responsibilities to respect the freedom
|
||||
of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too,
|
||||
receive or can get the source code. And you must show them these
|
||||
terms so they know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the
|
||||
manufacturer can do so. This is fundamentally incompatible with the
|
||||
aim of protecting users' freedom to change the software. The
|
||||
systematic pattern of such abuse occurs in the area of products for
|
||||
individuals to use, which is precisely where it is most unacceptable.
|
||||
Therefore, we have designed this version of the GPL to prohibit the
|
||||
practice for those products. If such problems arise substantially in
|
||||
other domains, we stand ready to extend this provision to those
|
||||
domains in future versions of the GPL, as needed to protect the
|
||||
freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish
|
||||
to avoid the special danger that patents applied to a free program
|
||||
could make it effectively proprietary. To prevent this, the GPL
|
||||
assures that patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
@heading TERMS AND CONDITIONS
|
||||
|
||||
@enumerate 0
|
||||
@item Definitions.
|
||||
|
||||
``This License'' refers to version 3 of the GNU General Public License.
|
||||
|
||||
``Copyright'' also means copyright-like laws that apply to other kinds
|
||||
of works, such as semiconductor masks.
|
||||
|
||||
``The Program'' refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as ``you''. ``Licensees'' and
|
||||
``recipients'' may be individuals or organizations.
|
||||
|
||||
To ``modify'' a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of
|
||||
an exact copy. The resulting work is called a ``modified version'' of
|
||||
the earlier work or a work ``based on'' the earlier work.
|
||||
|
||||
A ``covered work'' means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To ``propagate'' a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To ``convey'' a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user
|
||||
through a computer network, with no transfer of a copy, is not
|
||||
conveying.
|
||||
|
||||
An interactive user interface displays ``Appropriate Legal Notices'' to
|
||||
the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
@item Source Code.
|
||||
|
||||
The ``source code'' for a work means the preferred form of the work for
|
||||
making modifications to it. ``Object code'' means any non-source form
|
||||
of a work.
|
||||
|
||||
A ``Standard Interface'' means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The ``System Libraries'' of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
``Major Component'', in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The ``Corresponding Source'' for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users can
|
||||
regenerate automatically from other parts of the Corresponding Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that same
|
||||
work.
|
||||
|
||||
@item Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not convey,
|
||||
without conditions so long as your license otherwise remains in force.
|
||||
You may convey covered works to others for the sole purpose of having
|
||||
them make modifications exclusively for you, or provide you with
|
||||
facilities for running those works, provided that you comply with the
|
||||
terms of this License in conveying all material for which you do not
|
||||
control copyright. Those thus making or running the covered works for
|
||||
you must do so exclusively on your behalf, under your direction and
|
||||
control, on terms that prohibit them from making any copies of your
|
||||
copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under the
|
||||
conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
@item Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such
|
||||
circumvention is effected by exercising rights under this License with
|
||||
respect to the covered work, and you disclaim any intention to limit
|
||||
operation or modification of the work as a means of enforcing, against
|
||||
the work's users, your or third parties' legal rights to forbid
|
||||
circumvention of technological measures.
|
||||
|
||||
@item Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
@item Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these
|
||||
conditions:
|
||||
|
||||
@enumerate a
|
||||
@item
|
||||
The work must carry prominent notices stating that you modified it,
|
||||
and giving a relevant date.
|
||||
|
||||
@item
|
||||
The work must carry prominent notices stating that it is released
|
||||
under this License and any conditions added under section 7. This
|
||||
requirement modifies the requirement in section 4 to ``keep intact all
|
||||
notices''.
|
||||
|
||||
@item
|
||||
You must license the entire work, as a whole, under this License to
|
||||
anyone who comes into possession of a copy. This License will
|
||||
therefore apply, along with any applicable section 7 additional terms,
|
||||
to the whole of the work, and all its parts, regardless of how they
|
||||
are packaged. This License gives no permission to license the work in
|
||||
any other way, but it does not invalidate such permission if you have
|
||||
separately received it.
|
||||
|
||||
@item
|
||||
If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your work
|
||||
need not make them do so.
|
||||
@end enumerate
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
``aggregate'' if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
@item Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms of
|
||||
sections 4 and 5, provided that you also convey the machine-readable
|
||||
Corresponding Source under the terms of this License, in one of these
|
||||
ways:
|
||||
|
||||
@enumerate a
|
||||
@item
|
||||
Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium customarily
|
||||
used for software interchange.
|
||||
|
||||
@item
|
||||
Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a written
|
||||
offer, valid for at least three years and valid for as long as you
|
||||
offer spare parts or customer support for that product model, to give
|
||||
anyone who possesses the object code either (1) a copy of the
|
||||
Corresponding Source for all the software in the product that is
|
||||
covered by this License, on a durable physical medium customarily used
|
||||
for software interchange, for a price no more than your reasonable
|
||||
cost of physically performing this conveying of source, or (2) access
|
||||
to copy the Corresponding Source from a network server at no charge.
|
||||
|
||||
@item
|
||||
Convey individual copies of the object code with a copy of the written
|
||||
offer to provide the Corresponding Source. This alternative is
|
||||
allowed only occasionally and noncommercially, and only if you
|
||||
received the object code with such an offer, in accord with subsection
|
||||
6b.
|
||||
|
||||
@item
|
||||
Convey the object code by offering access from a designated place
|
||||
(gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to copy
|
||||
the object code is a network server, the Corresponding Source may be
|
||||
on a different server (operated by you or a third party) that supports
|
||||
equivalent copying facilities, provided you maintain clear directions
|
||||
next to the object code saying where to find the Corresponding Source.
|
||||
Regardless of what server hosts the Corresponding Source, you remain
|
||||
obligated to ensure that it is available for as long as needed to
|
||||
satisfy these requirements.
|
||||
|
||||
@item
|
||||
Convey the object code using peer-to-peer transmission, provided you
|
||||
inform other peers where the object code and Corresponding Source of
|
||||
the work are being offered to the general public at no charge under
|
||||
subsection 6d.
|
||||
|
||||
@end enumerate
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A ``User Product'' is either (1) a ``consumer product'', which means any
|
||||
tangible personal property which is normally used for personal,
|
||||
family, or household purposes, or (2) anything designed or sold for
|
||||
incorporation into a dwelling. In determining whether a product is a
|
||||
consumer product, doubtful cases shall be resolved in favor of
|
||||
coverage. For a particular product received by a particular user,
|
||||
``normally used'' refers to a typical or common use of that class of
|
||||
product, regardless of the status of the particular user or of the way
|
||||
in which the particular user actually uses, or expects or is expected
|
||||
to use, the product. A product is a consumer product regardless of
|
||||
whether the product has substantial commercial, industrial or
|
||||
non-consumer uses, unless such uses represent the only significant
|
||||
mode of use of the product.
|
||||
|
||||
``Installation Information'' for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to
|
||||
install and execute modified versions of a covered work in that User
|
||||
Product from a modified version of its Corresponding Source. The
|
||||
information must suffice to ensure that the continued functioning of
|
||||
the modified object code is in no case prevented or interfered with
|
||||
solely because modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or
|
||||
updates for a work that has been modified or installed by the
|
||||
recipient, or for the User Product in which it has been modified or
|
||||
installed. Access to a network may be denied when the modification
|
||||
itself materially and adversely affects the operation of the network
|
||||
or violates the rules and protocols for communication across the
|
||||
network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
@item Additional Terms.
|
||||
|
||||
``Additional permissions'' are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders
|
||||
of that material) supplement the terms of this License with terms:
|
||||
|
||||
@enumerate a
|
||||
@item
|
||||
Disclaiming warranty or limiting liability differently from the terms
|
||||
of sections 15 and 16 of this License; or
|
||||
|
||||
@item
|
||||
Requiring preservation of specified reasonable legal notices or author
|
||||
attributions in that material or in the Appropriate Legal Notices
|
||||
displayed by works containing it; or
|
||||
|
||||
@item
|
||||
Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
@item
|
||||
Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
@item
|
||||
Declining to grant rights under trademark law for use of some trade
|
||||
names, trademarks, or service marks; or
|
||||
|
||||
@item
|
||||
Requiring indemnification of licensors and authors of that material by
|
||||
anyone who conveys the material (or modified versions of it) with
|
||||
contractual assumptions of liability to the recipient, for any
|
||||
liability that these contractual assumptions directly impose on those
|
||||
licensors and authors.
|
||||
@end enumerate
|
||||
|
||||
All other non-permissive additional terms are considered ``further
|
||||
restrictions'' within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions; the
|
||||
above requirements apply either way.
|
||||
|
||||
@item Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your license
|
||||
from a particular copyright holder is reinstated (a) provisionally,
|
||||
unless and until the copyright holder explicitly and finally
|
||||
terminates your license, and (b) permanently, if the copyright holder
|
||||
fails to notify you of the violation by some reasonable means prior to
|
||||
60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
@item Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or run
|
||||
a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
@item Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An ``entity transaction'' is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
@item Patents.
|
||||
|
||||
A ``contributor'' is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's ``contributor version''.
|
||||
|
||||
A contributor's ``essential patent claims'' are all patent claims owned
|
||||
or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, ``control'' includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a ``patent license'' is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To ``grant'' such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. ``Knowingly relying'' means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is ``discriminatory'' if it does not include within the
|
||||
scope of its coverage, prohibits the exercise of, or is conditioned on
|
||||
the non-exercise of one or more of the rights that are specifically
|
||||
granted under this License. You may not convey a covered work if you
|
||||
are a party to an arrangement with a third party that is in the
|
||||
business of distributing software, under which you make payment to the
|
||||
third party based on the extent of your activity of conveying the
|
||||
work, and under which the third party grants, to any of the parties
|
||||
who would receive the covered work from you, a discriminatory patent
|
||||
license (a) in connection with copies of the covered work conveyed by
|
||||
you (or copies made from those copies), or (b) primarily for and in
|
||||
connection with specific products or compilations that contain the
|
||||
covered work, unless you entered into that arrangement, or that patent
|
||||
license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
@item No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey
|
||||
a covered work so as to satisfy simultaneously your obligations under
|
||||
this License and any other pertinent obligations, then as a
|
||||
consequence you may not convey it at all. For example, if you agree
|
||||
to terms that obligate you to collect a royalty for further conveying
|
||||
from those to whom you convey the Program, the only way you could
|
||||
satisfy both those terms and this License would be to refrain entirely
|
||||
from conveying the Program.
|
||||
|
||||
@item Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
@item Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions
|
||||
of the GNU General Public License from time to time. Such new
|
||||
versions will be similar in spirit to the present version, but may
|
||||
differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies that a certain numbered version of the GNU General Public
|
||||
License ``or any later version'' applies to it, you have the option of
|
||||
following the terms and conditions either of that numbered version or
|
||||
of any later version published by the Free Software Foundation. If
|
||||
the Program does not specify a version number of the GNU General
|
||||
Public License, you may choose any version ever published by the Free
|
||||
Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future versions
|
||||
of the GNU General Public License can be used, that proxy's public
|
||||
statement of acceptance of a version permanently authorizes you to
|
||||
choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
@item Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM ``AS IS'' WITHOUT
|
||||
WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND
|
||||
PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE
|
||||
DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR
|
||||
CORRECTION.
|
||||
|
||||
@item Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR
|
||||
CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES
|
||||
ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT
|
||||
NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR
|
||||
LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM
|
||||
TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER
|
||||
PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
@item Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
@end enumerate
|
||||
|
||||
@heading END OF TERMS AND CONDITIONS
|
||||
|
||||
@heading How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these
|
||||
terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the ``copyright'' line and a pointer to where the full notice is found.
|
||||
|
||||
@smallexample
|
||||
@var{one line to give the program's name and a brief idea of what it does.}
|
||||
Copyright (C) @var{year} @var{name of author}
|
||||
|
||||
This program 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 of the License, or (at
|
||||
your option) any later version.
|
||||
|
||||
This program 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 this program. If not, see @url{http://www.gnu.org/licenses/}.
|
||||
@end smallexample
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
@smallexample
|
||||
@var{program} Copyright (C) @var{year} @var{name of author}
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type @samp{show w}.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type @samp{show c} for details.
|
||||
@end smallexample
|
||||
|
||||
The hypothetical commands @samp{show w} and @samp{show c} should show
|
||||
the appropriate parts of the General Public License. Of course, your
|
||||
program's commands might be different; for a GUI interface, you would
|
||||
use an ``about box''.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a ``copyright disclaimer'' for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
@url{http://www.gnu.org/licenses/}.
|
||||
|
||||
The GNU General Public License does not permit incorporating your
|
||||
program into proprietary programs. If your program is a subroutine
|
||||
library, you may consider it more useful to permit linking proprietary
|
||||
applications with the library. If this is what you want to do, use
|
||||
the GNU Lesser General Public License instead of this License. But
|
||||
first, please read @url{http://www.gnu.org/philosophy/why-not-lgpl.html}.
|
||||
|
||||
@ignore
|
||||
arch-tag: 0c4a2556-f87e-464f-9b1d-efd920fcaf67
|
||||
@end ignore
|
|
@ -1,6 +1,6 @@
|
|||
\input texinfo @c -*-texinfo-*-
|
||||
@c %**start of header
|
||||
@setfilename ../info/idlwave
|
||||
@setfilename ../../info/idlwave
|
||||
@settitle IDLWAVE User Manual
|
||||
@dircategory Emacs
|
||||
@direntry
|
|
@ -869,6 +869,13 @@ which the header says is the @samp{Previous} node (from this node, the
|
|||
to revisit nodes in the history list in the forward direction, so that
|
||||
@kbd{r} will return you to the node you came from by typing @kbd{l}.
|
||||
|
||||
@kindex L @r{(Info mode)}
|
||||
@findex Info-history
|
||||
@cindex history list of visited nodes
|
||||
The @kbd{L} command (@code{Info-history} in Emacs) creates a virtual
|
||||
node that contains a list of all nodes you visited. You can select
|
||||
a previously visited node from this menu to revisit it.
|
||||
|
||||
@kindex d @r{(Info mode)}
|
||||
@findex Info-directory
|
||||
@cindex go to Directory node
|
|
@ -1,4 +1,4 @@
|
|||
#### -*- Makefile -*- for the Emacs Manual and other documentation.
|
||||
#### -*- Makefile -*- for documentation other than the Emacs manual.
|
||||
|
||||
# Copyright (C) 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
|
@ -25,12 +25,12 @@
|
|||
# set by the configure script's `--srcdir' option.
|
||||
srcdir=.
|
||||
|
||||
infodir = $(srcdir)/../info
|
||||
infodir = $(srcdir)/../../info
|
||||
|
||||
# The makeinfo program is part of the Texinfo distribution.
|
||||
MAKEINFO = makeinfo --force
|
||||
MULTI_INSTALL_INFO = $(srcdir)\..\nt\multi-install-info.bat
|
||||
INFO_TARGETS = $(infodir)/emacs $(infodir)/ccmode \
|
||||
MULTI_INSTALL_INFO = $(srcdir)\..\..\nt\multi-install-info.bat
|
||||
INFO_TARGETS = $(infodir)/ccmode \
|
||||
$(infodir)/cl $(infodir)/dired-x $(infodir)/ediff \
|
||||
$(infodir)/forms $(infodir)/gnus $(infodir)/message \
|
||||
$(infodir)/sieve $(infodir)/pgg $(infodir)/emacs-mime \
|
||||
|
@ -43,14 +43,14 @@ INFO_TARGETS = $(infodir)/emacs $(infodir)/ccmode \
|
|||
$(infodir)/url $(infodir)/speedbar $(infodir)/tramp \
|
||||
$(infodir)/ses $(infodir)/smtpmail $(infodir)/flymake \
|
||||
$(infodir)/newsticker $(infodir)/rcirc $(infodir)/erc
|
||||
DVI_TARGETS = emacs.dvi calc.dvi cc-mode.dvi cl.dvi dired-x.dvi \
|
||||
DVI_TARGETS = calc.dvi cc-mode.dvi cl.dvi dired-x.dvi \
|
||||
ediff.dvi forms.dvi gnus.dvi message.dvi emacs-mime.dvi \
|
||||
gnus.dvi message.dvi sieve.dvi pgg.dvi mh-e.dvi \
|
||||
reftex.dvi sc.dvi vip.dvi viper.dvi widget.dvi faq.dvi \
|
||||
ada-mode.dvi autotype.dvi idlwave.dvi eudc.dvi ebrowse.dvi \
|
||||
pcl-cvs.dvi woman.dvi eshell.dvi org.dvi url.dvi \
|
||||
speedbar.dvi tramp.dvi ses.dvi smtpmail.dvi flymake.dvi \
|
||||
newsticker.dvi emacs-xtra.dvi rcirc.dvi erc.dvi
|
||||
newsticker.dvi rcirc.dvi erc.dvi
|
||||
INFOSOURCES = info.texi
|
||||
|
||||
# The following rule does not work with all versions of `make'.
|
||||
|
@ -59,66 +59,9 @@ INFOSOURCES = info.texi
|
|||
texi2dvi $<
|
||||
|
||||
TEXI2DVI = texi2dvi
|
||||
ENVADD = $(srcdir)\..\nt\envadd.bat "TEXINPUTS=$(srcdir);$(TEXINPUTS)" \
|
||||
ENVADD = $(srcdir)\..\..\nt\envadd.bat "TEXINPUTS=$(srcdir);$(TEXINPUTS)" \
|
||||
"MAKEINFO=$(MAKEINFO) -I$(srcdir)" /C
|
||||
|
||||
EMACS_XTRA=\
|
||||
$(srcdir)/arevert-xtra.texi \
|
||||
$(srcdir)/cal-xtra.texi \
|
||||
$(srcdir)/dired-xtra.texi \
|
||||
$(srcdir)/picture-xtra.texi \
|
||||
$(srcdir)/emerge-xtra.texi \
|
||||
$(srcdir)/vc-xtra.texi \
|
||||
$(srcdir)/vc1-xtra.texi \
|
||||
$(srcdir)/vc2-xtra.texi \
|
||||
$(srcdir)/fortran-xtra.texi \
|
||||
$(srcdir)/msdog-xtra.texi
|
||||
|
||||
EMACSSOURCES= \
|
||||
$(srcdir)/emacs.texi \
|
||||
$(srcdir)/doclicense.texi \
|
||||
$(srcdir)/screen.texi \
|
||||
$(srcdir)/commands.texi \
|
||||
$(srcdir)/entering.texi \
|
||||
$(srcdir)/basic.texi \
|
||||
$(srcdir)/mini.texi \
|
||||
$(srcdir)/m-x.texi \
|
||||
$(srcdir)/help.texi \
|
||||
$(srcdir)/mark.texi \
|
||||
$(srcdir)/killing.texi \
|
||||
$(srcdir)/regs.texi \
|
||||
$(srcdir)/display.texi \
|
||||
$(srcdir)/search.texi \
|
||||
$(srcdir)/fixit.texi \
|
||||
$(srcdir)/files.texi \
|
||||
$(srcdir)/buffers.texi \
|
||||
$(srcdir)/windows.texi \
|
||||
$(srcdir)/frames.texi \
|
||||
$(srcdir)/mule.texi \
|
||||
$(srcdir)/major.texi \
|
||||
$(srcdir)/indent.texi \
|
||||
$(srcdir)/text.texi \
|
||||
$(srcdir)/programs.texi \
|
||||
$(srcdir)/building.texi \
|
||||
$(srcdir)/maintaining.texi \
|
||||
$(srcdir)/abbrevs.texi \
|
||||
$(srcdir)/sending.texi \
|
||||
$(srcdir)/rmail.texi \
|
||||
$(srcdir)/dired.texi \
|
||||
$(srcdir)/calendar.texi \
|
||||
$(srcdir)/misc.texi \
|
||||
$(srcdir)/custom.texi \
|
||||
$(srcdir)/trouble.texi \
|
||||
$(srcdir)/cmdargs.texi \
|
||||
$(srcdir)/xresources.texi \
|
||||
$(srcdir)/anti.texi \
|
||||
$(srcdir)/macos.texi \
|
||||
$(srcdir)/msdog.texi \
|
||||
$(srcdir)/gnu.texi \
|
||||
$(srcdir)/glossary.texi \
|
||||
$(srcdir)/ack.texi \
|
||||
$(srcdir)/kmacro.texi \
|
||||
$(EMACS_XTRA)
|
||||
|
||||
info: $(INFO_TARGETS)
|
||||
|
||||
|
@ -144,18 +87,6 @@ $(infodir)/info: $(INFOSOURCES)
|
|||
info.dvi: $(INFOSOURCES)
|
||||
$(ENVADD) $(TEXI2DVI) $(srcdir)/info.texi
|
||||
|
||||
$(infodir)/emacs: $(EMACSSOURCES)
|
||||
$(MAKEINFO) emacs.texi
|
||||
|
||||
emacs.dvi: $(EMACSSOURCES)
|
||||
$(ENVADD) $(TEXI2DVI) $(srcdir)/emacs.texi
|
||||
|
||||
# This target is here so you could easily get the list of the *.texi
|
||||
# files which belong to the Emacs manual (as opposed to the separate
|
||||
# manuals for CL, CC Mode, Ebrowse, etc.). With this target, you can
|
||||
# say things like "grep foo `make emacsman`".
|
||||
emacsman:
|
||||
@echo $(EMACSSOURCES)
|
||||
|
||||
$(infodir)/ccmode: cc-mode.texi
|
||||
$(MAKEINFO) cc-mode.texi
|
||||
|
@ -266,9 +197,6 @@ $(infodir)/efaq: faq.texi
|
|||
faq.dvi: faq.texi
|
||||
$(ENVADD) $(TEXI2DVI) $(srcdir)/faq.texi
|
||||
|
||||
../etc/GNU: gnu1.texi gnu.texi
|
||||
$(MAKEINFO) --no-headers -o ../etc/GNU gnu1.texi
|
||||
|
||||
$(infodir)/autotype: autotype.texi
|
||||
$(MAKEINFO) autotype.texi
|
||||
autotype.dvi: autotype.texi
|
||||
|
@ -322,9 +250,6 @@ $(infodir)/smtpmail: smtpmail.texi
|
|||
smtpmail.dvi: smtpmail.texi
|
||||
$(ENVADD) $(TEXI2DVI) $(srcdir)/smtpmail.texi
|
||||
|
||||
emacs-xtra.dvi: emacs-xtra.texi $(EMACS_XTRA)
|
||||
$(ENVADD) $(TEXI2DVI) $(srcdir)/emacs-xtra.texi
|
||||
|
||||
$(infodir)/org: org.texi
|
||||
$(MAKEINFO) org.texi
|
||||
org.dvi: org.texi
|
||||
|
@ -355,7 +280,7 @@ mostlyclean:
|
|||
|
||||
clean: mostlyclean
|
||||
- $(DEL) *.dvi
|
||||
- $(DEL) $(infodir)/emacs* $(infodir)/ccmode* \
|
||||
- $(DEL) $(infodir)/ccmode* \
|
||||
$(infodir)/cl* $(infodir)/dired-x* \
|
||||
$(infodir)/ediff* $(infodir)/forms* \
|
||||
$(infodir)/gnus* $(infodir)/info* \
|
|
@ -1,6 +1,6 @@
|
|||
\input texinfo @c -*-texinfo-*-
|
||||
|
||||
@setfilename ../info/message
|
||||
@setfilename ../../info/message
|
||||
@settitle Message Manual
|
||||
@synindex fn cp
|
||||
@synindex vr cp
|
|
@ -3,17 +3,17 @@
|
|||
@c Note: This document requires makeinfo version 4.6 or greater to build.
|
||||
@c
|
||||
@c %**start of header
|
||||
@setfilename ../info/mh-e
|
||||
@setfilename ../../info/mh-e
|
||||
@settitle The MH-E Manual
|
||||
@c %**end of header
|
||||
|
||||
@c Version of the software and manual.
|
||||
@set VERSION 8.0.3
|
||||
@set VERSION 8.0.3+CVS
|
||||
@c Edition of the manual. It is either empty for the first edition or
|
||||
@c has the form ", nth Edition" (without the quotes).
|
||||
@set EDITION
|
||||
@set UPDATED 2006-11-12
|
||||
@set UPDATE-MONTH November, 2006
|
||||
@set UPDATED 2007-09-25
|
||||
@set UPDATE-MONTH September, 2007
|
||||
|
||||
@c Other variables.
|
||||
@set MH-BOOK-HOME http://rand-mh.sourceforge.net/book/mh
|
||||
|
@ -2556,16 +2556,14 @@ includes the results of a quick poll of MH-E users from 2005-12-23.
|
|||
@cindex browser, @samp{w3m}
|
||||
@cindex @samp{w3m}
|
||||
@kindex Mouse-2
|
||||
@kindex S-Mouse-2
|
||||
@item @samp{w3m} 7
|
||||
The @samp{w3m} browser requires an external program. It's quick,
|
||||
produces pretty nice output, and best of all, it's the only browser
|
||||
that highlights links. These can be clicked with @kbd{Mouse-2} to view
|
||||
the content of the link in @samp{w3m} or with @kbd{S-Mouse-2} to view
|
||||
the content of the link in an external browser. The @samp{w3m} browser
|
||||
handles tables well and actually respects the table's width parameter
|
||||
(which can cause text to wrap if the author didn't anticipate that the
|
||||
page would be viewed in Emacs).
|
||||
the content of the link in @samp{w3m}. The @samp{w3m} browser handles
|
||||
tables well and actually respects the table's width parameter (which
|
||||
can cause text to wrap if the author didn't anticipate that the page
|
||||
would be viewed in Emacs).
|
||||
@c -------------------------
|
||||
@cindex browser, @samp{w3m-standalone}
|
||||
@cindex @samp{w3m-standalone}
|
||||
|
@ -2643,6 +2641,20 @@ documentation for the Gnus command @kbd{W h} (see section
|
|||
@cite{The Gnus Manual}).
|
||||
@end ifnotinfo
|
||||
|
||||
@cindex @file{.emacs}
|
||||
@cindex files, @file{.emacs}
|
||||
@findex browse-url-at-mouse
|
||||
@kindex S-Mouse-2
|
||||
|
||||
A useful key binding that you can add to to @file{~/.emacs} is the
|
||||
following which displays an HTML link or textual URL in an external
|
||||
browser when clicked with @kbd{S-mouse-2}. This binding works in any
|
||||
buffer, including HTML buffers.
|
||||
|
||||
@smalllisp
|
||||
(global-set-key [S-mouse-2] 'browse-url-at-mouse)
|
||||
@end smalllisp
|
||||
|
||||
@node Digests, Reading PGP, HTML, Reading Mail
|
||||
@section Digests
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
\input texinfo @c -*-texinfo-*-
|
||||
@comment %**start of header
|
||||
@setfilename ../info/newsticker
|
||||
@setfilename ../../info/newsticker
|
||||
@set VERSION 1.9
|
||||
@set UPDATED November 2005
|
||||
@settitle Newsticker @value{VERSION}
|
|
@ -1,9 +1,9 @@
|
|||
\input texinfo
|
||||
@c %**start of header
|
||||
@setfilename ../info/org
|
||||
@setfilename ../../info/org
|
||||
@settitle Org Mode Manual
|
||||
|
||||
@set VERSION 5.05
|
||||
@set VERSION 5.07
|
||||
@set DATE August 2007
|
||||
|
||||
@dircategory Emacs
|
||||
|
@ -498,8 +498,8 @@ define @emph{global} keys for the commands @command{org-store-link} and
|
|||
@lisp
|
||||
;; The following lines are always needed. Choose your own keys.
|
||||
(add-to-list 'auto-mode-alist '("\\.org\\'" . org-mode))
|
||||
(define-key global-map "\C-cl" 'org-store-link)
|
||||
(define-key global-map "\C-ca" 'org-agenda)
|
||||
(global-set-key "\C-cl" 'org-store-link)
|
||||
(global-set-key "\C-ca" 'org-agenda)
|
||||
@end lisp
|
||||
|
||||
Furthermore, you must activate @code{font-lock-mode} in org-mode
|
||||
|
@ -848,9 +848,9 @@ Sort same-level entries. When there is an active region, all entries in
|
|||
the region will be sorted. Otherwise the children of the current
|
||||
headline are sorted. The command prompts for the sorting method, which
|
||||
can be alphabetically, numerically, by time (using the first time stamp
|
||||
in each entry), and each of these in reverse order. With a @kbd{C-u}
|
||||
prefix, sorting will be case-sensitive. With two @kbd{C-u C-u}
|
||||
prefixes, duplicate entries will also be removed.
|
||||
in each entry), by priority, and each of these in reverse order. With a
|
||||
@kbd{C-u} prefix, sorting will be case-sensitive. With two @kbd{C-u
|
||||
C-u} prefixes, duplicate entries will also be removed.
|
||||
@end table
|
||||
|
||||
@cindex region, active
|
||||
|
@ -938,7 +938,9 @@ file, the archive file.
|
|||
@kindex C-c C-x C-s
|
||||
@item C-c C-x C-s
|
||||
Archive the subtree starting at the cursor position to the location
|
||||
given by @code{org-archive-location}.
|
||||
given by @code{org-archive-location}. Context information that could be
|
||||
lost like the file name, the category, inherited tags, and the todo
|
||||
state will be store as properties in the entry.
|
||||
@kindex C-u C-c C-x C-s
|
||||
@item C-u C-c C-x C-s
|
||||
Check if any direct children of the current headline could be moved to
|
||||
|
@ -994,9 +996,9 @@ match is in the body of an entry, headline and body are made visible.
|
|||
In order to provide minimal context, also the full hierarchy of
|
||||
headlines above the match is shown, as well as the headline following
|
||||
the match. Each match is also highlighted; the highlights disappear
|
||||
when the buffer is changed an editing command, or by pressing @kbd{C-c
|
||||
C-c}. When called with a @kbd{C-u} prefix argument, previous highlights
|
||||
are kept, so several calls to this command can be stacked.
|
||||
when the buffer is changed by an editing command, or by pressing
|
||||
@kbd{C-c C-c}. When called with a @kbd{C-u} prefix argument, previous
|
||||
highlights are kept, so several calls to this command can be stacked.
|
||||
@end table
|
||||
@noindent
|
||||
For frequently used sparse trees of specific search strings, you can
|
||||
|
@ -1969,7 +1971,9 @@ Recompute the entire table, line by line. Any lines before the first
|
|||
hline are left alone, assuming that these are part of the table header.
|
||||
@c
|
||||
@kindex C-u C-u C-c *
|
||||
@kindex C-u C-u C-c C-c
|
||||
@item C-u C-u C-c *
|
||||
@itemx C-u C-u C-c C-c
|
||||
Iterate the table by recomputing it until no further changes occur.
|
||||
This may be necessary if some computed fields use the value of other
|
||||
fields that are computed @i{later} in the calculation sequence.
|
||||
|
@ -2186,15 +2190,15 @@ earlier.
|
|||
@cindex targets, radio
|
||||
@cindex links, radio targets
|
||||
|
||||
You can configure Org-mode to link any occurrences of certain target
|
||||
names in normal text. So without explicitly creating a link, the text
|
||||
connects to the target radioing its position. Radio targets are
|
||||
enclosed by triple angular brackets. For example, a target
|
||||
@samp{<<<My Target>>>} causes each occurrence of @samp{my target} in
|
||||
normal text to become activated as a link. The Org-mode file is
|
||||
scanned automatically for radio targets only when the file is first
|
||||
loaded into Emacs. To update the target list during editing, press
|
||||
@kbd{C-c C-c} with the cursor on or at a target.
|
||||
Org-mode can automatically turn any occurrences of certain target names
|
||||
in normal text into a link. So without explicitly creating a link, the
|
||||
text connects to the target radioing its position. Radio targets are
|
||||
enclosed by triple angular brackets. For example, a target @samp{<<<My
|
||||
Target>>>} causes each occurrence of @samp{my target} in normal text to
|
||||
become activated as a link. The Org-mode file is scanned automatically
|
||||
for radio targets only when the file is first loaded into Emacs. To
|
||||
update the target list during editing, press @kbd{C-c C-c} with the
|
||||
cursor on or at a target.
|
||||
|
||||
@node External links, Handling links, Internal links, Hyperlinks
|
||||
@section External links
|
||||
|
@ -2406,8 +2410,8 @@ global commands, like this (please select suitable global keys
|
|||
yourself):
|
||||
|
||||
@lisp
|
||||
(define-key global-map 'org-insert-link-global "\\C-c L")
|
||||
(define-key global-map 'org-open-at-point-global "\\C-c o")
|
||||
(global-set-key "\C-c L" 'org-insert-link-global)
|
||||
(global-set-key "\C-c o" 'org-open-at-point-global)
|
||||
@end lisp
|
||||
|
||||
@node Link abbreviations, Search options, Using links outside Org-mode, Hyperlinks
|
||||
|
@ -2757,7 +2761,17 @@ agenda buffers with the @kbd{t} command key (@pxref{Agenda commands}).
|
|||
@item S-@key{right}
|
||||
@itemx S-@key{left}
|
||||
Select the following/preceding TODO state, similar to cycling. Mostly
|
||||
useful if more than two TODO states are possible (@pxref{TODO extensions}).
|
||||
useful if more than two TODO states are possible (@pxref{TODO
|
||||
extensions}).
|
||||
@kindex C-c C-c
|
||||
@item C-c C-c
|
||||
Use the fast tag interface to quickly and directly select a specific
|
||||
TODO state. For this you need to assign keys to TODO state, like this:
|
||||
@example
|
||||
#+SEQ_TODO: TODO(t) STARTED(s) WAITING(w) | DONE(d)
|
||||
@end example
|
||||
@noindent See @ref{Per file keywords} and @ref{Setting tags} for more
|
||||
information.
|
||||
@kindex C-c C-v
|
||||
@cindex sparse tree, for TODO
|
||||
@item C-c C-v
|
||||
|
@ -2775,9 +2789,6 @@ agenda files (@pxref{Agenda views}) into a single buffer. The buffer is in
|
|||
@code{agenda-mode}, so there are commands to examine and manipulate
|
||||
the TODO entries directly from that buffer (@pxref{Agenda commands}).
|
||||
@xref{Global TODO list}, for more information.
|
||||
@c @item @code{org-agenda-include-all-todo}
|
||||
@c If you would like to have all your TODO items listed as part of your
|
||||
@c agenda, customize the variable @code{org-agenda-include-all-todo}.
|
||||
@kindex S-M-@key{RET}
|
||||
@item S-M-@key{RET}
|
||||
Insert a new TODO entry below the current one.
|
||||
|
@ -2930,12 +2941,11 @@ or
|
|||
A setup for using several sets in parallel would be:
|
||||
|
||||
@example
|
||||
#+SEQ_TODO: "TODO" "|" "DONE"
|
||||
#+SEQ_TODO: "REPORT" "BUG" "KNOWNCAUSE" "|" "FIXED"
|
||||
#+SEQ_TODO: "|" "CANCELED"
|
||||
#+SEQ_TODO: TODO | DONE
|
||||
#+SEQ_TODO: REPORT BUG KNOWNCAUSE | FIXED
|
||||
#+SEQ_TODO: | CANCELED
|
||||
@end example
|
||||
|
||||
|
||||
@cindex completion, of option keywords
|
||||
@kindex M-@key{TAB}
|
||||
@noindent To make sure you are using the correct keyword, type
|
||||
|
@ -5650,10 +5660,12 @@ file.
|
|||
@table @kbd
|
||||
@kindex C-c C-e a
|
||||
@item C-c C-e a
|
||||
Export as ASCII file. If there is an active region, only the region
|
||||
will be exported. For an org file @file{myfile.org}, the ASCII file
|
||||
Export as ASCII file. For an org file @file{myfile.org}, the ASCII file
|
||||
will be @file{myfile.txt}. The file will be overwritten without
|
||||
warning.
|
||||
warning. If there is an active region, only the region will be
|
||||
exported. If the selected region is a single tree, the tree head will
|
||||
become the document title. If the tree head entry has or inherits an
|
||||
EXPORT_FILE_NAME property, that name will be used for the export.
|
||||
@kindex C-c C-e v a
|
||||
@item C-c C-e v a
|
||||
Export only the visible part of the document.
|
||||
|
@ -5703,10 +5715,16 @@ language, but with additional support for tables.
|
|||
@table @kbd
|
||||
@kindex C-c C-e h
|
||||
@item C-c C-e h
|
||||
Export as HTML file @file{myfile.html}.
|
||||
Export as HTML file @file{myfile.html}. For an org file
|
||||
@file{myfile.org}, the ASCII file will be @file{myfile.html}. The file
|
||||
will be overwritten without warning. If there is an active region, only
|
||||
the region will be exported. If the selected region is a single tree,
|
||||
the tree head will become the document title. If the tree head entry
|
||||
has or inherits an EXPORT_FILE_NAME property, that name will be used for
|
||||
the export.
|
||||
@kindex C-c C-e b
|
||||
@item C-c C-e b
|
||||
Export as HTML file and open it with a browser.
|
||||
Export as HTML file and immediately open it with a browser.
|
||||
@kindex C-c C-e H
|
||||
@item C-c C-e H
|
||||
Export to a temporary buffer, do not create a file.
|
|
@ -1,6 +1,6 @@
|
|||
\input texinfo @c -*-texinfo-*-
|
||||
@c %**start of header
|
||||
@setfilename ../info/pcl-cvs
|
||||
@setfilename ../../info/pcl-cvs
|
||||
@settitle PCL-CVS --- Emacs Front-End to CVS
|
||||
@syncodeindex vr fn
|
||||
@c %**end of header
|
|
@ -1,6 +1,6 @@
|
|||
\input texinfo @c -*-texinfo-*-
|
||||
|
||||
@setfilename ../info/pgg
|
||||
@setfilename ../../info/pgg
|
||||
|
||||
@set VERSION 0.1
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
\input texinfo
|
||||
@c %**start of header
|
||||
@setfilename ../info/rcirc
|
||||
@setfilename ../../info/rcirc
|
||||
@settitle rcirc Manual
|
||||
@c %**end of header
|
||||
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue