Re: Encoding trouble

2022-02-01 Thread Janusz S . Bień
On Tue, Feb 01 2022 at 12:08 +01, Arash Esbati wrote:
> Denis Bitouzé  writes:
>
>> several years ago, I already faced the following problem and,
>> unfortunately, it happened again yesterday, which made me lose quite
>> some time.
>>
>> Let me explain myself: I had a LaTeX file encoded in latin1 that
>> I wanted to encode in UTF-8. I used an external tool, in this case
>> `utrac`,
>
> I think Emacs got upset because it saw you used an external tool --
> hence the punishment 

What about local variables?

All my files have

%%% Local Variables: 
%%% coding: utf-8-unix
%%% mode: latex
%%% TeX-master: t
%%% TeX-PDF-mode: t
%%% TeX-engine: xetex
%%% End: 

Regards - Janusz

-- 
 ,   
Janusz S. Bien
emeryt (emeritus)
https://sites.google.com/view/jsbien



Re: bug#28405: Adding entries to LaTeX-indent-environment-list

2022-02-01 Thread Arash Esbati
Uwe Brauer  writes:

> I am deeply puzzled now.
>
> 1. I like Keita's patch because it results in filling with a much
>better indenting.
>
> 2. But, are you saying the price for this is that auto-filling is
>disabled and I have to deal with very long equations myself? Why
>is this so? I'd rather would like to have nice indentation and
>auto-filling. Rational: more and more (No emacs) users use editor
>that support virtual filling and that results in long equation.
>It is true that virtual-auto-fill-mode (available in MELPA) is quite
>good, but I still prefer good all breaks at 70 chars, and
>therefore auto-fill-mode

I'm not sure if we're talking about the same thing.  Docstring of
`LaTeX-indent-environment-list' says:

,[ C-h v LaTeX-indent-environment-list RET ]
| LaTeX-indent-environment-list is a variable defined in ‘latex.el’.
| 
| Alist of environments with special indentation.
| The second element in each entry is the function to calculate the
| indentation level in columns.
| 
| Environments present in this list are not filled by filling
| functions, see ‘LaTeX-fill-region-as-paragraph’.
| 
|   You can customize this variable.
| 
| Value:
| (("verbatim" current-indentation)
|  ("verbatim*" current-indentation)
|  ("filecontents" current-indentation)
|  ("filecontents*" current-indentation)
|  ("tabular" LaTeX-indent-tabular)
|  ("tabular*" LaTeX-indent-tabular)
|  ("array" LaTeX-indent-tabular)
|  ("eqnarray" LaTeX-indent-tabular)
|  ("eqnarray*" LaTeX-indent-tabular)
|  ("displaymath")
|  ("equation")
|  ("picture")
|  ("tabbing"))
`

and the one for `LaTeX-fill-region-as-paragraph' says:

,[ C-h f LaTeX-fill-region-as-paragraph RET ]
| LaTeX-fill-region-as-paragraph is an interactive native compiled Lisp
| function in ‘latex.el’.
| 
| (LaTeX-fill-region-as-paragraph FROM TO  JUSTIFY-FLAG)
| 
| Fill region as one paragraph.
| Break lines to fit ‘fill-column’, but leave all lines ending with
| \\ (plus its optional argument) alone.  Lines with code
| comments and lines ending with ‘\par’ are included in filling but
| act as boundaries.  Prefix arg means justify too.  From program,
| pass args FROM, TO and JUSTIFY-FLAG.
| 
| You can disable filling inside a specific environment by adding
| it to ‘LaTeX-indent-environment-list’, only indentation is
| performed in that case.
| 
`

Now take this small example:

  \documentclass[a4paper]{article}
  \begin{document}
  \begin{equation}
a
a
a
a
  \end{equation}
  \end{document}
  %%% Local Variables:
  %%% mode: latex
  %%% TeX-master: t
  %%% End:

Put the point inside the equation environment and hit 'M-q', nothing
happens.  When you type in material, there is a line-wrapping at
`fill-column', but that's all.

So basically this is what happens with Keita's patch: line-wrapping will
happen when you enter math, but hitting 'M-q' later is disabled.
Hitting 'TAB' will adjust the indentation of a line, but there is no
filling.  And there is a comment in `LaTeX-indent-environment-list':

 ;; The following should have their own, smart indentation function.
 ;; Some other day.
 ("displaymath")
 ("equation")
 ("picture")
 ("tabbing"))

Best, Arash



bug#28405: Adding entries to LaTeX-indent-environment-list

2022-02-01 Thread Uwe Brauer

> Hi Keita,
> Ikumi Keita  writes:


> Thanks for raising this inconsistency.  My vote is to harmonize this and
> add all math environments to `LaTeX-indent-environment-list',
> i.e. disabling filling.  Then the question is how a user can control the
> custom variable when we add entries to it as a style is loaded like in
> your patch above?  For example, how can I decide here that "multline"
> shouldn't be in that variable?  Or am I missing something?

I am deeply puzzled now.

1. I like Keita's patch because it results in filling with a much
   better indenting.

2. But, are you saying the price for this is that auto-filling is
   disabled and I have to deal with very long equations myself? Why
   is this so? I'd rather would like to have nice indentation and
   auto-filling. Rational: more and more (No emacs) users use editor
   that support virtual filling and that results in long equation.
   It is true that virtual-auto-fill-mode (available in MELPA) is quite
   good, but I still prefer good all breaks at 70 chars, and
   therefore auto-fill-mode

Uwe 


smime.p7s
Description: S/MIME cryptographic signature
___
bug-auctex mailing list
bug-auctex@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-auctex


Re: bug#28405: Adding entries to LaTeX-indent-environment-list

2022-02-01 Thread Uwe Brauer

> Hi Keita,
> Ikumi Keita  writes:


> Thanks for raising this inconsistency.  My vote is to harmonize this and
> add all math environments to `LaTeX-indent-environment-list',
> i.e. disabling filling.  Then the question is how a user can control the
> custom variable when we add entries to it as a style is loaded like in
> your patch above?  For example, how can I decide here that "multline"
> shouldn't be in that variable?  Or am I missing something?

I am deeply puzzled now.

1. I like Keita's patch because it results in filling with a much
   better indenting.

2. But, are you saying the price for this is that auto-filling is
   disabled and I have to deal with very long equations myself? Why
   is this so? I'd rather would like to have nice indentation and
   auto-filling. Rational: more and more (No emacs) users use editor
   that support virtual filling and that results in long equation.
   It is true that virtual-auto-fill-mode (available in MELPA) is quite
   good, but I still prefer good all breaks at 70 chars, and
   therefore auto-fill-mode

Uwe 


smime.p7s
Description: S/MIME cryptographic signature


bug#28405: Adding entries to LaTeX-indent-environment-list

2022-02-01 Thread Arash Esbati
Uwe Brauer  writes:

> I am deeply puzzled now.
>
> 1. I like Keita's patch because it results in filling with a much
>better indenting.
>
> 2. But, are you saying the price for this is that auto-filling is
>disabled and I have to deal with very long equations myself? Why
>is this so? I'd rather would like to have nice indentation and
>auto-filling. Rational: more and more (No emacs) users use editor
>that support virtual filling and that results in long equation.
>It is true that virtual-auto-fill-mode (available in MELPA) is quite
>good, but I still prefer good all breaks at 70 chars, and
>therefore auto-fill-mode

I'm not sure if we're talking about the same thing.  Docstring of
`LaTeX-indent-environment-list' says:

,[ C-h v LaTeX-indent-environment-list RET ]
| LaTeX-indent-environment-list is a variable defined in ‘latex.el’.
| 
| Alist of environments with special indentation.
| The second element in each entry is the function to calculate the
| indentation level in columns.
| 
| Environments present in this list are not filled by filling
| functions, see ‘LaTeX-fill-region-as-paragraph’.
| 
|   You can customize this variable.
| 
| Value:
| (("verbatim" current-indentation)
|  ("verbatim*" current-indentation)
|  ("filecontents" current-indentation)
|  ("filecontents*" current-indentation)
|  ("tabular" LaTeX-indent-tabular)
|  ("tabular*" LaTeX-indent-tabular)
|  ("array" LaTeX-indent-tabular)
|  ("eqnarray" LaTeX-indent-tabular)
|  ("eqnarray*" LaTeX-indent-tabular)
|  ("displaymath")
|  ("equation")
|  ("picture")
|  ("tabbing"))
`

and the one for `LaTeX-fill-region-as-paragraph' says:

,[ C-h f LaTeX-fill-region-as-paragraph RET ]
| LaTeX-fill-region-as-paragraph is an interactive native compiled Lisp
| function in ‘latex.el’.
| 
| (LaTeX-fill-region-as-paragraph FROM TO  JUSTIFY-FLAG)
| 
| Fill region as one paragraph.
| Break lines to fit ‘fill-column’, but leave all lines ending with
| \\ (plus its optional argument) alone.  Lines with code
| comments and lines ending with ‘\par’ are included in filling but
| act as boundaries.  Prefix arg means justify too.  From program,
| pass args FROM, TO and JUSTIFY-FLAG.
| 
| You can disable filling inside a specific environment by adding
| it to ‘LaTeX-indent-environment-list’, only indentation is
| performed in that case.
| 
`

Now take this small example:

  \documentclass[a4paper]{article}
  \begin{document}
  \begin{equation}
a
a
a
a
  \end{equation}
  \end{document}
  %%% Local Variables:
  %%% mode: latex
  %%% TeX-master: t
  %%% End:

Put the point inside the equation environment and hit 'M-q', nothing
happens.  When you type in material, there is a line-wrapping at
`fill-column', but that's all.

So basically this is what happens with Keita's patch: line-wrapping will
happen when you enter math, but hitting 'M-q' later is disabled.
Hitting 'TAB' will adjust the indentation of a line, but there is no
filling.  And there is a comment in `LaTeX-indent-environment-list':

 ;; The following should have their own, smart indentation function.
 ;; Some other day.
 ("displaymath")
 ("equation")
 ("picture")
 ("tabbing"))

Best, Arash



___
bug-auctex mailing list
bug-auctex@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-auctex


Re: bug#28405: Adding entries to LaTeX-indent-environment-list

2022-02-01 Thread Arash Esbati
Hi Keita,

Ikumi Keita  writes:

>>> I have tweaked LaTeX-indent-environment-list and I noticed bug#28405 [1].
>>> Should we add gather and multline environments as well to
>>> LaTeX-indent-environment-list like this?
>
>>> diff --git a/style/amsmath.el b/style/amsmath.el
>>> index e3cce752..d5fb1da6 100644
>>> --- a/style/amsmath.el
>>> +++ b/style/amsmath.el
>>> @@ -154,7 +154,8 @@
>  
>>> (setq-local LaTeX-indent-environment-list
>>> (append LaTeX-indent-environment-list
>>> -   '(("equation*")
>>> +   '(("equation*") ("gather") ("gather*")
>>> + ("gathered") ("multline") ("multline*")
>>> ("align"   LaTeX-indent-tabular)
>>> ("align*"  LaTeX-indent-tabular)
>>> ("aligned" LaTeX-indent-tabular)
>
>>> Note that this fixes bug#28405 whereas it disables filling inside gather
>>> and multline environments, which might confuse some users.
>
> I have the same idea. It's confusing and inconvenient for users like us.
> However,
> 1. bug#28405 shows that there does exist users who don't think so and
>prefer filling is disabled inside math environmnets.
> 2. Filling has already been disabled in "equation", "equation*" and
>"displaymath" environments in AUCTeX. In other words, there is
>inconsistency between those envs and "gather", "multline" envs.

Thanks for raising this inconsistency.  My vote is to harmonize this and
add all math environments to `LaTeX-indent-environment-list',
i.e. disabling filling.  Then the question is how a user can control the
custom variable when we add entries to it as a style is loaded like in
your patch above?  For example, how can I decide here that "multline"
shouldn't be in that variable?  Or am I missing something?

Best, Arash



bug#28405: Adding entries to LaTeX-indent-environment-list

2022-02-01 Thread Arash Esbati
Hi Keita,

Ikumi Keita  writes:

>>> I have tweaked LaTeX-indent-environment-list and I noticed bug#28405 [1].
>>> Should we add gather and multline environments as well to
>>> LaTeX-indent-environment-list like this?
>
>>> diff --git a/style/amsmath.el b/style/amsmath.el
>>> index e3cce752..d5fb1da6 100644
>>> --- a/style/amsmath.el
>>> +++ b/style/amsmath.el
>>> @@ -154,7 +154,8 @@
>  
>>> (setq-local LaTeX-indent-environment-list
>>> (append LaTeX-indent-environment-list
>>> -   '(("equation*")
>>> +   '(("equation*") ("gather") ("gather*")
>>> + ("gathered") ("multline") ("multline*")
>>> ("align"   LaTeX-indent-tabular)
>>> ("align*"  LaTeX-indent-tabular)
>>> ("aligned" LaTeX-indent-tabular)
>
>>> Note that this fixes bug#28405 whereas it disables filling inside gather
>>> and multline environments, which might confuse some users.
>
> I have the same idea. It's confusing and inconvenient for users like us.
> However,
> 1. bug#28405 shows that there does exist users who don't think so and
>prefer filling is disabled inside math environmnets.
> 2. Filling has already been disabled in "equation", "equation*" and
>"displaymath" environments in AUCTeX. In other words, there is
>inconsistency between those envs and "gather", "multline" envs.

Thanks for raising this inconsistency.  My vote is to harmonize this and
add all math environments to `LaTeX-indent-environment-list',
i.e. disabling filling.  Then the question is how a user can control the
custom variable when we add entries to it as a style is loaded like in
your patch above?  For example, how can I decide here that "multline"
shouldn't be in that variable?  Or am I missing something?

Best, Arash



___
bug-auctex mailing list
bug-auctex@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-auctex


Re: Encoding trouble

2022-02-01 Thread Arash Esbati
Denis Bitouzé  writes:

> several years ago, I already faced the following problem and,
> unfortunately, it happened again yesterday, which made me lose quite
> some time.
>
> Let me explain myself: I had a LaTeX file encoded in latin1 that
> I wanted to encode in UTF-8. I used an external tool, in this case
> `utrac`,

I think Emacs got upset because it saw you used an external tool --
hence the punishment 

> which confirmed the starting (latin1) and ending (UTF-8)
> encoding. But, when I opened this file in Emacs with AUCTeX enabled,
> the accented characters were wrong and it was only when I saw that the
> file contained `usepackage[latin1]{inputenc}` that I understood where
> the problem came from: changing it in `usepackage[utf8]{inputenc}`
> solved it.

I'm not even sure that AUCTeX has code to deal with a .tex file which
already contains \usepackage[]{inputenc}.  The only thing I'm aware
of is when you type 'C-c C-m usepackage RET inputenc RET ENC RET' that
AUCTeX changes the file encoding acc. to chose ENC.

> So, here is my request: would it be possible that, for the detection of
> the real encoding of the file, AUCTeX relies not on the `inputenc`
> package option, but rather on the Emacs heuristics and that, in case of
> discrepancy between the two, it issues a warning?

Have a look at the variable `file-coding-system-alist'.  If you don't
want automatic conversion based on 'inputenc', remove the entry

 ("\\.\\(tex\\|ltx\\|dtx\\|drv\\)\\'" . latexenc-find-file-coding-system)

Maybe that helps.

Best, Arash




bug#28405: Adding entries to LaTeX-indent-environment-list

2022-02-01 Thread Uwe Brauer
>>> "IK" == Ikumi Keita  writes:

> [ Added 28...@debbugs.gnu.org to Cc: ]
>> Uwe Brauer  writes:
> "IK" == Ikumi Keita  writes:
>>> Hi all,
 Ikumi Keita  writes:
>>> Thanks for the check. I installed the enhanced fix into the git
>>> repository.

>>> I have tweaked LaTeX-indent-environment-list and I noticed bug#28405 [1].
>>> Should we add gather and multline environments as well to
>>> LaTeX-indent-environment-list like this?

>>> diff --git a/style/amsmath.el b/style/amsmath.el
>>> index e3cce752..d5fb1da6 100644
>>> --- a/style/amsmath.el
>>> +++ b/style/amsmath.el
>>> @@ -154,7 +154,8 @@
 
>>> (setq-local LaTeX-indent-environment-list
>>> (append LaTeX-indent-environment-list
>>> -   '(("equation*")
>>> +   '(("equation*") ("gather") ("gather*")
>>> + ("gathered") ("multline") ("multline*")
>>> ("align"   LaTeX-indent-tabular)
>>> ("align*"  LaTeX-indent-tabular)
>>> ("aligned" LaTeX-indent-tabular)

>>> Note that this fixes bug#28405 whereas it disables filling inside gather
>>> and multline environments, which might confuse some users.

>> I am confused that patches of your disable the filling inside gather and
>> multiline environments? That is to say very long lines are not filled
>> anymore?

> Yes. More precisely, auto fill still works. However, explicit filling
> invoked by M-q, C-c C-q C-e etc. is disabled.

>> Hm, I have not tried that out, but my first impression is: I'd
>> rather prefer long lines to be broken, (filled) automatically otherwise
>> it is confusing.

> I have the same idea. It's confusing and inconvenient for users like us.
> However,
> 1. bug#28405 shows that there does exist users who don't think so and
>prefer filling is disabled inside math environmnets.
> 2. Filling has already been disabled in "equation", "equation*" and
>"displaymath" environments in AUCTeX. In other words, there is
>inconsistency between those envs and "gather", "multline" envs.

Oh now I understand why I was so confused lately. 

How can I turn filling on for these environments.

Disabling filling makes my life harder 


smime.p7s
Description: S/MIME cryptographic signature
___
bug-auctex mailing list
bug-auctex@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-auctex


Re: Adding entries to LaTeX-indent-environment-list

2022-02-01 Thread Uwe Brauer
>>> "IK" == Ikumi Keita  writes:

> [ Added 28...@debbugs.gnu.org to Cc: ]
>> Uwe Brauer  writes:
> "IK" == Ikumi Keita  writes:
>>> Hi all,
 Ikumi Keita  writes:
>>> Thanks for the check. I installed the enhanced fix into the git
>>> repository.

>>> I have tweaked LaTeX-indent-environment-list and I noticed bug#28405 [1].
>>> Should we add gather and multline environments as well to
>>> LaTeX-indent-environment-list like this?

>>> diff --git a/style/amsmath.el b/style/amsmath.el
>>> index e3cce752..d5fb1da6 100644
>>> --- a/style/amsmath.el
>>> +++ b/style/amsmath.el
>>> @@ -154,7 +154,8 @@
 
>>> (setq-local LaTeX-indent-environment-list
>>> (append LaTeX-indent-environment-list
>>> -   '(("equation*")
>>> +   '(("equation*") ("gather") ("gather*")
>>> + ("gathered") ("multline") ("multline*")
>>> ("align"   LaTeX-indent-tabular)
>>> ("align*"  LaTeX-indent-tabular)
>>> ("aligned" LaTeX-indent-tabular)

>>> Note that this fixes bug#28405 whereas it disables filling inside gather
>>> and multline environments, which might confuse some users.

>> I am confused that patches of your disable the filling inside gather and
>> multiline environments? That is to say very long lines are not filled
>> anymore?

> Yes. More precisely, auto fill still works. However, explicit filling
> invoked by M-q, C-c C-q C-e etc. is disabled.

>> Hm, I have not tried that out, but my first impression is: I'd
>> rather prefer long lines to be broken, (filled) automatically otherwise
>> it is confusing.

> I have the same idea. It's confusing and inconvenient for users like us.
> However,
> 1. bug#28405 shows that there does exist users who don't think so and
>prefer filling is disabled inside math environmnets.
> 2. Filling has already been disabled in "equation", "equation*" and
>"displaymath" environments in AUCTeX. In other words, there is
>inconsistency between those envs and "gather", "multline" envs.

Oh now I understand why I was so confused lately. 

How can I turn filling on for these environments.

Disabling filling makes my life harder 


smime.p7s
Description: S/MIME cryptographic signature


Re: Encoding trouble

2022-02-01 Thread Ikumi Keita
Hi Denis,

> Denis Bitouzé  writes:
> Let me explain myself: I had a LaTeX file encoded in latin1 that
> I wanted to encode in UTF-8. I used an external tool, in this case
> `utrac`, which confirmed the starting (latin1) and ending (UTF-8)
> encoding. But, when I opened this file in Emacs with AUCTeX enabled, the
> accented characters were wrong and it was only when I saw that the file
> contained `usepackage[latin1]{inputenc}` that I understood where the
> problem came from: changing it in `usepackage[utf8]{inputenc}` solved
> it.

> So, here is my request: would it be possible that, for the detection of
> the real encoding of the file, AUCTeX relies not on the `inputenc`
> package option, but rather on the Emacs heuristics and that, in case of
> discrepancy between the two, it issues a warning?

Maybe the following two commands might help.
1. C-x RET r
,
|If you visit a file with a wrong coding system, you can correct this
| with ‘C-x  r’ (‘revert-buffer-with-coding-system’).  This visits
| the current file again, using a coding system you specify.
`

2. C-x RET c
,
|Another way to specify the coding system for a file is when you visit
| the file.  First use the command ‘C-x  c’
| (‘universal-coding-system-argument’); this command uses the minibuffer
| to read a coding system name.  After you exit the minibuffer, the
| specified coding system is used for _the immediately following command_.
| 
|So if the immediately following command is ‘C-x C-f’, for example, it
| reads the file using that coding system (and records the coding system
| for when you later save the file).  Or if the immediately following
| command is ‘C-x C-w’, it writes the file using that coding system.  When
| you specify the coding system for saving in this way, instead of with
| ‘C-x  f’, there is no warning if the buffer contains characters
| that the coding system cannot handle.
| 
|Other file commands affected by a specified coding system include
| ‘C-x i’ and ‘C-x C-v’, as well as the other-window variants of ‘C-x
| C-f’.  ‘C-x  c’ also affects commands that start subprocesses,
| including ‘M-x shell’ (*note Shell::).  If the immediately following
| command does not use the coding system, then ‘C-x  c’ ultimately
| has no effect.
`
(both quoted from info node "(emacs) Text Coding")

Regards,
Ikumi Keita



Re: Adding entries to LaTeX-indent-environment-list

2022-02-01 Thread Ikumi Keita
[ Added 28...@debbugs.gnu.org to Cc: ]

> Uwe Brauer  writes:
 "IK" == Ikumi Keita  writes:
>> Hi all,
>>> Ikumi Keita  writes:
>>> Thanks for the check. I installed the enhanced fix into the git
>>> repository.

>> I have tweaked LaTeX-indent-environment-list and I noticed bug#28405 [1].
>> Should we add gather and multline environments as well to
>> LaTeX-indent-environment-list like this?

>> diff --git a/style/amsmath.el b/style/amsmath.el
>> index e3cce752..d5fb1da6 100644
>> --- a/style/amsmath.el
>> +++ b/style/amsmath.el
>> @@ -154,7 +154,8 @@
 
>> (setq-local LaTeX-indent-environment-list
>> (append LaTeX-indent-environment-list
>> -   '(("equation*")
>> +   '(("equation*") ("gather") ("gather*")
>> + ("gathered") ("multline") ("multline*")
>> ("align"   LaTeX-indent-tabular)
>> ("align*"  LaTeX-indent-tabular)
>> ("aligned" LaTeX-indent-tabular)

>> Note that this fixes bug#28405 whereas it disables filling inside gather
>> and multline environments, which might confuse some users.

> I am confused that patches of your disable the filling inside gather and
> multiline environments? That is to say very long lines are not filled
> anymore?

Yes. More precisely, auto fill still works. However, explicit filling
invoked by M-q, C-c C-q C-e etc. is disabled.

> Hm, I have not tried that out, but my first impression is: I'd
> rather prefer long lines to be broken, (filled) automatically otherwise
> it is confusing.

I have the same idea. It's confusing and inconvenient for users like us.
However,
1. bug#28405 shows that there does exist users who don't think so and
   prefer filling is disabled inside math environmnets.
2. Filling has already been disabled in "equation", "equation*" and
   "displaymath" environments in AUCTeX. In other words, there is
   inconsistency between those envs and "gather", "multline" envs.

Hence I think we should discuss what to do with users of various ideas.

Regards,
Ikumi Keita

>> [1] https://debbugs.gnu.org/cgi/bugreport.cgi?bug=28405



bug#28405: Adding entries to LaTeX-indent-environment-list

2022-02-01 Thread Ikumi Keita
[ Added 28...@debbugs.gnu.org to Cc: ]

> Uwe Brauer  writes:
 "IK" == Ikumi Keita  writes:
>> Hi all,
>>> Ikumi Keita  writes:
>>> Thanks for the check. I installed the enhanced fix into the git
>>> repository.

>> I have tweaked LaTeX-indent-environment-list and I noticed bug#28405 [1].
>> Should we add gather and multline environments as well to
>> LaTeX-indent-environment-list like this?

>> diff --git a/style/amsmath.el b/style/amsmath.el
>> index e3cce752..d5fb1da6 100644
>> --- a/style/amsmath.el
>> +++ b/style/amsmath.el
>> @@ -154,7 +154,8 @@
 
>> (setq-local LaTeX-indent-environment-list
>> (append LaTeX-indent-environment-list
>> -   '(("equation*")
>> +   '(("equation*") ("gather") ("gather*")
>> + ("gathered") ("multline") ("multline*")
>> ("align"   LaTeX-indent-tabular)
>> ("align*"  LaTeX-indent-tabular)
>> ("aligned" LaTeX-indent-tabular)

>> Note that this fixes bug#28405 whereas it disables filling inside gather
>> and multline environments, which might confuse some users.

> I am confused that patches of your disable the filling inside gather and
> multiline environments? That is to say very long lines are not filled
> anymore?

Yes. More precisely, auto fill still works. However, explicit filling
invoked by M-q, C-c C-q C-e etc. is disabled.

> Hm, I have not tried that out, but my first impression is: I'd
> rather prefer long lines to be broken, (filled) automatically otherwise
> it is confusing.

I have the same idea. It's confusing and inconvenient for users like us.
However,
1. bug#28405 shows that there does exist users who don't think so and
   prefer filling is disabled inside math environmnets.
2. Filling has already been disabled in "equation", "equation*" and
   "displaymath" environments in AUCTeX. In other words, there is
   inconsistency between those envs and "gather", "multline" envs.

Hence I think we should discuss what to do with users of various ideas.

Regards,
Ikumi Keita

>> [1] https://debbugs.gnu.org/cgi/bugreport.cgi?bug=28405



___
bug-auctex mailing list
bug-auctex@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-auctex