Re: working with Automatic Customization and auto filling

Ralf Angeli <[email protected]>
Newsgroups gmane.emacs.auc-tex
Message-ID <[email protected]>
* Jobst Hoffmann (2005-02-07) writes:

> Automatic customization of a LaTeX-file auto_tst.tex (shown below)
> doesn't work like it's announced in the manual. There is no texpower-
> entry in the ./auto/auto_tst.el file and therefore I have to type all
> macros from texpower by myself. If I'm changing the usepackage command
> to the other (out commented) way, all works like expected. Any hints?
>
> ---------------------------------------------8< begin snap ------
> documentclass[12pt,a4paper]{article}
>
> \usepackage[a,\b]{texpower}     % no entries in ./auto/auto_tst.el
> %\usepackage[a,b]{texpower}     % correct entries in ./auto/auto_tst.el

The parser does not match the first variant.  That's because we
currently use the following regular expression for matching:

"\\\\use\\(package\\)\\(\\[\\([^\]\\\\]*\\)\\]\\)?\
{\\(\\([^#}\\\\\\.%]\\|%[^\n\r]*[\n\r]\\)+?\\)}"

It doesn't allow backslashes inside the square brackets of the
optional usepackage arguments.  I think the original intention was to
prevent escaped square brackets from being matched.  So my proposal
would be to change this to

"\\\\use\\(package\\)\\(\\[\\(.*[^\\]\\|\\)\\]\\)?\
{\\(\\([^#}\\.%]\\|%[^\n\r]*[\n\r]\\)+?\\)}"

Question for other developers: Does that look right?  (Note that I
also removed some excess backslashes in the complemented character
alternatives.)

> 3. auto filling the above shown figure environment with point after
> [htb] leads to the following result:
>
> \begin{figure}[htb]
>     \centeri
> ng%
> \includegraphics{abc}
> \ifvop{%
> \caption{abc}%
> \label{fig:abc}%
> }{}%
> \end{figure}

This is fixed in CVS.  Thanks for the report.

> Emacs  : XEmacs 21.4 (patch 16) "Corporate Culture" [Lucid] (i686-pc-
> linux) of Tue Dec 21 2004 on thinktwiceIV.phytech.fh-aachen.de
> Package: AUCTeX 11.55

You are actually using XEmacs 21.4.16 with AUCTeX 11.55?  Be sure to
upgrade XEmacs as soon as possible.  XEmacs 21.4.16 was withdrawn due
to a bug which may be triggered by AUCTeX and lead to hangs and
crashes.  21.4.17 was released yesterday which contains a fix for this
bug.

-- 
Ralf
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.