bug#28405: Adding entries to LaTeX-indent-environment-list
> 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
bug#28405: Adding entries to LaTeX-indent-environment-list
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 &optional 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
bug#28405: Adding entries to LaTeX-indent-environment-list
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
bug#28405: Adding entries to LaTeX-indent-environment-list
>>> "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
bug#28405: Adding entries to LaTeX-indent-environment-list
[ 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