auctex-devel
[Top][All Lists]

## Re: [AUCTeX-devel] exclude begin{comment} (optionally) from LaTeX-fill-r

 From: Mosè Giordano Subject: Re: [AUCTeX-devel] exclude begin{comment} (optionally) from LaTeX-fill-region and friends Date: Sat, 4 Jun 2016 12:34:04 +0200

Hi Uwe,

2016-06-04 10:40 GMT+02:00 Uwe Brauer <address@hidden>:
>
> Hi
>
> Since some time I am using orgtbl-mode, a minor mode from the org package,
> which greatly simplifies the constructions of latex tables, even in a
> latex buffer.
>
> The idea is that the org table construct is wrapped into a
> comment environment, like this.
>
> \begin{comment}
> #+ORGTBL: SEND data2 orgtbl-to-latex  :lend "\\\\ \\hline"
> | / | <> | <> | <> | <> | <> | <> | <> | <> | <> | <> |
> |---+----+----+----+----+----+----+----+----+----+----|
> |   | A  |  6 |  8 |  8 |  9 |  9 |  6 |  7 |  8 |  9 |
> |   | B  |  7 |  6 |  7 |  7 |  6 |  8 |  6 |  8 |  8 |
> \end{comment}
>
> And then is «send» as latex source code into some place of the buffer.
>
>
> The only problem is when I run LaTeX-fill-region and friends
> because is results in a useless (for orgtbl-mode) construct like this
>
> \begin{comment}
>   #+ORGTBL: SEND data2 orgtbl-to-latex :lend "\\\\ \\hline" | / | <> |
>   <> | <> | <> | <> | <> | <> | <> | <> | <> |
>   |---+----+----+----+----+----+----+----+----+----+----| | | A | 6 |
>   8 | 8 | 9 | 9 | 6 | 7 | 8 | 9 | | | B | 7 | 6 | 7 | 7 | 6 | 8 | 6 |
>   8 | 8 |
> \end{comment}
>
>
> So the question is this: could (optionally)  \begin{comment} be  exclude
> from LaTeX-fill-region and friends?

Yes, if you're fine with treating it like a verbatim environment: add
comment' environment to LaTeX-indent-environment-list' with
current-indentation' as indentation rule:

--8<---------------cut here---------------start------------->8---
`