[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [AUCTeX] Disable folding in specific environments

From: Ralf Angeli
Subject: Re: [AUCTeX] Disable folding in specific environments
Date: Mon, 20 Aug 2012 21:02:21 +0200

* Joost Kremers (2012-08-20) writes:

> is there a way to disable folding in (La)TeX mode in specific environments?
> I'm using orgtbl-mode to create org tables and convert them automatically
> to LaTeX tables. The org table is inside a comment environment, which I'd
> like to keep unfolded. Not just the environment itself, also everything in
> it.
> To keep the environment from folding, I've defined a special comment
> environment called orgtbl, which TeX-fold doesn't know about (so that is
> fine). However, snippets of LaTeX code inside this environment are still
> folded. That's annoying because the org table can have a format
> specification that can contain strings like "\\emph{%s}". TeX-fold tries to
> fold those but cannot find an argument, so displays the string "[Error: No
> content found]".

Hm, there is `TeX-fold-preserve-comments' but this only works with line
comments.  One would have to change the code to work with environmental
comments as well.  That would probably require some work because
currently AUCTeX does not know about such comments in general.

Technical note: The comment environment of comment.sty is an exception
but there is only code to have it recognized by font-latex.  See
style/comment.el in AUCTeX.

> Alternatively, is it possible to tell TeX-fold to simply not fold if it
> can't find any content? Instead of displaying the above error message, I
> mean? (That would be useful in other contexts as well, e.g. within
> \newcommand definitions.)

AFAICS there is currently no option to change the behavior.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]