GNU bug report logs - #29401
11.90.2.2017-07-25; Folding displays errors on valid LaTeX

Previous Next

Package: auctex;

Reported by: Koen van Greevenbroek <koenvangreevenbroek <at> gmail.com>

Date: Wed, 22 Nov 2017 16:56:02 UTC

Severity: normal

Found in version 11.90.2.2017

Full log


View this message in rfc822 format

From: Mosè Giordano <mose <at> gnu.org>
To: Koen van Greevenbroek <koenvangreevenbroek <at> gmail.com>
Cc: 29401 <at> debbugs.gnu.org
Subject: bug#29401: 11.90.2.2017-07-25; Folding displays errors on valid LaTeX
Date: Thu, 23 Nov 2017 00:34:44 +0100
Dear Koen,

2017-11-22 17:55 GMT+01:00 Koen van Greevenbroek
<koenvangreevenbroek <at> gmail.com>:
> Hi!
>
> Some valid LaTeX is parsed incorrectly by AUCTeX folding functions
> (i.e. 'TeX-fold-region'), and an annoying error is displayed. Here is
> an
> example:
>
> ===========================
> \documentclass{beamer}
> \begin{document}
> \begin{frame}
>   \begin{itemize}
>   \item \textbf<1>{One}
>   \item \textbf<1>{Two}
>   \end{itemize}
> \end{frame}
> \end{document}
> ===========================
>
> When folded, this code is displayed as follows:
>
> ===========================
> \documentclass{beamer}
> \begin{document}
> \begin{frame}
>   \begin{itemize}
>   * [Error: No content found]<1>{One}
>   * [Error: No content found]<2>{Two}
>   \end{itemize}
> \end{frame}
> \end{document}
> ===========================
>
> Another example, which doesn't involve beamer, is the following code:
>
> ===========================
> \usepackage{titlesec}
> \titleformat{\section}{\bfseries}{\thesection}{10pt}{}[\normalfont]
> ===========================
>
> which displays as:
>
> ===========================
> \usepackage{titlesec}
> \titleformat{[Error: No content
> found]}{\bfseries}{\thesection}{10pt}{}[\normalfont]
> ===========================
>
> Maybe it would be an idea to just not fold things like this where no
> content it found, instead of displaying an error?

Thanks for the detailed report.  I tried at least to track down the
culprit for the beamer case, I think a general solution would be to
teach `TeX-find-macro-boundaries' and related functions about <...>
specifications.  Unfortunately, I don't have right now the time to fix
it, but this should be a starting point for anyone willing to tackle
this issue.  Regarding the second case, I don't think there is an easy
fix for it.

Bye,
Mosè




This bug report was last modified 7 years and 197 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.