Source

auctex / texi / todo.texi

Full commit
@include macros.texi
@ifset rawfile
@chapter ToDo

@end ifset
@c -----------------------
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.

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

@node Mid-term Goals, Wishlist,, ToDo
@section Mid-term Goals

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

@AUCTeX{} users will thereby get the functionality provided by
@previewlatex{} without the hassle of an additional installation.

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

@item More flexible option and command handling

The current state of command handling with @code{TeX-command-list} is
not very flexible because there is no distinction between executables
and command line options to be passed to them.

Customization of @code{TeX-command-list} by the user will interfere with
updates of @AUCTeX{}.

@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 the were identified.

@item Combining @samp{docTeX} with RefTeX

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


@end itemize

@node Wishlist, Bugs, Mid-term Goals, ToDo
@section Wishlist

@itemize @bullet
@item Quick error overviews

An error overview window (extract from the log file with just the error
lines, clickable like a ``grep'' buffer) and/or 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 Poor man's Source Specials
In particular in PDF mode (and where Source Specials cause problems),
alternatives would be desirable.  One could implement inverse search by
something like Heiko Oberdiek's @file{vpe.sty}, and forward search by
using the @file{.aux} file info to correlate labels in the text
(possibly in cooperation with Ref@TeX{}) with previewer pages.

@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
Multiple argument completion for @samp{\bibliography}.  In general, I
ought to make @kbd{,} special for these kind of completions.

@item
Suggest @samp{makindex} when appropriate.

@item
@AUCTeX{} should be able to parse @LaTeX{}2e @file{.cls} files.  Here
are the regexps by @samp{<thiemann@@informatik.uni-tuebingen.de>} Peter
Thiemann.

@example
     ("\\\\DeclareRobustCommand@{?\\\\\\([a-zA-Z]+\\)@}?\\[\\([0-9]+\\)\\]\
\\[\\([^\]\\\\\n\r]+\\)\\]"
      (1 2 3) LaTeX-auto-optional)
     ("\\\\DeclareRobustCommand@{?\\\\\\([a-zA-Z]+\\)@}?\\[\\([0-9]+\\)\\]"
      (1 2) LaTeX-auto-arguments)
     ("\\\\DeclareRobustCommand@{?\\\\\\([a-zA-Z]+\\)@}?" 1 TeX-auto-symbol)
     ("\\\\DeclareFixedFont@{?\\\\\\([a-zA-Z]+\\)@}?"
      1 TeX-auto-symbol)
     ("\\\\Declare\\(Text\\|Old\\)FontCommand@{?\\\\\\([a-zA-Z]+\\)@}?"
      2 TeX-auto-symbol)
     ("\\\\DeclareMath\\(Symbol\\|Delimiter\\|Accent\\|Radical\\)@{?\\\\\\([a-zA-Z]+\\)@}?"
      2 TeX-auto-symbol)
     ;;; it is also valid to declare just a single symbol, e.g. <,
     ;;; with \DeclareMathSymbol but it is not necessary to register that here
     ("\\\\DeclareText\\(Command\\|Symbol\\|Accent\\|Composite\\)@{?\\\\\\([a-zA-Z]+\\)@}?"
      2 TeX-auto-symbol)
@end example

@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
The parser should catch warnings about undefined crossreferences.
Suggested by Richard Hirsch @samp{i3080501@@ws.rz.tu-bs.de}.

@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
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
Completion for counters and sboxes.

@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
Make @code{TeX-next-error} parse ahead and store the results in a list,
using markers to remember buffer positions in order to be more robust
with regard to line numbers and changed files.  This is what
@code{next-error} does. (Or did, until Emacs 19).

@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, , Wishlist, ToDo
@section Bugs

@c FIXME: Are those bugs still present?  Especially the filling bugs?

@itemize @bullet
@item The parsed files and style hooks for @file{example.dtx},
@file{example.sty}, @file{example.drv} and @file{example.bib} all
clash.  Bad.

@item
Filling messes up comments, but only at the end of the file.  Reported
by Juergen Reiss <psy3022@@rzbox.uni-wuerzburg.de>.

@item
@kbd{C-c C-q C-e} doesn't work properly on nested itemize environments.
Reported by  "Robert B. Love"  <rlove@@raptor.rmNUG.ORG>.

@item
@kbd{C-c `} should always stay in the current window, also when it find
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
@LaTeX{} formatting should skip @code{verbatim} environments.

@item
The argument to @samp{\verb} may be broken when filling if it contains a
space.  This should be fixed or documented.  Suggested by several
people.

@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
Fix bug with @code{TeX-show-environment} from hidden document
environment.

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

@item
If there are unmatched $ characters in @samp{verbatim} or similar
environments, the rest of the buffer gets fontified with the math face
(usually in brown).  A good way to fix this bug would be to have
conditional font locking, i.e. different (syntactical) keywords are used
inside certain environments.  This would allow special fontification of
programming languages in @samp{lstlisting} environments as well.
Unfortunately such conditional font locking is not provided yet by
Emacs.  As a workaround you can insert @samp{%$} after the end of the
environment in concern.
@c Might be fixed as described in
@c <news:v9smle4ge8.fsf@marauder.physik.uni-ulm.de>
@c http://thread.gmane.org/gmane.emacs.auc-tex/1018
@end itemize