GNU bug report logs - #58689
13.1.4; LaTeX-modify-environment fails to modify a single line environment.

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: auctex; Reported by: Jean-Jacques Rétorré <jj.retorre@HIDDEN>; Done: Ikumi Keita <ikumi@HIDDEN>; Maintainer for auctex is bug-auctex@HIDDEN.
bug closed, send any further explanations to 58689 <at> debbugs.gnu.org and Jean-Jacques Rétorré <jj.retorre@HIDDEN> Request was from Ikumi Keita <ikumi@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 58689 <at> debbugs.gnu.org:


Received: (at 58689) by debbugs.gnu.org; 8 Dec 2022 05:42:29 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Dec 08 00:42:28 2022
Received: from localhost ([127.0.0.1]:54450 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1p39fw-0001ar-Ln
	for submit <at> debbugs.gnu.org; Thu, 08 Dec 2022 00:42:28 -0500
Received: from smtp1a.inetd.co.jp ([210.129.88.11]:45642)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ikumi@HIDDEN>) id 1p39ft-0001af-UP
 for 58689 <at> debbugs.gnu.org; Thu, 08 Dec 2022 00:42:26 -0500
Received: from localhost (42-144-46-173.rev.home.ne.jp [42.144.46.173])
 by smtp1a.inetd.co.jp (Postfix) with ESMTPA id 161A35C;
 Thu,  8 Dec 2022 14:42:23 +0900 (JST)
From: Ikumi Keita <ikumi@HIDDEN>
To: Jean-Jacques =?UTF-8?Q?R=C3=A9torr=C3=A9?= <jj.retorre@HIDDEN>
Subject: Re: bug#58689: 13.1.4;
 LaTeX-modify-environment fails to modify a single line environment.
In-reply-to: <34361.1666538761@localhost>
References: <874jvxmhzv.fsf@charlotte> <34361.1666538761@localhost>
Comments: In-reply-to Ikumi Keita <ikumi@HIDDEN>
 message dated "Mon, 24 Oct 2022 00:26:01 +0900."
X-Mailer: MH-E 8.6+git; nmh 1.7.1; GNU Emacs 28.2
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-ID: <59655.1670478138.1@localhost>
Date: Thu, 08 Dec 2022 14:42:18 +0900
Message-ID: <59658.1670478138@localhost>
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 58689
Cc: 58689 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

>>>>> Ikumi Keita <ikumi@HIDDEN> writes:
> Looking at the relevant code, I think I can do something for
> LaTeX-modify-environment to cover the situation where \begin and \end
> are on the same line. I expect that I can have spare time to manage this
> issue on November.

I pushed the fix to the git repository. Sorry for delay due to my loose
outlook about my schedule :-)

Regards,
Ikumi Keita
#StandWithUkraine #StopWarInUkraine




Information forwarded to bug-auctex@HIDDEN:
bug#58689; Package auctex. Full text available.

Message received at 58689 <at> debbugs.gnu.org:


Received: (at 58689) by debbugs.gnu.org; 23 Oct 2022 15:26:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Oct 23 11:26:09 2022
Received: from localhost ([127.0.0.1]:46369 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1omcrZ-0004cr-0Y
	for submit <at> debbugs.gnu.org; Sun, 23 Oct 2022 11:26:09 -0400
Received: from smtp1a.inetd.co.jp ([210.129.88.11]:44932)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ikumi@HIDDEN>) id 1omcrV-0004cd-27
 for 58689 <at> debbugs.gnu.org; Sun, 23 Oct 2022 11:26:07 -0400
Received: from localhost (42-144-46-173.rev.home.ne.jp [42.144.46.173])
 by smtp1a.inetd.co.jp (Postfix) with ESMTPA id 2FAFA2D7;
 Mon, 24 Oct 2022 00:26:02 +0900 (JST)
From: Ikumi Keita <ikumi@HIDDEN>
To: Jean-Jacques =?UTF-8?Q?R=C3=A9torr=C3=A9?= <jj.retorre@HIDDEN>
Subject: Re: bug#58689: 13.1.4;
 LaTeX-modify-environment fails to modify a single line environment.
In-reply-to: <874jvxmhzv.fsf@charlotte>
References: <874jvxmhzv.fsf@charlotte>
Comments: In-reply-to Jean-Jacques =?UTF-8?Q?R=C3=A9torr=C3=A9?=
 <jj.retorre@HIDDEN>
 message dated "Fri, 21 Oct 2022 15:19:32 +0200."
X-Mailer: MH-E 8.6+git; nmh 1.7.1; GNU Emacs 28.2
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
Date: Mon, 24 Oct 2022 00:26:01 +0900
Message-ID: <34361.1666538761@localhost>
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 58689
Cc: 58689 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hi Jean-Jacques,

>>>>> Jean-Jacques R=E9torr=E9 <jj.retorre@HIDDEN> writes:
> As a MWE

> ,----
> | \documentclass{article}
> | \begin{document}
> | \begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix}
> | \end{document}
> `----

> C-u C-c C-e RET bmatrix produce

> ,----
> | \documentclass{article}
> | \begin{bmatrix}
> | \begin{pmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix}
> | \end{document}
> `----

Thank you for the report. AUCTeX assumes that \begin and \end lie on
their own lines in general, hence the behavior.

Looking at the relevant code, I think I can do something for
LaTeX-modify-environment to cover the situation where \begin and \end
are on the same line. I expect that I can have spare time to manage this
issue on November.

Regards,
Ikumi Keita
#StandWithUkraine #StopWarInUkraine




Information forwarded to bug-auctex@HIDDEN:
bug#58689; Package auctex. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 21 Oct 2022 14:40:34 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Oct 21 10:40:34 2022
Received: from localhost ([127.0.0.1]:38672 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1oltCM-0005EK-1K
	for submit <at> debbugs.gnu.org; Fri, 21 Oct 2022 10:40:34 -0400
Received: from lists.gnu.org ([209.51.188.17]:42360)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <jj.retorre@HIDDEN>) id 1olrwB-0002us-Cd
 for submit <at> debbugs.gnu.org; Fri, 21 Oct 2022 09:19:47 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <jj.retorre@HIDDEN>)
 id 1olrw9-0001IR-Ct
 for bug-auctex@HIDDEN; Fri, 21 Oct 2022 09:19:45 -0400
Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <jj.retorre@HIDDEN>)
 id 1olrw7-0002tA-Hd
 for bug-auctex@HIDDEN; Fri, 21 Oct 2022 09:19:45 -0400
Received: by mail-wr1-x433.google.com with SMTP id bv10so4831571wrb.4
 for <bug-auctex@HIDDEN>; Fri, 21 Oct 2022 06:19:42 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=content-transfer-encoding:mime-version:message-id:date:subject:to
 :from:from:to:cc:subject:date:message-id:reply-to;
 bh=xQP8eR3cX2lc/hfxLz0MGz5GyjFfM5GqQh9dG1OhIgs=;
 b=jENx8YqAGZtzE4hq9n4XpFFMYwqOJyWG8z+o8wMPK5Cn2Yw+Rht+ptn+UTCppOopgV
 tMSaH86b+CkJfUi7dO6SqaOdc48diRIOsPRYSf6gLJVOMNtP3illByCJPcCIbLs55P6j
 B7RooNd8vtY8By79v7cINjzaClHep5kM70aS8HxSe71jarsmzZJ92PWQFQQyM4zmYFFt
 eSRtcll0zCQk+G7HJO1URWVHv5m8uQUxVfen3lcPhkizqOowfsJZLTWD+LJKvgHwb973
 0Kv8J6f+DdM3Ccz01vrO3BXWECeMw4iym3S6lWyqqItjHe1TIIahdPIRmIZ0/Tdx9UY0
 NB7Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=content-transfer-encoding:mime-version:message-id:date:subject:to
 :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
 bh=xQP8eR3cX2lc/hfxLz0MGz5GyjFfM5GqQh9dG1OhIgs=;
 b=zROAYqERwV4n8YfPh6pVGGAxEyzPp/wiMmW0XsBXUXSx3pS+ka1+7PTTvbOfMfsQx2
 OjPlJ0KXFD3PuqlBC2G/3rgCWovt1NMJMtxl7yALMU8ljQ8INfe9FqSyqAKxYJhn9ho9
 vb90GjZdtNRsnt8/wico93kquMCzVouzNIWjLtXbNPkz+RrJqzfZy3B4kO/x7nZNs1zF
 VtXE+KfFvKjSRsUw6TK6X8+1jA9eOcV9n/v7mIRS4MHsl5b/r0YjYsOI1BMljAlWt/ib
 +H4tmopv+JZyNGujEgN1sTlRa8tZsBRONIJ929NPwD+X4JU5vi0bm+nYW5fXSIAkcJq9
 fCxw==
X-Gm-Message-State: ACrzQf2g29MoetXV3gV5TIgWV3jZedP4sqtIOEzThA9AJgYLskYJDzGe
 ljYmxzNT+xs+4/nfsK08YT25iz34x6g=
X-Google-Smtp-Source: AMsMyM6vGIrIPUkaXRwR4++WkxSbSBNiMfohjJsv95K6TUt8OqDmXVjxdHYHYOeutr2UYUKWC38P9A==
X-Received: by 2002:a05:6000:1ac7:b0:232:8c6c:6c4a with SMTP id
 i7-20020a0560001ac700b002328c6c6c4amr12336695wry.455.1666358380834; 
 Fri, 21 Oct 2022 06:19:40 -0700 (PDT)
Received: from charlotte ([37.169.54.244]) by smtp.gmail.com with ESMTPSA id
 g19-20020a05600c4ed300b003c409244bb0sm3038905wmq.6.2022.10.21.06.19.39
 for <bug-auctex@HIDDEN>
 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256);
 Fri, 21 Oct 2022 06:19:40 -0700 (PDT)
From: =?utf-8?Q?Jean-Jacques_R=C3=A9torr=C3=A9?= <jj.retorre@HIDDEN>
To: bug-auctex@HIDDEN
Subject: 13.1.4; LaTeX-modify-environment fails to modify a single line
 environment.
Date: Fri, 21 Oct 2022 15:19:32 +0200
Message-ID: <874jvxmhzv.fsf@charlotte>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
Received-SPF: pass client-ip=2a00:1450:4864:20::433;
 envelope-from=jj.retorre@HIDDEN; helo=mail-wr1-x433.google.com
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001,
 RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.3 (-)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Fri, 21 Oct 2022 10:40:33 -0400
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)




Emacs  : GNU Emacs 27.1 (build 1, i686-pc-linux-gnu, GTK+ Version 3.24.24, =
cairo version 1.16.0)
 of 2021-03-28, modified by Debian
Package: 13.1.4

current state:
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
(setq
 AUCTeX-date "2022-08-26"
 window-system 'x
 LaTeX-version "2e"
 TeX-style-path '("~/.emacs.d/auctex" "/home/debjjr/.emacs.d/elpa/auctex-13=
.1.4/style" "/home/debjjr/.emacs.d/auctex/auto"
                  "/home/debjjr/.emacs.d/auctex/style" "auto" "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) %s" TeX-run-BibTeX nil
                     (plain-tex-mode latex-mode doctex-mode context-mode te=
xinfo-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 am=
s-tex-mode) :help "Run Biber")
                    ("Texindex" "texindex %s.??" TeX-run-command nil (texin=
fo-mode) :help "Run Texindex")
                    ("Texi2dvi" "%(PDF)texi2dvi %t" TeX-run-command nil (te=
xinfo-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-t=
ex-mode latex-mode doctex-mode texinfo-mode ams-tex-mode)
                     :help "Generate PostScript file")
                    ("Dvips" "%(o?)dvips %d -o %f " TeX-run-dvips nil (plai=
n-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 am=
s-tex-mode) :help "Convert DVI file to PDF with dvipdfmx")
                    ("Ps2pdf" "ps2pdf -dALLOWPSTRANSPARENCY  %f %(O?pdf)" T=
eX-run-ps2pdf nil
                     (plain-tex-mode latex-mode doctex-mode texinfo-mode am=
s-tex-mode) :help "Convert PostScript file to PDF")
                    ("Glossaries" "makeglossaries %(d-dir) %s" TeX-run-comm=
and nil
                     (plain-tex-mode latex-mode doctex-mode texinfo-mode am=
s-tex-mode) :help
                     "Run makeglossaries to create glossary file")
                    ("Index" "%(makeindex) %s" 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-mo=
de 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-mo=
de) :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 "Dele=
te generated intermediate files")
                    ("Clean All" "(TeX-clean t)" TeX-run-function nil t :he=
lp "Delete generated intermediate and output files")
                    ("Other" "" TeX-run-command t t :help "Run an arbitrary=
 command")
                    ("Latex Indent" "latexindent -w -s %a" TeX-run-command =
nil t :help "Run Latexindent on file.")
                    ("Pythontex" "pythontex --interpreter \"python:python3\=
" %t" TeX-run-command nil t :help "Run pythontex on file"))
 )

As a MWE

,----
| \documentclass{article}
| \begin{document}
| \begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix}
| \end{document}
`----


C-u C-c C-e RET bmatrix produce

,----
| \documentclass{article}
| \begin{bmatrix}
| \begin{pmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix}
| \end{document}
`----

I commented the 886 line from latex.el to correct this issue, but
I do not know wether it can have side effects.

       (save-excursion
         (funcall goto-end)
         (let ((old-env (match-string 1)))
           (replace-match environment t t nil 1)
;;l 886     (beginning-of-line 1)
           (funcall goto-begin)
           (replace-match environment t t nil 1)


This issue occurs when I use embedded calc to write a matrix in LaTeX
form.

--
JJ. R=C3=A9torr=C3=A9




Acknowledgement sent to Jean-Jacques Rétorré <jj.retorre@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-auctex@HIDDEN. Full text available.
Report forwarded to bug-auctex@HIDDEN:
bug#58689; Package auctex. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Thu, 8 Dec 2022 05:45:01 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.