GNU bug report logs -
#54949
13.1.2; Indentation for matrix environments
Previous Next
Reported by: Robert Morelli <morelli <at> flux.utah.edu>
Date: Fri, 15 Apr 2022 08:39:01 UTC
Severity: normal
Found in version 13.1.2
Done: Arash Esbati <arash <at> gnu.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 54949 in the body.
You can then email your comments to 54949 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-auctex <at> gnu.org
:
bug#54949
; Package
auctex
.
(Fri, 15 Apr 2022 08:39:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Robert Morelli <morelli <at> flux.utah.edu>
:
New bug report received and forwarded. Copy sent to
bug-auctex <at> gnu.org
.
(Fri, 15 Apr 2022 08:39:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
The only way I can get the indentation to work with matrix environments
like matrix, bmatrix, etc. is to start the line with \begin{matrix}. For
instance, putting:
Let $E = \begin{bmatrix}
1 & 0\\
0 & 1
\end{bmatrix}$ be the
identity matrix.
results in the indentation being offset for the remainder of the file.
Emacs : GNU Emacs 28.1 (build 1, x86_64-apple-darwin18.7.0, NS
appkit-1671.60 Version 10.14.6 (Build 18G95))
of 2022-04-04
Package: 13.1.2
current state:
==============
State could not be dumped due to the following error:
(void-function ,)
You should still send this bug report.
--
Robert Morelli
Department of Mathematics
Salt Lake Community College
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#54949
; Package
auctex
.
(Fri, 15 Apr 2022 14:51:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 54949 <at> debbugs.gnu.org (full text, mbox):
Hi Robert,
>>>>> Robert Morelli <morelli <at> flux.utah.edu> writes:
> The only way I can get the indentation to work with matrix environments
> like matrix, bmatrix, etc. is to start the line with \begin{matrix}. For
> instance, putting:
> Let $E = \begin{bmatrix}
> 1 & 0\\
> 0 & 1
> \end{bmatrix}$ be the
> identity matrix.
> results in the indentation being offset for the remainder of the file.
That's an effect of recent AUCTeX update, which indents matrix-like
environments by the same rule as tabular-like environments. Please
disable that behavior by customizing `LaTeX-indent-environment-list' to
remove entries of matrix-like environments.
Regards,
Ikumi Keita
#StandWithUkraine #StopWarInUkraine
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#54949
; Package
auctex
.
(Fri, 15 Apr 2022 21:19:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 54949 <at> debbugs.gnu.org (full text, mbox):
For me, this seems problematic.
1. It is common to use matrix environments in mathematical writing
inline, rather than displayed.
2. It is quite unexpected that indentation for an environment persists
to the end of the file, even after the environment has ended. This seems
to break the expectation that indentation reflects the compositional
structure of a document.
3. Asking an end user to modify a variable like
LaTeX-indent-environment-list puts an unwanted burden on the user. There
are potentially many ways to remove an element from a list. One way is
through the customization interface. Like many Emacs users, I avoid the
customization interface because I find it awkward to us, and it creates
two potentially conflicting sources of modifying Emacs behavior if you
also use an init file.
4. If the variable is programmatically changed in the init file, it in
turn raises the question of how to do so. There are potentially many
ways. Some might be safer than others, or easier. What is being removed
is itself a list, and there are a number of such elements.
5. If I modify the variable in my init file, I potentially lose future
improvements to AUCTeX's indentation algorithms. To avoid that, I would
have to recheck with each update of AUCTeX what new features are in the
default. Remember, AUCTeX is one of more than 100 packages I have
installed in Emacs.
6. Like most people, I'm very busy. I don't have time to create a mini
project out of investigating how to modify a single variable in a single
one of the 100+ packages I use in my text editor, which is one of dozens
of programs I use on my computer, which is only a part of my life. In
the big scheme of things, it would be foolish of me to spend more time
on LaTeX-indent-environment-list, so the simplest solution for me is
probably to regress AUCTeX, if I can do that easily.
--
Robert Morelli
Department of Mathematics
Salt Lake Community College
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#54949
; Package
auctex
.
(Sun, 17 Apr 2022 11:12:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 54949 <at> debbugs.gnu.org (full text, mbox):
Hi Robert,
Thanks for your comments, I understand what you expect: "AUCTeX should
be smart enough about indentation." :-)
However, it is very difficult to find out the "correct" indentation in
all cases. Thus AUCTeX actually uses only limited set of heuristics. In
particular, it assumes that there are only whitespaces between
\begin{xxx} and its beginning of line; this avoids that the amount of
computation of indentation goes beyond practical degree of complexity.
>>>>> Robert Morelli <morelli <at> flux.utah.edu> writes:
> 2. It is quite unexpected that indentation for an environment persists
> to the end of the file, even after the environment has ended. This
> seems to break the expectation that indentation reflects the
> compositional structure of a document.
Yeah. But it would be rather inefficient to re-calculate the indent
every time that an environment ends, which needs to find out the
corresponding \begin{xxx} skipping back over all potential inner nested
\begin-\end pairs, especially when indenting region with wide span.
(...but I began to feel that that idea isn't much bad. Maybe I try to
implement such behavior when I have spare time.)
> 1. It is common to use matrix environments in mathematical writing
> inline, rather than displayed.
Well, it isn't the matter of inline v.s. displayed style. LaTeX typesets
the following inline math expression without any problems:
----------------------------------------------------------------------
Let $E =
\begin{bmatrix}
1 & 0\\
0 & 1
\end{bmatrix}
$ be the identity matrix.
----------------------------------------------------------------------
Hence I expect you won't suffer from the heuristics that \begin{xxx}
stands on its own dedicated line as long as you enter environments by
C-c C-e in AUCTeX, because C-c C-e always put \begin{xxx} and \end{xxx}
on their own dedicated lines (except possible comment prefix).
If I understand correctly, this issue is only problematic for users who
frequently receive LaTeX documents written by other persons and compose
those into one large document, adapting the components accordingly. I
suppose you are in such a position, perhaps an editor of proceedings of
some math conferences?
Actually, reports about similar shortcoming in AUCTeX recurred recently:
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=28405#41
https://lists.gnu.org/r/auctex-devel/2022-02/msg00014.html
We haven't come up with a satisfactory solution for manuscripts which
don't conform to AUCTeX heuristics with respect to indentation.
> 3. Asking an end user to modify a variable like
> LaTeX-indent-environment-list puts an unwanted burden on the user.
> There are potentially many ways to remove an element from a list. One
> way is through the customization interface. Like many Emacs users, I
> avoid the customization interface because I find it awkward to us,
Sorry, what I had in mind was that awkward method. It's really awkward
since the default value contains dozens of matrix-like environments.
Currently I don't have good idea what to do about that tediousness. :-(
> 6. Like most people, I'm very busy. I don't have time to create a mini
> project out of investigating how to modify a single variable in a
> single one of the 100+ packages I use in my text editor, which is one
> of dozens of programs I use on my computer, which is only a part of my
> life. In the big scheme of things, it would be foolish of me to spend
> more time on LaTeX-indent-environment-list, so the simplest solution
> for me is probably to regress AUCTeX, if I can do that easily.
> 5. If I modify the variable in my init file, I potentially lose future
> improvements to AUCTeX's indentation algorithms.
Then you are expecting to have improvements to AUCTeX. The update in
`LaTeX-indent-environment-list' is one of such improvements, which
aligns "&" sign vertically in suitable environments. So your
inconvenience is someone's benefit. It's inevitable to have sometimes
such unfortunate conflicts as long as you are expecting to experience
improvements to AUCTeX.
Regards,
Ikumi Keita
#StandWithUkraine #StopWarInUkraine
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#54949
; Package
auctex
.
(Mon, 18 Apr 2022 06:25:01 GMT)
Full text and
rfc822 format available.
Message #17 received at 54949 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Thank you for you prompt replies.
For the reasons I've already stated, I've decided my best course at this
point is to revert to an earlier version of AUCTeX, (perhaps the last
12.x version?), and otherwise freeze all Emacs packages at their current
versions, and revert Emacs to 27.x. Reverting Emacs has been easy, but I
don't know how to get back to AUCTeX 12.x. If you can suggest how I can
do this, I would be grateful.
If I may further comment, I do not agree with backwards incompatible
changes in the behavior of Emacs or its packages. It is my opinion that
Emacs development from this point forward should transition to legacy
mode, with bug fixes and adaptations to OS upgrades, but with no further
changes in behavior. New development should be diverted to using
cross-editor technologies like language server protocol, and widely used
non-proprietary programming languages like Javascript.
Those few of us who are still using Emacs are not eager to invest time
adapting to new and potentially problematic behaviors, especially since
almost all of us are probably already transitioning to other editors.
If I may suggest, I would be happy to have the functionality of AUCTeX
available in alternative editors. I think this would be welcomed by a
much larger group of potential users than Emacs will likely ever again have.
--
Robert Morelli
Department of Mathematics
Salt Lake Community College
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#54949
; Package
auctex
.
(Mon, 18 Apr 2022 12:45:01 GMT)
Full text and
rfc822 format available.
Message #20 received at 54949 <at> debbugs.gnu.org (full text, mbox):
Hi Robert,
>>>>> Robert Morelli <morelli <at> flux.utah.edu> writes:
> For the reasons I've already stated, I've decided my best course at
> this point is to revert to an earlier version of AUCTeX, (perhaps the
> last 12.x version?), and otherwise freeze all Emacs packages at their
> current versions, and revert Emacs to 27.x. Reverting Emacs has been
> easy, but I don't know how to get back to AUCTeX 12.x. If you can
> suggest how I can do this, I would be grateful.
I suppose the following prescreption would work:
1. Delete the current AUCTeX by M-x package-delete RET auctex-13.1.2 RET
2. Download one of the package files from
https://elpa.gnu.org/packages/auctex.html
and decompress it to obtain tar file.
3. Restart emacs session and specify the tar file as the argument for
M-x package-install-file RET
Please let us know if it doesn't.
> If I may further comment, I do not agree with backwards incompatible
> changes in the behavior of Emacs or its packages. It is my opinion
> that Emacs development from this point forward should transition to
> legacy mode, with bug fixes and adaptations to OS upgrades, but with
> no further changes in behavior.
There is another LaTeX mode called YaTeX (Yet Another TeX mode for
Emacs) available from MELPA, documents of which are available at
https://www.yatex.org/ . I'd recommend to taste it because YaTeX tries
very hard to keep backward compatibility; for example, it still works
on emacs 19.
Regards,
Ikumi Keita
#StandWithUkraine #StopWarInUkraine
Reply sent
to
Arash Esbati <arash <at> gnu.org>
:
You have taken responsibility.
(Tue, 19 Apr 2022 12:03:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
Robert Morelli <morelli <at> flux.utah.edu>
:
bug acknowledged by developer.
(Tue, 19 Apr 2022 12:03:02 GMT)
Full text and
rfc822 format available.
Message #25 received at 54949-done <at> debbugs.gnu.org (full text, mbox):
Robert Morelli <morelli <at> flux.utah.edu> writes:
> Reverting Emacs has been easy, but I don't know how to get back to
> AUCTeX 12.x. If you can suggest how I can do this, I would be
> grateful.
The recipe provided in the other response should work, it is also
described here[1].
> It is my opinion that Emacs development from this point forward should
> transition to legacy mode, with bug fixes and adaptations to OS
> upgrades, but with no further changes in behavior.
I suggest you take this comment to emacs-devel <at> gnu.org if you want to
discuss it seriously with the Emacs maintainers.
> New development should be diverted to using cross-editor technologies
> like language server protocol,
You can use LSP servers with Emacs through one of these clients:
• https://github.com/joaotavora/eglot
• https://github.com/emacs-lsp/lsp-mode
> Those few of us who are still using Emacs are not eager to invest time
> adapting to new and potentially problematic behaviors, especially
> since almost all of us are probably already transitioning to other
> editors.
>
> If I may suggest, I would be happy to have the functionality of AUCTeX
> available in alternative editors. I think this would be welcomed by a
> much larger group of potential users than Emacs will likely ever again
> have.
As always, this means that someone(™) has to do the job. AUCTeX's
source code is available, if that someone wants to get an idea how it's
done in elisp.
I don't see we're discussing a bug, hence I'm closing this report.
Please feel free to re-open if a bug discussion will happen.
Best, Arash
Footnotes:
[1] https://www.emacswiki.org/emacs/ELPA#h5o-10
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Wed, 18 May 2022 11:24:06 GMT)
Full text and
rfc822 format available.
bug unarchived.
Request was from
Ikumi Keita <ikumi <at> ikumi.que.jp>
to
control <at> debbugs.gnu.org
.
(Thu, 14 Sep 2023 05:40:01 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#54949
; Package
auctex
.
(Thu, 14 Sep 2023 05:48:02 GMT)
Full text and
rfc822 format available.
Message #32 received at 54949 <at> debbugs.gnu.org (full text, mbox):
Hi Robert,
I think the latest commit to the AUCTeX git repository addresses this
issue. Please give it a try if you are still interested in this topic.
Regards,
Ikumi Keita
#StandWithUkraine #StopWarInUkraine
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Thu, 12 Oct 2023 11:24:15 GMT)
Full text and
rfc822 format available.
This bug report was last modified 1 year and 211 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.