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

From: Arash Esbati <[email-masked]>
Date: Thu, 03 Feb 2022 21:10:55 +0100

[I've removed <[email-masked]> to reduce the X-Posting]

Ikumi Keita <[email-masked]> writes:

>>>>>> Arash Esbati <[email-masked]> writes:
>
>> I'm not sure about 1.  I haven't checked but this behavior was there
>> probably forever and we don't have a smart filling for equations w/o
>> alignment.  Do we want to pass this to Emacs standard filling rules?
>
> I think standard filling isn't so bad. It does the job mostly
> satisfactorily, at least for me.

That sounds good.

>> About 2., we're talking about these environments, right:
>
>>   ("equation*") ("gather") ("gather*")
>>   ("gathered") ("multline") ("multline*")
>
>> The reason I'm asking is I was also thinking about a third solution
>> which can be in the styles.  There, we can check if user has removed the
>> LaTeX standard environments from `LaTeX-indent-environment-list' and
>> then make a decision.  Essentially in amsmath.el:
>
>>   (when (or (assoc "equation" LaTeX-indent-environment-list)
>>             (assoc "displaymath" LaTeX-indent-environment-list))
>>    <add other environments to `LaTeX-indent-environment-list'>)
>
>> What do you think, does this make sense?
>
> Hmm, that looks a bit ad-hoc, but would work for most practical cases.
> Do you plan to have similar conditional for envs with alignment such as
> "array" and "eqnarray" as well? If so, it would be consistent and make
> sense.

After some reconsideration, I vote for putting all environments into
`LaTeX-indent-environment-list'.  This would give users and developers
the maximum flexibility -- my idea above is asking for unhappy customers
;-)

Best, Arash