Package: auctex;
Reported by: Uwe Brauer <oub <at> mat.ucm.es>
Date: Fri, 25 Oct 2024 08:32:01 UTC
Severity: normal
Found in version 14.0.6.2024
To reply to this bug, email your comments to 74009 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
View this report as an mbox folder, status mbox, maintainer mbox
bug-auctex <at> gnu.org
:bug#74009
; Package auctex
.
(Fri, 25 Oct 2024 08:32:01 GMT) Full text and rfc822 format available.Uwe Brauer <oub <at> mat.ucm.es>
:bug-auctex <at> gnu.org
.
(Fri, 25 Oct 2024 08:32:01 GMT) Full text and rfc822 format available.Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
From: Uwe Brauer <oub <at> mat.ucm.es> To: bug-auctex <at> gnu.org Subject: 14.0.6.2024-10-22_10:04:26; LaTeX-fill-environment does strange things when % is present Date: Fri, 25 Oct 2024 10:31:04 +0200
Hi all Please consider --8<---------------cut here---------------start------------->8--- \begin{definition}[homotopy relation on 1-simplices]\label{defn:1-simplex-htpy} \uses{defn:simplicial-set} A parallel pair of 1-sim\-plices $f,g$ in a simplicial set $X$ are \textbf{homotopic} if there exists a 2-simplex whose boundary takes either of the following forms\footnote{The symbol ``$=$'' is used in diagrams to denote a degenerate simplex or an identity arrow.} %\footnote{The symbol ``$\!\!\!\!\!\begin{tikzcd}[ampersand replacement=\&, sep=small] ~\arrow[r, equals] \& ~ \end{tikzcd}\!\!\!\!\!$'' is used in diagrams to denote a degenerate simplex or an identity arrow.} \begin{center} \begin{tikzcd}[row sep=small, column sep=small] & y \arrow[dr, equals] & && & x \arrow[dr, "f"] \\ x \arrow[ur, "f"] \arrow[rr, "g"'] & & y & & x \arrow[ur, equals] \arrow[rr, "g"'] & & y \end{tikzcd} \end{center} or if $f$ and $g$ are in the same equivalence class generated by this relation. \end{definition} --8<---------------cut here---------------end--------------->8--- running LaTeX-fill-environment results in formatting environment 41% I have to interrupt with C-g and obtain \begin{definition}[homotopy relation on 1-simplices]\label{defn:1-simplex-htpy} \uses{defn:simplicial-set} A parallel pair of 1-sim\-plices $f,g$ in a simplicial set $X$ are \textbf{homotopic} if there exists a 2-simplex whose boundary takes either of the following forms\footnote{The symbol ``$=$'' is used in diagrams to denote a degenerate simplex or an identity arrow.} % \footnote{The symbol % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % ``$\!\!\!\!\!\begin{tikzcd}[ampersand replacement=\&, sep=small] ~\arrow[r, equals] \& ~ \end{tikzcd}\!\!\!\!\!$'' is used in diagrams to denote a degenerate simplex or an identity arrow.} \begin{center} \begin{tikzcd}[row sep=small, column sep=small] & y \arrow[dr, equals] & && & x \arrow[dr, "f"] \\ x \arrow[ur, "f"] \arrow[rr, "g"'] & & y & & x \arrow[ur, equals] \arrow[rr, "g"'] & & y \end{tikzcd} \end{center} or if $f$ and $g$ are in the same equivalence class generated by this relation. \end{definition} It could have been much longer because I think emacs entered a infinite loop. Any ideas? Regards Uwe Brauer Emacs : GNU Emacs 29.4 (build 1, x86_64-pc-linux-gnu, X toolkit, cairo version 1.18.0, Xaw3d scroll bars) of 2024-09-03 Package: 14.0.6.2024-10-22_10:04:26 current state: ============== (setq window-system 'x LaTeX-version "2e" TeX-style-path '("/home/oub/emacs/site-lisp/packages/auctex-git/auctex/style" "auto" "style" "/home/oub/ALLES/emacs/site-lisp/auctex-private-style") TeX-auto-save t TeX-parse-self t TeX-master t TeX-command-list '(("TeX" "%(PDF)%(tex) %(file-line-error) %`%(extraopts) %S%(PDFout)%(mode)%' %(output-dir) %t" TeX-run-TeX nil (plain-tex-mode texinfo-mode ams-tex-mode) :help "Run plain TeX") ("LaTeX" "%`%l%(mode)%' %T" TeX-run-TeX nil (latex-mode doctex-mode) :help "Run LaTeX") ("Makeinfo" "makeinfo %(extraopts) %(o-dir) %t" TeX-run-compile nil (texinfo-mode) :help "Run Makeinfo with Info output") ("Makeinfo HTML" "makeinfo %(extraopts) %(o-dir) --html %t" TeX-run-compile nil (texinfo-mode) :help "Run Makeinfo with HTML output") ("AmSTeX" "amstex %(PDFout) %`%(extraopts) %S%(mode)%' %(output-dir) %t" TeX-run-TeX nil (ams-tex-mode) :help "Run AMSTeX") ("ConTeXt" "%(cntxcom) --once --texutil %(extraopts) %(execopts)%t" TeX-run-TeX nil (context-mode) :help "Run ConTeXt once") ("ConTeXt Full" "%(cntxcom) %(extraopts) %(execopts)%t" TeX-run-TeX nil (context-mode) :help "Run ConTeXt until completion") ("BibTeX" "bibtex %(O?aux)" TeX-run-BibTeX nil (plain-tex-mode latex-mode doctex-mode context-mode texinfo-mode ams-tex-mode) :help "Run BibTeX") ("Biber" "biber %(output-dir) %s" TeX-run-Biber nil (plain-tex-mode latex-mode doctex-mode texinfo-mode ams-tex-mode) :help "Run Biber") ("Texindex" "texindex %s.??" TeX-run-command nil (texinfo-mode) :help "Run Texindex") ("Texi2dvi" "%(PDF)texi2dvi %t" TeX-run-command nil (texinfo-mode) :help "Run Texi2dvi or Texi2pdf") ("View" "%V" TeX-run-discard-or-function t t :help "Run Viewer") ("Print" "%p" TeX-run-command t t :help "Print the file") ("Queue" "%q" TeX-run-background nil t :help "View the printer queue" :visible TeX-queue-command) ("File" "%(o?)dvips %d -o %f " TeX-run-dvips t (plain-tex-mode latex-mode doctex-mode texinfo-mode ams-tex-mode) :help "Generate PostScript file") ("Dvips" "%(o?)dvips %d -o %f " TeX-run-dvips nil (plain-tex-mode latex-mode doctex-mode texinfo-mode ams-tex-mode) :help "Convert DVI file to PostScript") ("Dvipdfmx" "dvipdfmx -o %(O?pdf) %d" TeX-run-dvipdfmx nil (plain-tex-mode latex-mode doctex-mode texinfo-mode ams-tex-mode) :help "Convert DVI file to PDF with dvipdfmx") ("Ps2pdf" "ps2pdf %f %(O?pdf)" TeX-run-ps2pdf nil (plain-tex-mode latex-mode doctex-mode texinfo-mode ams-tex-mode) :help "Convert PostScript file to PDF") ("Glossaries" "makeglossaries %(d-dir) %s" TeX-run-command nil (plain-tex-mode latex-mode doctex-mode texinfo-mode ams-tex-mode) :help "Run makeglossaries to create glossary file") ("Index" "makeindex %(O?idx)" TeX-run-index nil (plain-tex-mode latex-mode doctex-mode texinfo-mode ams-tex-mode) :help "Run makeindex to create index file") ("upMendex" "upmendex %(O?idx)" TeX-run-index t (plain-tex-mode latex-mode doctex-mode texinfo-mode ams-tex-mode) :help "Run upmendex to create index file") ("Xindy" "texindy %s" TeX-run-command nil (plain-tex-mode latex-mode doctex-mode texinfo-mode ams-tex-mode) :help "Run xindy to create index file") ("Check" "lacheck %s" TeX-run-compile nil (latex-mode) :help "Check LaTeX file for correctness") ("ChkTeX" "chktex -v6 %s" TeX-run-compile nil (latex-mode) :help "Check LaTeX file for common mistakes") ("Spell" "(TeX-ispell-document \"\")" TeX-run-function nil t :help "Spell-check the document") ("Clean" "TeX-clean" TeX-run-function nil t :help "Delete generated intermediate files") ("Clean All" "(TeX-clean t)" TeX-run-function nil t :help "Delete generated intermediate and output files") ("Other" "" TeX-run-command t t :help "Run an arbitrary command") ("evince-new" "/usr/local/bin/evince %o" TeX-run-command t t) ) ) -- I strongly condemn Hamas heinous despicable pogroms/atrocities on Israel I strongly condemn Putin's war of aggression against Ukraine. I support to deliver weapons to Ukraine's military. I support the EU and NATO membership of Ukraine.
bug-auctex <at> gnu.org
:bug#74009
; Package auctex
.
(Tue, 29 Oct 2024 17:24:02 GMT) Full text and rfc822 format available.Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):
From: Arash Esbati <arash <at> gnu.org> To: Uwe Brauer via bug-auctex via Bug reporting list for AUCTeX <bug-auctex <at> gnu.org> Cc: Uwe Brauer <oub <at> mat.ucm.es>, 74009 <at> debbugs.gnu.org Subject: Re: bug#74009: 14.0.6.2024-10-22_10:04:26; LaTeX-fill-environment does strange things when % is present Date: Tue, 29 Oct 2024 18:23:32 +0100
Uwe Brauer via bug-auctex via Bug reporting list for AUCTeX <bug-auctex <at> gnu.org> writes: > running LaTeX-fill-environment results in > formatting environment 41% I have to interrupt with C-g and obtain > > \begin{definition}[homotopy relation on > 1-simplices]\label{defn:1-simplex-htpy} > \uses{defn:simplicial-set} A parallel pair of 1-sim\-plices $f,g$ in > a simplicial set $X$ are \textbf{homotopic} if there exists a > 2-simplex whose boundary takes either of the following > forms\footnote{The symbol ``$=$'' is used in diagrams to denote a > degenerate simplex or an identity arrow.} > % \footnote{The symbol > [...] > % ``$\!\!\!\!\!\begin{tikzcd}[ampersand replacement=\&, sep=small] ~\arrow[r, equals] \& ~ \end{tikzcd}\!\!\!\!\!$'' is used in diagrams to denote a degenerate simplex or an identity arrow.} > \begin{center} > \begin{tikzcd}[row sep=small, column sep=small] > & y \arrow[dr, equals] & && & x \arrow[dr, "f"] \\ x \arrow[ur, "f"] \arrow[rr, "g"'] & & y & & x \arrow[ur, equals] \arrow[rr, "g"'] & & y > \end{tikzcd} > \end{center} > or if $f$ and $g$ are in the same equivalence class generated by this relation. > \end{definition} > > It could have been much longer because I think emacs entered a infinite > loop. > > Any ideas? I didn't look closely, but slightly re-writting the code like this: --8<---------------cut here---------------start------------->8--- \begin{definition}[homotopy relation on 1-simplices]\label{defn:1-simplex-htpy} \uses{defn:simplicial-set} A parallel pair of 1-sim\-plices $f,g$ in a simplicial set $X$ are \textbf{homotopic} if there exists a 2-simplex whose boundary takes either of the following forms\footnote{The symbol ``$=$'' is used in diagrams to denote a degenerate simplex or an identity arrow.} % \footnote{% % The symbol ``$\!\!\!\!\!% % \begin{tikzcd}[ampersand replacement=\&, sep=small] % ~\arrow[r, equals] \& ~ % \end{tikzcd}% % \!\!\!\!\!$'' is used in diagrams to denote a degenerate simplex or an identity arrow.} \begin{center} \begin{tikzcd}[row sep=small, column sep=small] & y \arrow[dr, equals] & && & x \arrow[dr, "f"] \\ x \arrow[ur, "f"] \arrow[rr, "g"'] & & y & & x \arrow[ur, equals] \arrow[rr, "g"'] & & y \end{tikzcd} \end{center} or if $f$ and $g$ are in the same equivalence class generated by this relation. \end{definition} --8<---------------cut here---------------end--------------->8--- and running `LaTeX-fill-environment' on this gives: --8<---------------cut here---------------start------------->8--- \begin{definition}[homotopy relation on 1-simplices]\label{defn:1-simplex-htpy} \uses{defn:simplicial-set} A parallel pair of 1-sim\-plices $f,g$ in a simplicial set $X$ are \textbf{homotopic} if there exists a 2-simplex whose boundary takes either of the following forms\footnote{The symbol ``$=$'' is used in diagrams to denote a degenerate simplex or an identity arrow.} % \footnote{% The symbol ``$\!\!\!\!\!% % \begin{tikzcd}[ampersand replacement=\&, sep=small] % ~\arrow[r, equals] \& ~ % \end{tikzcd}% % \!\!\!\!\!$'' is used in diagrams to denote a degenerate simplex % or an identity arrow.} \begin{center} \begin{tikzcd}[row sep=small, column sep=small] & y \arrow[dr, equals] & && & x \arrow[dr, "f"] \\ x \arrow[ur, "f"] \arrow[rr, "g"'] & & y & & x \arrow[ur, equals] \arrow[rr, "g"'] & & y \end{tikzcd} \end{center} or if $f$ and $g$ are in the same equivalence class generated by this relation. \end{definition} --8<---------------cut here---------------end--------------->8--- So I suspect it has something to do with the placement of \begin/\end{tikzcd} in the comment. Best, Arash
bug-auctex <at> gnu.org
:bug#74009
; Package auctex
.
(Tue, 29 Oct 2024 17:24:02 GMT) Full text and rfc822 format available.bug-auctex <at> gnu.org
:bug#74009
; Package auctex
.
(Tue, 29 Oct 2024 17:34:03 GMT) Full text and rfc822 format available.Message #14 received at submit <at> debbugs.gnu.org (full text, mbox):
From: Uwe Brauer <oub <at> mat.ucm.es> To: Arash Esbati <arash <at> gnu.org> Cc: Uwe Brauer via bug-auctex via Bug reporting list for AUCTeX <bug-auctex <at> gnu.org>, 74009 <at> debbugs.gnu.org, Uwe Brauer <oub <at> mat.ucm.es> Subject: Re: bug#74009: 14.0.6.2024-10-22_10:04:26; LaTeX-fill-environment does strange things when % is present Date: Tue, 29 Oct 2024 18:33:41 +0100
[Message part 1 (text/plain, inline)]
>>> "AE" == Arash Esbati <arash <at> gnu.org> writes: > Uwe Brauer via bug-auctex via Bug reporting list for AUCTeX <bug-auctex <at> gnu.org> writes: >> running LaTeX-fill-environment results in >> formatting environment 41% I have to interrupt with C-g and obtain >> >> \begin{definition}[homotopy relation on >> 1-simplices]\label{defn:1-simplex-htpy} >> \uses{defn:simplicial-set} A parallel pair of 1-sim\-plices $f,g$ in >> a simplicial set $X$ are \textbf{homotopic} if there exists a >> 2-simplex whose boundary takes either of the following >> forms\footnote{The symbol ``$=$'' is used in diagrams to denote a >> degenerate simplex or an identity arrow.} >> % \footnote{The symbol >> [...] >> % ``$\!\!\!\!\!\begin{tikzcd}[ampersand replacement=\&, sep=small] ~\arrow[r, equals] \& ~ \end{tikzcd}\!\!\!\!\!$'' is used in diagrams to denote a degenerate simplex or an identity arrow.} >> \begin{center} >> \begin{tikzcd}[row sep=small, column sep=small] >> & y \arrow[dr, equals] & && & x \arrow[dr, "f"] \\ x \arrow[ur, "f"] \arrow[rr, "g"'] & & y & & x \arrow[ur, equals] \arrow[rr, "g"'] & & y >> \end{tikzcd} >> \end{center} >> or if $f$ and $g$ are in the same equivalence class generated by this relation. >> \end{definition} >> >> It could have been much longer because I think emacs entered a infinite >> loop. >> >> Any ideas? > I didn't look closely, but slightly re-writting the code like this: > \begin{definition}[homotopy relation on 1-simplices]\label{defn:1-simplex-htpy} > \uses{defn:simplicial-set} A parallel pair of 1-sim\-plices $f,g$ in a simplicial set $X$ are \textbf{homotopic} if there exists a 2-simplex whose boundary takes either of the following forms\footnote{The symbol ``$=$'' is used in diagrams to denote a degenerate simplex or an identity arrow.} > % \footnote{% > % The symbol ``$\!\!\!\!\!% > % \begin{tikzcd}[ampersand replacement=\&, sep=small] > % ~\arrow[r, equals] \& ~ > % \end{tikzcd}% > % \!\!\!\!\!$'' is used in diagrams to denote a degenerate simplex or an identity arrow.} > \begin{center} > \begin{tikzcd}[row sep=small, column sep=small] > & y \arrow[dr, equals] & && & x \arrow[dr, "f"] \\ x \arrow[ur, "f"] \arrow[rr, "g"'] & & y & & x \arrow[ur, equals] \arrow[rr, "g"'] & & y > \end{tikzcd} > \end{center} > or if $f$ and $g$ are in the same equivalence class generated by this relation. > \end{definition} > and running `LaTeX-fill-environment' on this gives: > \begin{definition}[homotopy relation on > 1-simplices]\label{defn:1-simplex-htpy} > \uses{defn:simplicial-set} A parallel pair of 1-sim\-plices $f,g$ in > a simplicial set $X$ are \textbf{homotopic} if there exists a > 2-simplex whose boundary takes either of the following > forms\footnote{The symbol ``$=$'' is used in diagrams to denote a > degenerate simplex or an identity arrow.} > % \footnote{% The symbol ``$\!\!\!\!\!% > % \begin{tikzcd}[ampersand replacement=\&, sep=small] > % ~\arrow[r, equals] \& ~ > % \end{tikzcd}% > % \!\!\!\!\!$'' is used in diagrams to denote a degenerate simplex > % or an identity arrow.} > \begin{center} > \begin{tikzcd}[row sep=small, column sep=small] > & y \arrow[dr, equals] & && & x \arrow[dr, "f"] \\ x \arrow[ur, > "f"] \arrow[rr, "g"'] & & y & & x \arrow[ur, equals] > \arrow[rr, "g"'] & & y > \end{tikzcd} > \end{center} > or if $f$ and $g$ are in the same equivalence class generated by > this relation. > \end{definition} > So I suspect it has something to do with the placement of > \begin/\end{tikzcd} in the comment. Hi Arash First thanks for looking into this Two comments 1. Confirmed, you are right, but 2. I receive lately a lot of latex files, with very very long lines (it seems that a lot of latex editor now support soft line wrapping), emacs still struggles I use virtual-auto-fill-mode from time to time but it is inferior than running auctex latex fill commands. So mostly I run LaTeX-fill-section on those files, and as this example indicates this can result in a sort of catastrophe since emacs becomes idle but is then silently filling the buffer with these % % lines. 3. This is why I sent this report. It might be helpful if emacs would just abort the filling process with an error message, but I am not sure how this could be implemented Regards Uwe -- I strongly condemn Hamas heinous despicable pogroms/atrocities on Israel I strongly condemn Putin's war of aggression against Ukraine. I support to deliver weapons to Ukraine's military. I support the EU and NATO membership of Ukraine.
[smime.p7s (application/pkcs7-signature, attachment)]
bug-auctex <at> gnu.org
:bug#74009
; Package auctex
.
(Tue, 29 Oct 2024 17:35:02 GMT) Full text and rfc822 format available.bug-auctex <at> gnu.org
:bug#74009
; Package auctex
.
(Tue, 29 Oct 2024 20:36:01 GMT) Full text and rfc822 format available.Message #20 received at submit <at> debbugs.gnu.org (full text, mbox):
From: Arash Esbati <arash <at> gnu.org> To: Uwe Brauer <oub <at> mat.ucm.es> Cc: Uwe Brauer via bug-auctex via Bug reporting list for AUCTeX <bug-auctex <at> gnu.org>, 74009 <at> debbugs.gnu.org Subject: Re: bug#74009: 14.0.6.2024-10-22_10:04:26; LaTeX-fill-environment does strange things when % is present Date: Tue, 29 Oct 2024 21:35:24 +0100
Uwe Brauer <oub <at> mat.ucm.es> writes: > 2. I receive lately a lot of latex files, with very very long lines > (it seems that a lot of latex editor now support soft line > wrapping), emacs still struggles I use virtual-auto-fill-mode > from time to time but it is inferior than running auctex latex > fill commands. So mostly I run LaTeX-fill-section on those files, > and as this example indicates this can result in a sort of > catastrophe since emacs becomes idle but is then silently filling > the buffer with these > % > % > lines. AUCTeX shouldn't behave like this, so we should investigate why this happens, but OTOH, AUCTeX isn't a text formatter for all sort of strange code. Maybe you want to give latexindent[1] a try and see, if it does a better job in your case. Best, Arash Footnotes: [1] https://ctan.org/pkg/latexindent
bug-auctex <at> gnu.org
:bug#74009
; Package auctex
.
(Tue, 29 Oct 2024 20:36:02 GMT) Full text and rfc822 format available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.