GNU bug report logs - #51762
13.0.14; environment formating

Previous Next

Package: auctex;

Reported by: "Pierre L. Nageoire" <devel <at> pollock-nageoire.net>

Date: Thu, 11 Nov 2021 07:15:02 UTC

Severity: normal

Tags: confirmed

Found in version 13.0.14

Done: Ikumi Keita <ikumi <at> ikumi.que.jp>

Bug is archived. No further changes may be made.

Full log


Message #10 received at 51762 <at> debbugs.gnu.org (full text, mbox):

From: Ikumi Keita <ikumi <at> ikumi.que.jp>
To: "Pierre L. Nageoire" <devel <at> pollock-nageoire.net>
Cc: 51762 <at> debbugs.gnu.org
Subject: Re: bug#51762: 13.0.14; environment formating
Date: Fri, 12 Nov 2021 19:19:15 +0900
Hi Pierre,

>>>>> "Pierre L. Nageoire" <devel <at> pollock-nageoire.net> writes:
> Hi here is the environment before hitting C-c C-q C-e
>   %%
>   \begin{exoenonce}
>     On note alors
>     $$ \fundefline p{A \times B}{A}{(x,y)}{x}\ %%
>     \et\ \fundefline q{A \times B}{B}{(x,y)}{y}\ %%
>     \text{les projections canoniques}\ .$$
>   \end{exoenonce}

>   And after formating operation I get :
>     %%
>   \begin{exoenonce}
>     On note alors
>     $$ \fundefline p{A \times B}{A}{(x,y)}{x}\ %%
>     \et\ \fundefline q{A \times
>       B}{B}{(x,y)}{y}\ %% \text{les projections canoniques}\ .$$
>   \end{exoenonce}

>   Causing a part of code to be commented that should not and for
>   instance here an unbalanced dollar that makes the code completly
>   unexecutable !

Thanks for the report. I can repoduce the issue.

It seems that the regexp in `LaTeX-fill-region-as-paragraph' to identify
a code comment isn't wise enough:
----------------------------------------------------------------------
          (if (re-search-forward
               (concat "\\("
                       ;; Code comments.
                       "\\([^ \r\n%\\]\\|\\\\%\\)\\([ \t]\\|\\\\\\\\\\)*"
                       TeX-comment-start-regexp
                       "\\|"
[...]
----------------------------------------------------------------------
This doesn't match lines which end with "\ %%". I'll try to find
something better.

Regards,
Ikumi Keita




This bug report was last modified 3 years and 183 days ago.

Previous Next


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