@c This is part of the AUCTeX Manual.
@c Copyright (C) 2004-2006, 2008, 2009, 2013, 2014 Free Software
@c Foundation, Inc.
@c See the file auctex.texi for copying conditions.
@ifset rawfile
@include macros.texi
@node Development,,(dir),(dir)
@top Future Development of @AUCTeX{}
@end ifset

The following sections describe future development of @AUCTeX{}.
Besides mid-term goals, bug reports and requests we cannot fix or honor
right away are being gathered here.  If you have some time for Emacs
Lisp hacking, you are encouraged to try to provide a solution to one of
the following problems.  If you don't know Lisp, you may help us to
improve the documentation.  It might be a good idea to discuss proposed
changes on the mailing list of @AUCTeX{} first.

@menu
* Mid-term Goals::
* Wishlist::
* Bugs::
@end menu

@ifset rawfile
@node Mid-term Goals
@chapter Mid-term Goals
@raisesections
@end ifset

@ifclear rawfile
@node Mid-term Goals
@section Mid-term Goals
@end ifclear

@itemize @bullet
@item Integration of @previewlatex{} into @AUCTeX{}

As of @AUCTeX{} 11.81 @previewlatex{} is a part of @AUCTeX{} in the
sense that the installation routines were merged and @previewlatex{} is
being packaged with @AUCTeX{}.

Further integration will happen at the backend.  This involves folding
of error parsing and task management of both packages which will ease
development efforts and avoid redundant work.

@item Error help catalogs

Currently, the help for errors is more or less hardwired into
@file{tex.el}.  For supporting error help in other languages, it would
be sensible to instead arrange error messages in language-specific
files, make a common info file from all such catalogs in a given
language and look the error texts up in an appropriate index.  The user
would then specify a preference list of languages, and the errors would
be looked up in the catalogs in sequence until they were identified.

@item Combining @samp{docTeX} with RefTeX

Macro cross references should also be usable for document navigation
using RefTeX.


@end itemize

@node Wishlist
@section Wishlist

@itemize @bullet
@item Documentation lookup for macros

A parser could gather information about which macros are defined in
which @LaTeX{} packages and store the information in a hashtable which
can be used in a backend for @code{TeX-doc} in order to open the
matching documentation for a given macro.  The information could also be
used to insert an appropriate @samp{\usepackage} statement if the user
tries to insert a macro for which the respective package has not been
requested yet.

@item Spell checking of macros

A special ispell dictionary for macros could be nice to have.

@item Improvements to error reporting

Fringe indicators for errors in the main text would be nice.

@item A math entry grid

A separate frame with a table of math character graphics to click on in
order to insert the respective sequence into the buffer (cf. the
``grid'' of x-symbol).

@item Crossreferencing support

It would be nice if you could index process your favorite collection of
@file{.dtx} files (such as the LaTeX source), just call a command on
arbitrary control sequence, and get either the DVI viewer opened right
at the definition of that macro (using Source Specials), or the source
code of the @file{.dtx} file.

@item Better plain TeX support

For starters, @code{LaTeX-math-mode} is not very @LaTeX{}-specific in
the first place, and similar holds for indentation and formatting.

@item
Page count when compiling should (optionally) go to modeline of the
window where the compilation command was invoked, instead of the output
window.  Suggested by Karsten Tinnefeld
<tinnefeld@@irb.informatik.uni-dortmund.de>.

@item
Command to insert a macrodefinition in the preamble, without moving
point from the current location.  Suggested by
"Jeffrey C. Ely" <ely@@nwu.edu>.

@item
A database of all commands defined in all stylefiles.  When a command or
environment gets entered that is provided in one of the styles, insert
the appropriate @code{\usepackage} in the preamble.

@item
A way to add and overwrite math mode entries in style files, and to
decide where they should be.  Suggested by Remo Badii <Remo.Badii@@psi.ch>.

@item
Create template for (first) line of tabular environment.

@item
@c Already fixed?
I think prompting for the master is the intended behaviour.  It
corresponds to a `shared' value for TeX-master.

There should probably be a `none' value which wouldn't query for the
master, but instead disable all features that relies on TeX-master.

This default value for TeX-master could then be controled with mapping
based on the extension.

@item
Suggest @samp{makeindex} when appropriate.

@item
Use index files (when available) to speed up @kbd{C-c C-m include
@key{RET}}.

@item
Option not to calculate very slow completions like for
@kbd{C-c C-m include @key{RET}}.

@item
Font menu should be created from @code{TeX-font-list}.

@item
Installation procedure written purely in emacs lisp.

@item
Included PostScript files should also be counted as part of the
document.

@item
A nice hierarchical by-topic organization of all officially documented
LaTeX macros, available from the menu bar.

@item
@code{TeX-command-default} should be set from the master file, if not
set locally.  Suggested by Peter Whaite @samp{<peta@@cim.mcgill.ca>}.

@item
Make @AUCTeX{} work with @samp{crypt++}.  Suggested by Chris Moore
@samp{<Chris.Moore@@src.bae.co.uk>}.

@item
Make @AUCTeX{} work with @samp{longlines}.  This would also apply to
@previewlatex{}, though it might make sense to unify error processing
before attempting this.

@item
The @samp{Spell} command should apply to all files in a document.  Maybe
it could try to restrict to files that have been modified since last
spell check?  Suggested by Ravinder Bhumbla @samp{<rbhumbla@@ucsd.edu>}.

@item
Make @key{.} check for abbreviations and sentences ending with capital
letters.

@item
Use Emacs 19 minibuffer history to choose between previewers, and other
stuff.  Suggested by John Interrante
@samp{<interran@@uluru.Stanford.EDU>}.

@item
Make features.

A new command @code{TeX-update} (@kbd{C-c C-u}) could be used to create
an up-to-date dvi file by repeatedly running Bib@TeX{}, MakeIndex and
(La)@TeX{}, until an error occurs or we are done.

An alternative is to have an @samp{Update} command that ensures the
@samp{dvi} file is up to date.  This could be called before printing and
previewing.

@item
Documentation of variables that can be set in a style hook.

We need a list of what can safely be done in an ordinary style hook.
You can not set a variable that @AUCTeX{} depends on, unless @AUCTeX{}
knows that it has to run the style hooks first.

Here is the start of such a list.
@table @code

@item LaTeX-add-environments

@item TeX-add-symbols

@item LaTeX-add-labels

@item LaTeX-add-bibliographies

@item LaTeX-largest-level

@end table

@item
Outline should be (better) supported in @TeX{} mode.

At least, support headers, trailers, as well as TeX-outline-extra.

@item
@code{TeX-header-start} and @code{TeX-trailer-end}.

We might want these, just for fun (and outlines)

@item
Plain @TeX{} and @LaTeX{} specific header and trailer expressions.

We should have a way to globally specify the default value of the header
and trailer regexps.

@item
Get closer to original @code{TeX-mode} keybindings.

A third initialization file (@file{tex-mode.el}) containing an emulator
of the standard @code{TeX-mode} would help convince some people to
change to @AUCTeX{}.

@item
Use markers in @code{TeX-error-list} to remember buffer positions in
order to be more robust with regard to line numbers and changed files.

@item
Finish the Texinfo mode.  For one thing, many Texinfo mode commands do
not accept braces around their arguments.

@item
Hook up the letter environment with @file{bbdb.el}.

@end itemize

@node Bugs
@section Bugs

@c FIXME: Are those bugs still present?

@itemize @bullet
@item
The style hooks automatically generated by parsing files for
@file{example.dtx}, @file{example.sty}, @file{example.drv} and
@file{example.bib} all clash.  Bad.  Clash with hand-written style hooks
should be removed by dialect discrimination --- to be checked.

@item
@kbd{C-c `} should always stay in the current window, also when it finds
a new file.

@item
Do not overwrite emacs warnings about existing auto-save files when
loading a new file.

@item
Maybe the regexp for matching a TeX symbol during parsing should be
@samp{"\\\\\\([a-zA-Z]+\\|.\\)"} ---
@samp{<thiemann@@informatik.uni-tuebingen.de>} Peter Thiemann.

@item
@AUCTeX{} should not parse verbatim environments.

@item
Make @samp{`} check for math context in @code{LaTeX-math-mode}. and
simply self insert if not in a math context.

@item
Make @code{TeX-insert-dollar} more robust.  Currently it can be fooled
by @samp{\mbox}'es and escaped double dollar for example.

@item
Correct indentation for tabular, tabbing, table, math, and array
environments.

@item
No syntactic font locking of verbatim macros and environments. (XEmacs
only)

@item
Font locking inside of verbatim macros and environments is not
inhibited.  This may result in syntax highlighting of unbalanced dollar
signs and the like spilling out of the verbatim content. (XEmacs only)

@item
Folding of @LaTeX{} constructs spanning more than one line may result in
overfull lines. (XEmacs only)
@end itemize

@c Local Variables:
@c mode: texinfo
@c TeX-master: "auctex"
@c End:
