From unknown Sat Sep 06 02:32:37 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#74056 <74056@debbugs.gnu.org> To: bug#74056 <74056@debbugs.gnu.org> Subject: Status: `LaTeX-insert-item' inserts comment characters if called from inside comment Reply-To: bug#74056 <74056@debbugs.gnu.org> Date: Sat, 06 Sep 2025 09:32:37 +0000 retitle 74056 `LaTeX-insert-item' inserts comment characters if called from= inside comment reassign 74056 auctex submitter 74056 Vangelis Evangelou severity 74056 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 28 05:41:49 2024 Received: (at submit) by debbugs.gnu.org; 28 Oct 2024 09:41:49 +0000 Received: from localhost ([127.0.0.1]:52561 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t5MFw-0006Tu-RA for submit@debbugs.gnu.org; Mon, 28 Oct 2024 05:41:49 -0400 Received: from lists.gnu.org ([209.51.188.17]:60828) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t5MFu-0006Tf-SC for submit@debbugs.gnu.org; Mon, 28 Oct 2024 05:41: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 ) id 1t5MF6-0003I4-3j for bug-auctex@gnu.org; Mon, 28 Oct 2024 05:40:58 -0400 Received: from mail-lj1-x235.google.com ([2a00:1450:4864:20::235]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t5MF4-0001qc-Bb for bug-auctex@gnu.org; Mon, 28 Oct 2024 05:40:55 -0400 Received: by mail-lj1-x235.google.com with SMTP id 38308e7fff4ca-2fb599aac99so35742231fa.1 for ; Mon, 28 Oct 2024 02:40:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730108450; x=1730713250; darn=gnu.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=vnVXaeOJX1HLpgI/hkLo8MbNE36OdYbnXYEqN/NL2eo=; b=Qm5HApwTOOurh2nbv19MGNoK+p8saK7lsPt5dv5XOzYvj1jOaBipbz7mSVBY3O42Cz uiJcvfJTVRJITOOMAZkyvf59EW6xOcpONAIBlGNzS7zrT5gCAEI7ZEbfPZpt/z5CAjPC 4rDhinf6ZdBi4ZRvVcFJzuN3ZPKSY46afdd97Pb1tWvXs7tPCgjynj6ll+Sws49M+TqR xNvU37QFO9qwgeIep6uEBuXIn3TUs4SBbcIwWEUZBbvFMqdXVqLjmYV6VMCKrTyzspzT juTw2xN5SacL5BDZ+BTrQXG5oGPCZII/fQ/pBGs1IggS7rBOFTgGw/rdSRYfMf++2R3G MRHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730108450; x=1730713250; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=vnVXaeOJX1HLpgI/hkLo8MbNE36OdYbnXYEqN/NL2eo=; b=Jst0SXNAhspuzT7Lbt4zCP3igPBl++Gv89FjAxBqYOQBWeC0AO6un3r9tBkyCk0FbT FHdyG/lid8tsQm6J401cUkvWHWQ04MIb5mx8pZNhJ0j4DaLQqFXg72+HgS4QzQjAdycb IZaFbj3U+GThdjl5PSiLMlfENQ4Ve5lgs+gMMDt7hHP8Undu4GqY82RZ9P5z0RUTWK5M +vorATnjCjTaOSqRx9+YzxqId3CPNgBt8Pd+Cz0yUaeW4ehk+3TuGRIVQCijn9V3s8wx NwI9VH8AdO79uvZvpcPmnYl0JRsgyKLX2O4UbWafoK3BwG+2GT8eBIenp0A2aBF+x6fG 3jpA== X-Gm-Message-State: AOJu0YwcGJkAktXjTvsva35uRiIwH2EcFL7N9CbITnxTI3gNo88B3CiT P95Xk0a64cXwQNav2KD1+gzSJN2vNBJ/qeeP7GqzZlyB9GIZGkM8dCrJOcEdDTES7YEmfgleTM/ VxBIdNFqUcFQfzQ/2uo/4faao/Zg3K4Aeo4g= X-Google-Smtp-Source: AGHT+IFz3+/DKQqNo23ovbw7DFnxwA5wfhSUDaFZnuMwJNLz48aTfT573wIlrBvVFA2WNLNZ415TTCjtvGrWV1RETvY= X-Received: by 2002:a2e:be9d:0:b0:2fa:cf82:a1b2 with SMTP id 38308e7fff4ca-2fcbe06935fmr26081581fa.31.1730108450381; Mon, 28 Oct 2024 02:40:50 -0700 (PDT) MIME-Version: 1.0 From: Vangelis Evangelou Date: Mon, 28 Oct 2024 09:40:39 +0000 Message-ID: Subject: `LaTeX-insert-item' inserts comment characters if called from inside comment To: bug-auctex@gnu.org Content-Type: multipart/alternative; boundary="0000000000009ba94b06258643b2" Received-SPF: pass client-ip=2a00:1450:4864:20::235; envelope-from=evangelou@gmail.com; helo=mail-lj1-x235.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, HTML_MESSAGE=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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) --0000000000009ba94b06258643b2 Content-Type: text/plain; charset="UTF-8" Hello. Consider the following latex snippet with the cursor position indicated by |: \begin{itemize} \item My 1st item %%% comment | \end{itemize} At that point call `LaTeX-insert-item' (M-RET) to get the following: \begin{itemize} \item My 1st item %%% comment %%% \item | \end{itemize} while I would have expected \begin{itemize} \item My 1st item %%% comment \item | \end{itemize} I cannot think of a situation where the current version is desirable. This happens because `LaTeX-insert-item' inserts a new line using `LaTeX-newline' instead of `TeX-newline. In addition to the above, `LaTeX-insert-item' always inserts a new line unless the cursor is at the beginning of line: (unless (bolp) (LaTeX-newline)) This is rarely the case. For example, if you enter a new line inside itemize, the line is indented. It would be better to replace the (bolp) check with a check that the line contains only whitespace characters. So my proposal is to replace the above line with (unless (string-match-p "^[[:blank:]]*$" (buffer-substring-no-properties (line-beginning-position) (line-end-position))) (TeX-newline)) --0000000000009ba94b06258643b2 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello.

Consider the fol= lowing latex snippet with the cursor position indicated by |:
\begin{itemize}
\item My 1st item %%% comment |
=
\end{itemize}

At that point call `LaTeX-inser= t-item' (M-RET) to get the following:

\begin{i= temize}
\item My 1st item %%% comment
=C2=A0 %%% \item |
\end{item= ize}

while I would have expected

\begin{itemize}
\item My 1st item %%% comment
\item |
\end= {itemize}

I cannot think of a situation where the = current version is desirable.

This happens bec= ause `LaTeX-insert-item' inserts a new line using `LaTeX-newline' i= nstead of `TeX-newline.

In addition to the ab= ove, `LaTeX-insert-item' always inserts a new line unless the cursor is= at the beginning of line:

(unless (bolp) (La= TeX-newline))

This is rarely the case. For example= , if you enter a new line inside itemize, the line is indented. It would be= better to replace the (bolp) check with a check that the line contains onl= y whitespace characters. So my proposal is to replace the above line with

(unless (string-match-p "^[[:blank:]]*$" = (buffer-substring-no-properties (line-beginning-position) (line-end-positio= n))) (TeX-newline))
--0000000000009ba94b06258643b2-- From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 28 13:16:58 2024 Received: (at 74056) by debbugs.gnu.org; 28 Oct 2024 17:16:58 +0000 Received: from localhost ([127.0.0.1]:54578 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t5TMP-0002cX-Vz for submit@debbugs.gnu.org; Mon, 28 Oct 2024 13:16:58 -0400 Received: from mail-lj1-f178.google.com ([209.85.208.178]:45439) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t5TMM-0002cD-Rd for 74056@debbugs.gnu.org; Mon, 28 Oct 2024 13:16:55 -0400 Received: by mail-lj1-f178.google.com with SMTP id 38308e7fff4ca-2fb4ec17f5cso40845901fa.3 for <74056@debbugs.gnu.org>; Mon, 28 Oct 2024 10:16:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730135712; x=1730740512; darn=debbugs.gnu.org; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=FGSs9GaB2IZOZT8mlZFUA/HJW6h2l5/Kp2Q2uLqN2qU=; b=TdAtYb6P58vjuhWDe8FOuZZ/sLw16ZFItstRkA9qqTxQV3Vgssp+ggalJncKutGuw/ MAVi3oFY01w/tN1sJ12UigyQnFcAX9666NcNDg61BfaMHfEpojPT2SGVry8T/3kFiRI8 WaNNR09ybWK6R+BUI1VhmiQ6/jo4tAFCZxian/CnZ6AbVbZQ+BPVuveBv+p0voG8dCdd 0mlVEH0JE7v0c8GI4q2k6P7w5uRaX/44wXLPjgwLmHCgZIoXZpgbWimLrAPwx8IOT2sJ +TEv9UXGeWJbZtYA9hzzUjcjWy+96Dm7FNbUSaJQxzN4DhKTuqf9bE2RoMi1+RkPkohn YzJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730135712; x=1730740512; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=FGSs9GaB2IZOZT8mlZFUA/HJW6h2l5/Kp2Q2uLqN2qU=; b=gvqo7aQg2/Gnrs4iPLHTHc4DBEDquvdxlt1giayzTGnu3GEZhG7iM5MTE/45mFVvSQ PNVZs6VHdyhz1e37uRysqGzh7BiLjSLHUZm4IqUii8tVMOMMu7roa5XT2y3r8L6Dpe1K vxPZhAVUJ76c2vyq/4kmV6QRQIl3EXjxfjzw6fajSJYBj8/YsfBbq95x/8DTVUm2w47R yz7ZnzxD2tvhcAzp7/rImMd3ioA5YnivFCJPBTcdOe4C1KL6GcHLUHf8+mjw3dCwwLWD N6Qc+n0a57uDoMROglBsKscP5lC1BVF9ZFVeB/rS000G0+zLrYS06iHf8RxuY80gAFdP 7PhA== X-Gm-Message-State: AOJu0YxozD/msIBDYmUrhSKTY3Xu29O/3DSWznhaMnWtvTY7TosODaVO 68OaRvZT/2OnZRy1lJx+XXwUtMA6amBpU8Uk+VdFHtu99CoFyIfgOgyPSJ1tp9UpF0oT5DUghSv vdaJh1YJWGZ3Kbd/plHZTjMbxLPM5SaLuNkE= X-Google-Smtp-Source: AGHT+IGNv5R/dj9axkdOGKJYgTNn3+clmS+WNoySVncfxMLrinBX2mMHfRIjp/vTHBDj2uPPbNBnue4uQBkAairqP/0= X-Received: by 2002:a05:651c:2121:b0:2fb:5014:c939 with SMTP id 38308e7fff4ca-2fcbe07d15cmr35415771fa.41.1730135711939; Mon, 28 Oct 2024 10:15:11 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Vangelis Evangelou Date: Mon, 28 Oct 2024 17:15:00 +0000 Message-ID: Subject: Re: `LaTeX-insert-item' inserts comment characters if called from inside comment To: 74056@debbugs.gnu.org Content-Type: multipart/alternative; boundary="00000000000086083506258c9cb0" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 74056 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --00000000000086083506258c9cb0 Content-Type: text/plain; charset="UTF-8" Correction: Instead of `LaTeX-newline' use `newline'. In my original message I said to use `TeX-newline'. So the proposal is (unless (string-match-p "^[[:blank:]]*$" (buffer-substring-no-properties (line-beginning-position) (line-end-position))) (newline)) On Mon, 28 Oct 2024 at 09:40, Vangelis Evangelou wrote: > Hello. > > Consider the following latex snippet with the cursor position indicated by > |: > > \begin{itemize} > \item My 1st item %%% comment | > \end{itemize} > > At that point call `LaTeX-insert-item' (M-RET) to get the following: > > \begin{itemize} > \item My 1st item %%% comment > %%% \item | > \end{itemize} > > while I would have expected > > \begin{itemize} > \item My 1st item %%% comment > \item | > \end{itemize} > > I cannot think of a situation where the current version is desirable. > > This happens because `LaTeX-insert-item' inserts a new line using > `LaTeX-newline' instead of `TeX-newline. > > In addition to the above, `LaTeX-insert-item' always inserts a new line > unless the cursor is at the beginning of line: > > (unless (bolp) (LaTeX-newline)) > > This is rarely the case. For example, if you enter a new line inside > itemize, the line is indented. It would be better to replace the (bolp) > check with a check that the line contains only whitespace characters. So my > proposal is to replace the above line with > > (unless (string-match-p "^[[:blank:]]*$" (buffer-substring-no-properties > (line-beginning-position) (line-end-position))) (TeX-newline)) > --00000000000086083506258c9cb0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Correction: Instead of `LaTeX-newline' use `newli= ne'. In my original message I said to use `TeX-newline'. So the pro= posal is
(unless (string-match-p "^[[:blank:]]*$" = (buffer-substring-no-properties (line-beginning-position) (line-end-positio= n))) (newline))


On Mon, 28 Oct 2024 at 09:40, Vangelis Evangelou &= lt;evangelou@gmail.com> wrote= :
Hello.

Consider the following latex s= nippet with the cursor position indicated by |:

\b= egin{itemize}
\item My 1st item %%% comment |
\end{item= ize}

At that point call `LaTeX-insert-item' (M= -RET) to get the following:

\begin{itemize}
\it= em My 1st item %%% comment
=C2=A0 %%% \item |
\end{itemize}

while I would have expected

\begin= {itemize}
\item My 1st item %%% comment
\item |
\end{itemize}

I cannot think of a situation where the current versio= n is desirable.

This happens because `LaTeX-in= sert-item' inserts a new line using `LaTeX-newline' instead of `TeX= -newline.

In addition to the above, `LaTeX-in= sert-item' always inserts a new line unless the cursor is at the beginn= ing of line:

(unless (bolp) (LaTeX-newline))<= /div>

This is rarely the case. For example, if you enter= a new line inside itemize, the line is indented. It would be better to rep= lace the (bolp) check with a check that the line contains only whitespace c= haracters. So my proposal is to replace the above line with

<= /div>
(unless (string-match-p "^[[:blank:]]*$" (buffer-substr= ing-no-properties (line-beginning-position) (line-end-position))) (TeX-newl= ine))
--00000000000086083506258c9cb0-- From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 29 02:44:49 2024 Received: (at 74056) by debbugs.gnu.org; 29 Oct 2024 06:44:49 +0000 Received: from localhost ([127.0.0.1]:55653 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t5fyD-000663-BC for submit@debbugs.gnu.org; Tue, 29 Oct 2024 02:44:49 -0400 Received: from smtp1a.inetd.co.jp ([210.129.88.11]:35834) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t5fyA-00065s-VU for 74056@debbugs.gnu.org; Tue, 29 Oct 2024 02:44:48 -0400 Received: from localhost (42-144-34-247.rev.home.ne.jp [42.144.34.247]) by smtp1a.inetd.co.jp (Postfix) with ESMTPSA id 833DF6A; Tue, 29 Oct 2024 15:44:44 +0900 (JST) From: Ikumi Keita To: Vangelis Evangelou Subject: Re: bug#74056: `LaTeX-insert-item' inserts comment characters if called from inside comment In-reply-to: References: Comments: In-reply-to Vangelis Evangelou message dated "Mon, 28 Oct 2024 09:40:39 +0000." X-Mailer: MH-E 8.6+git; nmh 1.8; Emacs 29.4 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <10089.1730184282.1@localhost> Date: Tue, 29 Oct 2024 15:44:42 +0900 Message-ID: <10090.1730184282@localhost> X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 74056 Cc: 74056@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi Vangelis, >>>>> Vangelis Evangelou writes: > Hello. > Consider the following latex snippet with the cursor position indicated by > |: > \begin{itemize} > \item My 1st item %%% comment | > \end{itemize} > At that point call `LaTeX-insert-item' (M-RET) to get the following: > \begin{itemize} > \item My 1st item %%% comment > %%% \item | > \end{itemize} > while I would have expected > \begin{itemize} > \item My 1st item %%% comment > \item | > \end{itemize} I suggest to set the customize option `LaTeX-insert-into-comments' to nil. You will get the expected behavior then. I'd say that the default value of t of `LaTeX-insert-into-comments' is one of the strangest defaults of AUCTeX :-) > I cannot think of a situation where the current version is desirable. It seems that it will be useful in docTeX mode. But I personally agree that it isn't in most LaTeX documents. To developers: I propose to change the default value of `LaTeX-insert-into-comments' to nil. What do you think about it? It is set to t in docTeX mode anyway. > In addition to the above, `LaTeX-insert-item' always inserts a new line > unless the cursor is at the beginning of line: > (unless (bolp) (LaTeX-newline)) > This is rarely the case. For example, if you enter a new line inside > itemize, the line is indented. It would be better to replace the (bolp) > check with a check that the line contains only whitespace characters. I'd like to confirm your intention. It seems that you are saying that "When I type M-RET in a line with only whitespace charactares, the \item shoule be placeed in that line, not the line created anew below that line." If so, I think it is a reasonable request. Regards, Ikumi Keita #StandWithUkraine #StopWarInUkraine #Gaza #StopMassiveKilling #CeasefireNOW From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 29 06:09:32 2024 Received: (at 74056) by debbugs.gnu.org; 29 Oct 2024 10:09:32 +0000 Received: from localhost ([127.0.0.1]:56082 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t5jAJ-00075d-Eq for submit@debbugs.gnu.org; Tue, 29 Oct 2024 06:09:32 -0400 Received: from mail-lf1-f48.google.com ([209.85.167.48]:60849) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t5jAB-00075T-5Y for 74056@debbugs.gnu.org; Tue, 29 Oct 2024 06:09:28 -0400 Received: by mail-lf1-f48.google.com with SMTP id 2adb3069b0e04-539f4d8ef66so6861323e87.1 for <74056@debbugs.gnu.org>; Tue, 29 Oct 2024 03:09:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730196502; x=1730801302; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=+KiANfnaWwEI1XbeJ6g6wO2t5nEau6N3JiZz/uI+Uh0=; b=EqMsMgxFgO+58FedocB8oAC3Lj6eF+2zXoSiQJhAUHdu0Br5fjRuh/1f20ybN6/qsD ajFoWb7EwXrz/1l2xIsDXwWXjQ+A0DdsO/fq2RzdOCmwcgCE81wbMX8NtHFfFZOVgQZW Ci+T3M66P1AWdL0SQU3q0WBOzBkV2lQAmKzc8VqHHTsLY4vIJtMWpl1SqLHtAoN3VflX YSrvF404a7gYl2ZYbQxHiDGgNWfl/sCH4nCJcNhtInqpRKRmVjuVWn5CEzABAjcNUigd /wnD1dniV58cXVjoeTZTIXvf+lwiD9cAglPqBX8rjyH46B+B7inkiOgMlum44ltlBi1i esuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730196502; x=1730801302; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=+KiANfnaWwEI1XbeJ6g6wO2t5nEau6N3JiZz/uI+Uh0=; b=tOtOdveiz/ZfDyWoowGDn9kHSX0/JoM38VIZ/W9W9Za+TZiNF4Cza01yA6+spLgkj6 ZcUQpUB304azhH40C7GLRrB1p9pD1zSHtHgKDM/1ES1Detyb85l8ZzNtVpQPcWPOniK7 NrKg5sPqtzOc6/q4qOOf40ZHdIFrAALA2Ij1PbfATWlWcayD45CsDir5JMJuKKHXxmoN SW6hGeYAt7TxdPU2fZIp7JLkR+v0b1MaPeJR14DBL32h/0LTwIMNFnTSMDKpF4snG5fQ tF89ysAVnyyOuXjDALEMo5Rf/6X4IgjJGBWITyUBwMNbMtfO7NKQth4OCu2KkSZO1vag BfRA== X-Gm-Message-State: AOJu0YweODpKwaIzn9nSLOiNnLakuohY6LLKmzHQabTb5wZFpmCIBtrO +JYLyyjYB2lqL0OpOJmM6NI2ws0WKtoIP3QmkY/+7oXQvD6uzoRXs2cl9JPd7+FTam4V6qEEWMs CE6I0BpXhMnWbWVxhAjdl5mTDXjO5kA== X-Google-Smtp-Source: AGHT+IEW4pzhWeUjnS8Sf/Vob2QSBDwlxjMJ4AUObIvDQGxy9toXuGzHrnHyN/g53dAymlLuyqQfh4Rd6e7L34tb81c= X-Received: by 2002:a05:6512:1590:b0:534:543e:1895 with SMTP id 2adb3069b0e04-53b34c5f77bmr4888927e87.39.1730196501640; Tue, 29 Oct 2024 03:08:21 -0700 (PDT) MIME-Version: 1.0 References: <10090.1730184282@localhost> In-Reply-To: <10090.1730184282@localhost> From: Vangelis Evangelou Date: Tue, 29 Oct 2024 10:08:09 +0000 Message-ID: Subject: Re: bug#74056: `LaTeX-insert-item' inserts comment characters if called from inside comment To: Ikumi Keita Content-Type: multipart/alternative; boundary="000000000000df3dfd06259ac349" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 74056 Cc: 74056@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --000000000000df3dfd06259ac349 Content-Type: text/plain; charset="UTF-8" Hi Ikumi. Thanks for your reply. I suggest to set the customize option `LaTeX-insert-into-comments' to > nil. You will get the expected behavior then. That is correct. Effectively `LaTeX-newline' calls `newline' if the above is nil. I thought to avoid the middleman and call `newline' directly, but I recognise that there are situations, e.g., editing dtx files, where the current behaviour is desirable. On that note, I wonder whether `LaTeX-insert-into-comments' should be made a buffer-local variable so it is set accordingly in various modes. I know that this can be achieved with `setq-local' so it's not a major issue. I'd like to confirm your intention. It seems that you are saying that > "When I type M-RET in a line with only whitespace charactares, the \item > shoule be placeed in that line, not the line created anew below that > line." That is correct. Best, Vangelis On Tue, 29 Oct 2024 at 06:44, Ikumi Keita wrote: > Hi Vangelis, > > >>>>> Vangelis Evangelou writes: > > Hello. > > Consider the following latex snippet with the cursor position indicated > by > > |: > > > \begin{itemize} > > \item My 1st item %%% comment | > > \end{itemize} > > > At that point call `LaTeX-insert-item' (M-RET) to get the following: > > > \begin{itemize} > > \item My 1st item %%% comment > > %%% \item | > > \end{itemize} > > > while I would have expected > > > \begin{itemize} > > \item My 1st item %%% comment > > \item | > > \end{itemize} > > I suggest to set the customize option `LaTeX-insert-into-comments' to > nil. You will get the expected behavior then. > > I'd say that the default value of t of `LaTeX-insert-into-comments' is > one of the strangest defaults of AUCTeX :-) > > > I cannot think of a situation where the current version is desirable. > > It seems that it will be useful in docTeX mode. But I personally agree > that it isn't in most LaTeX documents. > > To developers: I propose to change the default value of > `LaTeX-insert-into-comments' to nil. What do you think about it? It is > set to t in docTeX mode anyway. > > > In addition to the above, `LaTeX-insert-item' always inserts a new line > > unless the cursor is at the beginning of line: > > > (unless (bolp) (LaTeX-newline)) > > > This is rarely the case. For example, if you enter a new line inside > > itemize, the line is indented. It would be better to replace the (bolp) > > check with a check that the line contains only whitespace characters. > > I'd like to confirm your intention. It seems that you are saying that > "When I type M-RET in a line with only whitespace charactares, the \item > shoule be placeed in that line, not the line created anew below that > line." If so, I think it is a reasonable request. > > Regards, > Ikumi Keita > #StandWithUkraine #StopWarInUkraine > #Gaza #StopMassiveKilling #CeasefireNOW > --000000000000df3dfd06259ac349 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Ikumi.

= Thanks for your reply.

I suggest to set the customize option `LaTeX-insert-into-comments' to nil. You will get the expected behavior then.
That is corr= ect. Effectively `LaTeX-newline' calls `newline' if the above is ni= l. I thought to avoid the middleman and call `newline' directly, but I = recognise that there are situations, e.g., editing dtx files, where the cur= rent behaviour is desirable. On that note, I wonder whether `LaTeX-insert-i= nto-comments' should be made a buffer-local variable so it is set accor= dingly in various modes. I know that this can be achieved with `setq-local&= #39; so it's not a major issue.

I'd like to confirm your intention. = It seems that you are saying that
"When I type M-RET in a line with only whitespace charactares, the \it= em
shoule be placeed in that line, not the line created anew below that
line."
That is correct.

Best,
Vangelis

On Tue, 29 Oct 2024 at 06:44, Ikumi Keit= a <ikumi@ikumi.que.jp> wrote:
Hi Vangelis,

>>>>> Vangelis Evangelou <evangelou@gmail.com> wr= ites:
> Hello.
> Consider the following latex snippet with the cursor position indicate= d by
> |:

> \begin{itemize}
> \item My 1st item %%% comment |
> \end{itemize}

> At that point call `LaTeX-insert-item' (M-RET) to get the followin= g:

> \begin{itemize}
> \item My 1st item %%% comment
>=C2=A0 =C2=A0%%% \item |
> \end{itemize}

> while I would have expected

> \begin{itemize}
> \item My 1st item %%% comment
> \item |
> \end{itemize}

I suggest to set the customize option `LaTeX-insert-into-comments' to nil. You will get the expected behavior then.

I'd say that the default value of t of `LaTeX-insert-into-comments'= is
one of the strangest defaults of AUCTeX :-)

> I cannot think of a situation where the current version is desirable.<= br>
It seems that it will be useful in docTeX mode. But I personally agree
that it isn't in most LaTeX documents.

To developers: I propose to change the default value of
`LaTeX-insert-into-comments' to nil. What do you think about it? It is<= br> set to t in docTeX mode anyway.

> In addition to the above, `LaTeX-insert-item' always inserts a new= line
> unless the cursor is at the beginning of line:

> (unless (bolp) (LaTeX-newline))

> This is rarely the case. For example, if you enter a new line inside > itemize, the line is indented. It would be better to replace the (bolp= )
> check with a check that the line contains only whitespace characters.<= br>
I'd like to confirm your intention. It seems that you are saying that "When I type M-RET in a line with only whitespace charactares, the \it= em
shoule be placeed in that line, not the line created anew below that
line." If so, I think it is a reasonable request.

Regards,
Ikumi Keita
#StandWithUkraine #StopWarInUkraine
#Gaza #StopMassiveKilling #CeasefireNOW
--000000000000df3dfd06259ac349-- From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 29 06:22:31 2024 Received: (at 74056) by debbugs.gnu.org; 29 Oct 2024 10:22:31 +0000 Received: from localhost ([127.0.0.1]:56103 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t5jMt-0007W8-Fj for submit@debbugs.gnu.org; Tue, 29 Oct 2024 06:22:31 -0400 Received: from eggs.gnu.org ([209.51.188.92]:39694) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t5jMr-0007W0-PK for 74056@debbugs.gnu.org; Tue, 29 Oct 2024 06:22:30 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t5jKd-0002s3-DD; Tue, 29 Oct 2024 06:20:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=aBW7ukkLFOXM+6dWkOD69JpTiDAGD/O+mHh5MpNjg1A=; b=dqDGyyiQdZEK66Juqhsr 2lNEO864FE/qnhiPFDmkptx8w/hAfRMX/5Zx+I32xPRyvaG75luCZzgsIgfchmWCFawqtTGL1sMqi V/2fcoSQ9TvFyAnuewFVX+NrCHi+5fqQBeYN6jxN/ojY9NPzAJVbkBMvnxfDCeIy5Zo1RQ4/oayfE W/7yjdp0LCgqn7GJwu1sG9pEROsYxUkwVT8N+NRQr2m8kjhl39RetmrwjgrrRFhbq3weg1f+FqbIt 7AsEGN1wquJ8sur/7Kndx63264Knaq9JF00OHdo9nKsU6QHWCim1R4Sgi5CIscXpRBC50NFGEKWok nfBlGeg471SQwA==; From: Arash Esbati To: Ikumi Keita Subject: Re: bug#74056: `LaTeX-insert-item' inserts comment characters if called from inside comment In-Reply-To: <10090.1730184282@localhost> (Ikumi Keita's message of "Tue, 29 Oct 2024 15:44:42 +0900") References: <10090.1730184282@localhost> Date: Tue, 29 Oct 2024 11:19:41 +0100 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 74056 Cc: Vangelis Evangelou , 74056@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi Keita, Ikumi Keita writes: > To developers: I propose to change the default value of > `LaTeX-insert-into-comments' to nil. What do you think about it? It is > set to t in docTeX mode anyway. What do think about adding ":safe #'booleanp" to the `defcustom'? That way, people can set the global value via customize and change the behavior on per file basis. > I'd like to confirm your intention. It seems that you are saying that > "When I type M-RET in a line with only whitespace charactares, the \item > shoule be placeed in that line, not the line created anew below that > line." If so, I think it is a reasonable request. +1 Best, Arash From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 29 07:00:25 2024 Received: (at 74056) by debbugs.gnu.org; 29 Oct 2024 11:00:25 +0000 Received: from localhost ([127.0.0.1]:56193 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t5jxZ-0000ID-Ed for submit@debbugs.gnu.org; Tue, 29 Oct 2024 07:00:25 -0400 Received: from smtp1a.inetd.co.jp ([210.129.88.11]:36552) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t5jxW-0000I5-T8 for 74056@debbugs.gnu.org; Tue, 29 Oct 2024 07:00:23 -0400 Received: from localhost (42-144-34-247.rev.home.ne.jp [42.144.34.247]) by smtp1a.inetd.co.jp (Postfix) with ESMTPSA id DECE85F; Tue, 29 Oct 2024 20:00:20 +0900 (JST) From: Ikumi Keita To: Vangelis Evangelou , Arash Esbati Subject: Re: bug#74056: `LaTeX-insert-item' inserts comment characters if called from inside comment In-reply-to: References: <10090.1730184282@localhost> Comments: In-reply-to Vangelis Evangelou message dated "Tue, 29 Oct 2024 10:08:09 +0000." X-Mailer: MH-E 8.6+git; nmh 1.8; Emacs 29.4 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <11237.1730199619.1@localhost> Date: Tue, 29 Oct 2024 20:00:19 +0900 Message-ID: <11238.1730199619@localhost> X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 74056 Cc: 74056@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >>>>> Vangelis Evangelou writes: > I wonder whether `LaTeX-insert-into-comments' should be made a > buffer-local variable so it is set accordingly in various modes. I > know that this can be achieved with `setq-local' so it's not a major > issue. If you are talking about the implementation of the major modes in AUCTeX, it isn't a problem as you say. > I'd like to confirm your intention. It seems that you are saying that >> "When I type M-RET in a line with only whitespace charactares, the \item >> shoule be placeed in that line, not the line created anew below that >> line." > That is correct. Thanks for confirmation. Then I'll work on that direction. >>>>> Arash Esbati writes: > What do think about adding ":safe #'booleanp" to the `defcustom'? That > way, people can set the global value via customize and change the > behavior on per file basis. Ah, that's a good idea. Does the change below look good? (I refilled the doc string as well.) diff --git a/latex.el b/latex.el index 02fd1e33..9f767f99 100644 --- a/latex.el +++ b/latex.el @@ -66,12 +66,13 @@ A comma-seperated list of strings." (make-variable-buffer-local 'LaTeX-default-options) -(defcustom LaTeX-insert-into-comments t +(defcustom LaTeX-insert-into-comments nil "Whether insertion commands stay in comments. -This allows using the insertion commands even when -the lines are outcommented, like in dtx files." +This allows using the insertion commands even when the lines are +outcommented, like in dtx files." :group 'LaTeX-environment - :type 'boolean) + :type 'boolean + :safe #'booleanp) (defcustom docTeX-indent-across-comments nil "If non-nil, indentation in docTeX is done across comments." Regards, Ikumi Keita #StandWithUkraine #StopWarInUkraine #Gaza #StopMassiveKilling #CeasefireNOW From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 29 07:44:37 2024 Received: (at 74056) by debbugs.gnu.org; 29 Oct 2024 11:44:37 +0000 Received: from localhost ([127.0.0.1]:56251 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t5keK-0001Vf-N4 for submit@debbugs.gnu.org; Tue, 29 Oct 2024 07:44:37 -0400 Received: from eggs.gnu.org ([209.51.188.92]:39968) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t5keH-0001VW-VE for 74056@debbugs.gnu.org; Tue, 29 Oct 2024 07:44:35 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t5keA-0004DV-4x; Tue, 29 Oct 2024 07:44:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=8N+UsYVZ6kJPGF+wK6glARFrUeNVu8XqooJGG+xqqsQ=; b=n/ADl1gKxA3YwIivIS4R A4l6Gz6N5fzeFrPkeN/EVGAwCjGr1zqTzW66mTduP0kUHEr98bdCOSCcHKRn6jaFRoWfCCqlpKKlY Uu1SABomIT/M6yXc92nbXb2wQfyrXBIf4caeHt5ufNHb8w2EPJmsYX4hOe0MhUN3SrOjmmmpSACqb gcm/z2L7KKt43iFEAjjxWL28VK/ed9q75JjrDda7BEo1rnERkEREerIJv8tYW6nUmJkcPjb1BfSaC ctrjaezUj5OgIe5HxnsBNVAhkQ0cIXgsjbQbntn3Tb8OXhgdkFa1YlL6n8RlJinbHE7sOZJW1BiBS RSimEXoFRfTQqA==; From: Arash Esbati To: Ikumi Keita Subject: Re: bug#74056: `LaTeX-insert-item' inserts comment characters if called from inside comment In-Reply-To: <11238.1730199619@localhost> (Ikumi Keita's message of "Tue, 29 Oct 2024 20:00:19 +0900") References: <10090.1730184282@localhost> <11238.1730199619@localhost> Date: Tue, 29 Oct 2024 12:44:19 +0100 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 74056 Cc: Vangelis Evangelou , 74056@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Ikumi Keita writes: > Ah, that's a good idea. Does the change below look good? (I refilled the > doc string as well.) > > diff --git a/latex.el b/latex.el > index 02fd1e33..9f767f99 100644 > --- a/latex.el > +++ b/latex.el > @@ -66,12 +66,13 @@ A comma-seperated list of strings." > > (make-variable-buffer-local 'LaTeX-default-options) > > -(defcustom LaTeX-insert-into-comments t > +(defcustom LaTeX-insert-into-comments nil > "Whether insertion commands stay in comments. > -This allows using the insertion commands even when > -the lines are outcommented, like in dtx files." > +This allows using the insertion commands even when the lines are > +outcommented, like in dtx files." > :group 'LaTeX-environment > - :type 'boolean) > + :type 'boolean > + :safe #'booleanp) Thanks, :package-version '(auctex . "14.0.8") is missing, and also an entry in NEWS.org. And while we're at it, should we document the variable in the manual and take this from the ToDo-list[1], WDYT? Best, Arash Footnotes: [1] https://elpa.gnu.org/devel/doc/auctex.html#Mid_002dterm-Goals From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 31 05:49:17 2024 Received: (at 74056) by debbugs.gnu.org; 31 Oct 2024 09:49:17 +0000 Received: from localhost ([127.0.0.1]:41242 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t6Rno-0001FF-Jr for submit@debbugs.gnu.org; Thu, 31 Oct 2024 05:49:17 -0400 Received: from smtp1a.inetd.co.jp ([210.129.88.11]:42562) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t6Rnl-0001F8-GQ for 74056@debbugs.gnu.org; Thu, 31 Oct 2024 05:49:15 -0400 Received: from localhost (42-144-34-247.rev.home.ne.jp [42.144.34.247]) by smtp1a.inetd.co.jp (Postfix) with ESMTPSA id 5352B60; Thu, 31 Oct 2024 18:49:11 +0900 (JST) From: Ikumi Keita To: Arash Esbati Subject: Re: bug#74056: `LaTeX-insert-item' inserts comment characters if called from inside comment In-reply-to: References: <10090.1730184282@localhost> <11238.1730199619@localhost> Comments: In-reply-to Arash Esbati message dated "Tue, 29 Oct 2024 12:44:19 +0100." X-Mailer: MH-E 8.6+git; nmh 1.8; Emacs 29.4 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1991.1730368151.1@localhost> Content-Transfer-Encoding: quoted-printable Date: Thu, 31 Oct 2024 18:49:11 +0900 Message-ID: <1992.1730368151@localhost> X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 74056 Cc: Vangelis Evangelou , 74056@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi Arash, >>>>> Arash Esbati writes: > Thanks, :package-version '(auctex . "14.0.8") is missing, and also an > entry in NEWS.org. And while we're at it, should we document the > variable in the manual and take this from the ToDo-list[1], WDYT? I added updates to documentation as well. How about this? (I'm thinking to install `LaTeX-insert-item' change as a separate commit.) diff --git a/NEWS.org b/NEWS.org index b5a4bb91..28371831 100644 --- a/NEWS.org +++ b/NEWS.org @@ -30,6 +30,11 @@ - Add preliminary support for parsing =3D\graphicspath=3D in =3Dstyle/graphicx.el=3D. = +** Changed + +- Change the default value of ~LaTeX-insert-into-comments~ from ~t~ to + ~nil~. + * [14.0.7] - 2024-10-05 = ** Added diff --git a/doc/auctex.texi b/doc/auctex.texi index 718d4c2a..86913ef4 100644 --- a/doc/auctex.texi +++ b/doc/auctex.texi @@ -1616,6 +1616,22 @@ paragraph is considered to consist of all preceding= and succeeding lines starting with a @samp{%}, until the first non-comment line. @end deffn = +In doc@TeX{} document, all documentations are commented out. @AUCTeX{} +inserts @samp{%} (with a space after it) at the beginning of line when +you issue some commands including sectioning (@kbd{C-c C-s}) and insertin= g +environments (@kbd{C-c C-e}), on a commented line. This behavior is +controlled by @code{LaTeX-insert-into-comments}. + +@defopt LaTeX-insert-into-comments +When this option is non-@code{nil}, some editing comments are aware of +comment prefix at the beginning of line and insert it in the line created +anew. + +The default value of this option used to be @code{t}, which caused severa= l +unintuitive behavior in normal @LaTeX{} mode. Now it defaults to +@code{nil} and set to @code{t} in doc@TeX{} mode. +@end defopt + @node Indenting @section Indenting @cindex Formatting diff --git a/doc/todo.texi b/doc/todo.texi index d144ba72..825e21aa 100644 --- a/doc/todo.texi +++ b/doc/todo.texi @@ -78,7 +78,7 @@ texinfo mode.) Following entries should be included in the document: @itemize @minus @item -Variables @code{LaTeX-insert-into-comments}, @code{TeX-translate-location= -hook} +Variable @code{TeX-translate-location-hook} = @item How to use @code{TeX-auto-add-type}, as well as functions and variables diff --git a/latex.el b/latex.el index 02fd1e33..554865ab 100644 --- a/latex.el +++ b/latex.el @@ -66,12 +66,14 @@ A comma-seperated list of strings." = (make-variable-buffer-local 'LaTeX-default-options) = -(defcustom LaTeX-insert-into-comments t +(defcustom LaTeX-insert-into-comments nil "Whether insertion commands stay in comments. -This allows using the insertion commands even when -the lines are outcommented, like in dtx files." +This allows using the insertion commands even when the lines are +outcommented, like in dtx files." :group 'LaTeX-environment - :type 'boolean) + :type 'boolean + :safe #'booleanp + :package-version '(auctex . "14.0.8")) = (defcustom docTeX-indent-across-comments nil "If non-nil, indentation in docTeX is done across comments." @@ -1533,7 +1535,14 @@ You may use `LaTeX-item-list' to change the routine= s used to insert the item." (when (and (TeX-active-mark) (> (point) (mark))) (exchange-point-and-mark)) - (unless (bolp) (LaTeX-newline)) + (if (save-excursion + ;; If the current line has only whitespace characters, put + ;; the new \item on this line, not creating a new line + ;; below. + (goto-char (line-beginning-position)) + (looking-at "\\s-*$")) + (delete-region (point) (match-end 0)) + (LaTeX-newline)) (if (assoc environment LaTeX-item-list) (funcall (cdr (assoc environment LaTeX-item-list))) (TeX-insert-macro "item")) Regards, Ikumi Keita #StandWithUkraine #StopWarInUkraine #Gaza #StopMassiveKilling #CeasefireNOW From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 01 03:25:48 2024 Received: (at 74056) by debbugs.gnu.org; 1 Nov 2024 07:25:48 +0000 Received: from localhost ([127.0.0.1]:47432 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t6m2W-0005qe-6c for submit@debbugs.gnu.org; Fri, 01 Nov 2024 03:25:48 -0400 Received: from smtp1a.inetd.co.jp ([210.129.88.11]:45192) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t6m2T-0005qY-RN for 74056@debbugs.gnu.org; Fri, 01 Nov 2024 03:25:47 -0400 Received: from localhost (42-144-34-247.rev.home.ne.jp [42.144.34.247]) by smtp1a.inetd.co.jp (Postfix) with ESMTPSA id 869585C; Fri, 1 Nov 2024 16:25:43 +0900 (JST) From: Ikumi Keita To: Arash Esbati , Vangelis Evangelou Subject: Re: bug#74056: `LaTeX-insert-item' inserts comment characters if called from inside comment In-reply-to: References: <10090.1730184282@localhost> <11238.1730199619@localhost> <1992.1730368151@localhost> Comments: In-reply-to Vangelis Evangelou message dated "Thu, 31 Oct 2024 11:00:16 +0000." X-Mailer: MH-E 8.6+git; nmh 1.8; Emacs 29.4 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Date: Fri, 01 Nov 2024 16:25:43 +0900 Message-ID: <5401.1730445943@localhost> X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 74056 Cc: 74056@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Arash and Vangelis, >>>>> Vangelis Evangelou writes: > There is a typo: "When this option is non-@code{nil}, some editing > comments are aware of". "comments" -> "commands" Thanks =F0=9F=98=8A I attach the current patches. Regards, Ikumi Keita #StandWithUkraine #StopWarInUkraine #Gaza #StopMassiveKilling #CeasefireNOW --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-Change-default-of-LaTeX-insert-into-comments-bug-740.patch Content-Description: patch 1 >From 4df96b72085a31d5c3c7901ecd122b6d2439ea2c Mon Sep 17 00:00:00 2001 From: Ikumi Keita Date: Fri, 1 Nov 2024 15:27:09 +0900 Subject: [PATCH 1/2] Change default of `LaTeX-insert-into-comments' (bug#74056) * latex.el (LaTeX-insert-into-comments): Change default value to nil. Add :safe and :package-version entries. Refill the doc string. * NEWS.org (Changed): Announce the change. * doc/auctex.texi (Commenting): Add explanation of `LaTeX-insert-into-comments' (at last). * doc/todo.texi (Mid-term Goals): Adjust accordingly. --- NEWS.org | 5 +++++ doc/auctex.texi | 16 ++++++++++++++++ doc/todo.texi | 2 +- latex.el | 10 ++++++---- 4 files changed, 28 insertions(+), 5 deletions(-) diff --git a/NEWS.org b/NEWS.org index b5a4bb91..28371831 100644 --- a/NEWS.org +++ b/NEWS.org @@ -30,6 +30,11 @@ - Add preliminary support for parsing =\graphicspath= in =style/graphicx.el=. +** Changed + +- Change the default value of ~LaTeX-insert-into-comments~ from ~t~ to + ~nil~. + * [14.0.7] - 2024-10-05 ** Added diff --git a/doc/auctex.texi b/doc/auctex.texi index 718d4c2a..fb20c817 100644 --- a/doc/auctex.texi +++ b/doc/auctex.texi @@ -1616,6 +1616,22 @@ paragraph is considered to consist of all preceding and succeeding lines starting with a @samp{%}, until the first non-comment line. @end deffn +In doc@TeX{} document, all documentations are commented out. @AUCTeX{} +inserts @samp{%} (with an accompanying space) at the beginning of line +when you issue some commands including sectioning (@kbd{C-c C-s}) and +inserting environments (@kbd{C-c C-e}), on a commented line. This +behavior is controlled by @code{LaTeX-insert-into-comments}. + +@defopt LaTeX-insert-into-comments +When this option is non-@code{nil}, some editing commands are aware of +comment prefix at the beginning of line and insert it in the line created +anew. + +The default value of this option used to be @code{t}, which sometimes +caused unintuitive behaviors in normal @LaTeX{} mode. Now it defaults to +@code{nil} and is set to @code{t} in doc@TeX{} mode. +@end defopt + @node Indenting @section Indenting @cindex Formatting diff --git a/doc/todo.texi b/doc/todo.texi index d144ba72..825e21aa 100644 --- a/doc/todo.texi +++ b/doc/todo.texi @@ -78,7 +78,7 @@ texinfo mode.) Following entries should be included in the document: @itemize @minus @item -Variables @code{LaTeX-insert-into-comments}, @code{TeX-translate-location-hook} +Variable @code{TeX-translate-location-hook} @item How to use @code{TeX-auto-add-type}, as well as functions and variables diff --git a/latex.el b/latex.el index 02fd1e33..5e1c628c 100644 --- a/latex.el +++ b/latex.el @@ -66,12 +66,14 @@ A comma-seperated list of strings." (make-variable-buffer-local 'LaTeX-default-options) -(defcustom LaTeX-insert-into-comments t +(defcustom LaTeX-insert-into-comments nil "Whether insertion commands stay in comments. -This allows using the insertion commands even when -the lines are outcommented, like in dtx files." +This allows using the insertion commands even when the lines are +outcommented, like in dtx files." :group 'LaTeX-environment - :type 'boolean) + :type 'boolean + :safe #'booleanp + :package-version '(auctex . "14.0.8")) (defcustom docTeX-indent-across-comments nil "If non-nil, indentation in docTeX is done across comments." -- 2.46.2 --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0002-Improve-insertion-of-item-bug-74056.patch Content-Description: patch 2 >From a15a2f013e6f4d3bafd699bf88df6883862d61fa Mon Sep 17 00:00:00 2001 From: Ikumi Keita Date: Fri, 1 Nov 2024 15:41:58 +0900 Subject: [PATCH 2/2] Improve insertion of \item (bug#74056) * latex.el (LaTeX-insert-item): On empty line, use that line to put \item and don't create a new line after it. --- latex.el | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/latex.el b/latex.el index 5e1c628c..91aa16b5 100644 --- a/latex.el +++ b/latex.el @@ -1535,7 +1535,18 @@ You may use `LaTeX-item-list' to change the routines used to insert the item." (when (and (TeX-active-mark) (> (point) (mark))) (exchange-point-and-mark)) - (unless (bolp) (LaTeX-newline)) + (if (save-excursion + ;; If the current line has only whitespace characters, put + ;; the new \item on this line, not creating a new line + ;; below. + (goto-char (line-beginning-position)) + (if LaTeX-insert-into-comments + (re-search-forward + (concat "\\=" TeX-comment-start-regexp "+") + (line-end-position) t)) + (looking-at "[ \t]*$")) + (delete-region (match-beginning 0) (match-end 0)) + (LaTeX-newline)) (if (assoc environment LaTeX-item-list) (funcall (cdr (assoc environment LaTeX-item-list))) (TeX-insert-macro "item")) -- 2.46.2 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 01 04:26:30 2024 Received: (at 74056) by debbugs.gnu.org; 1 Nov 2024 08:26:30 +0000 Received: from localhost ([127.0.0.1]:47817 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t6mzG-0007vp-En for submit@debbugs.gnu.org; Fri, 01 Nov 2024 04:26:30 -0400 Received: from eggs.gnu.org ([209.51.188.92]:54444) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t6mzE-0007vj-46 for 74056@debbugs.gnu.org; Fri, 01 Nov 2024 04:26:28 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t6mz8-0002au-2C; Fri, 01 Nov 2024 04:26:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=cHNN6tTTBZiSVYfVTfojucAqvdK1e2GTKM2bUH5SITc=; b=fcksXFi0qOHJVgDV7JSc x/jrb620uCjSDgoHk6Bnv9lJTKm9mMPGn2CDaJMIgEGakxlqQ9dy66ot7mDriMivxbYzEjWmIGErm mxzIBurPpSI+Pl046Dy/+qmkOPXIOjmkQ7RpjpaIHHaI9LQ9wUXgpIfy6xHo8lY4G7SthsPWPz0r8 cKq8Iu08644LjlGllc+am0nO9quCVGXkeMTMZXgjVicP872RRGlDl66ib3dzJpMyqGHC97HytkGkD glu8NUdFCggMqHtnbRW+2aEex6osaIS+Jtms52/FFbDiGaZGeXhVl1o9SQ8mwWlJYVVXOSNfDnLem 9WeK7jtjz2u2Lw==; From: Arash Esbati To: Ikumi Keita Subject: Re: bug#74056: `LaTeX-insert-item' inserts comment characters if called from inside comment In-Reply-To: <5401.1730445943@localhost> (Ikumi Keita's message of "Fri, 01 Nov 2024 16:25:43 +0900") References: <10090.1730184282@localhost> <11238.1730199619@localhost> <1992.1730368151@localhost> <5401.1730445943@localhost> Date: Fri, 01 Nov 2024 09:26:20 +0100 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 74056 Cc: Vangelis Evangelou , 74056@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi Keita, Ikumi Keita writes: > I attach the current patches. Thanks, I have 2 minor comments, see below. > diff --git a/doc/auctex.texi b/doc/auctex.texi > index 718d4c2a..fb20c817 100644 > --- a/doc/auctex.texi > +++ b/doc/auctex.texi > @@ -1616,6 +1616,22 @@ paragraph is considered to consist of all preceding and succeeding > lines starting with a @samp{%}, until the first non-comment line. > @end deffn > > +In doc@TeX{} document, all documentations are commented out. @AUCTeX{} > +inserts @samp{%} (with an accompanying space) at the beginning of line > +when you issue some commands including sectioning (@kbd{C-c C-s}) and > +inserting environments (@kbd{C-c C-e}), on a commented line. This > +behavior is controlled by @code{LaTeX-insert-into-comments}. > + > +@defopt LaTeX-insert-into-comments > +When this option is non-@code{nil}, some editing commands are aware of > +comment prefix at the beginning of line and insert it in the line created > +anew. > + > +The default value of this option used to be @code{t}, which sometimes > +caused unintuitive behaviors in normal @LaTeX{} mode. Now it defaults to > +@code{nil} and is set to @code{t} in doc@TeX{} mode. > +@end defopt > + I don't think we need to talk about the history in the manual. I suggest to change the last paragraph to something like this: The default value of this option is @code{nil} in normal @LaTeX{} mode and is set to @code{t} in doc@TeX{} mode. Reg. your other patch: Does it need an ERT-test? Best, Arash From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 02 05:11:13 2024 Received: (at 74056) by debbugs.gnu.org; 2 Nov 2024 09:11:14 +0000 Received: from localhost ([127.0.0.1]:53106 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t7AA5-0003YI-9y for submit@debbugs.gnu.org; Sat, 02 Nov 2024 05:11:13 -0400 Received: from smtp1a.inetd.co.jp ([210.129.88.11]:48096) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t7AA2-0003YA-PC for 74056@debbugs.gnu.org; Sat, 02 Nov 2024 05:11:12 -0400 Received: from localhost (42-144-34-247.rev.home.ne.jp [42.144.34.247]) by smtp1a.inetd.co.jp (Postfix) with ESMTPSA id 719B45F; Sat, 2 Nov 2024 18:11:08 +0900 (JST) From: Ikumi Keita To: Arash Esbati Subject: Re: bug#74056: `LaTeX-insert-item' inserts comment characters if called from inside comment In-reply-to: References: <10090.1730184282@localhost> <11238.1730199619@localhost> <1992.1730368151@localhost> <5401.1730445943@localhost> Comments: In-reply-to Arash Esbati message dated "Fri, 01 Nov 2024 09:26:20 +0100." X-Mailer: MH-E 8.6+git; nmh 1.8; Emacs 29.4 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Date: Sat, 02 Nov 2024 18:11:08 +0900 Message-ID: <9601.1730538668@localhost> X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 74056 Cc: Vangelis Evangelou , 74056@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain Hi Arash, >>>>> Arash Esbati writes: > Thanks, I have 2 minor comments, see below. > I don't think we need to talk about the history in the manual. I > suggest to change the last paragraph to something like this: > The default value of this option is @code{nil} in normal @LaTeX{} mode > and is set to @code{t} in doc@TeX{} mode. OK. I've further simplified. > Reg. your other patch: Does it need an ERT-test? I think it's better to have one. I added. Regards, Ikumi Keita #StandWithUkraine #StopWarInUkraine #Gaza #StopMassiveKilling #CeasefireNOW --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-Change-default-of-LaTeX-insert-into-comments-bug-740.patch Content-Description: patch1 >From c596290236f1a981c4d3ff557987546518e4da19 Mon Sep 17 00:00:00 2001 From: Ikumi Keita Date: Fri, 1 Nov 2024 15:27:09 +0900 Subject: [PATCH 1/2] Change default of `LaTeX-insert-into-comments' (bug#74056) * latex.el (LaTeX-insert-into-comments): Change default value to nil. Add :safe and :package-version entries. Refill the doc string. * NEWS.org (Changed): Announce the change. * doc/auctex.texi (Commenting): Add explanation of `LaTeX-insert-into-comments' (at last). * doc/todo.texi (Mid-term Goals): Adjust accordingly. --- NEWS.org | 5 +++++ doc/auctex.texi | 15 +++++++++++++++ doc/todo.texi | 2 +- latex.el | 10 ++++++---- 4 files changed, 27 insertions(+), 5 deletions(-) diff --git a/NEWS.org b/NEWS.org index b5a4bb91..28371831 100644 --- a/NEWS.org +++ b/NEWS.org @@ -30,6 +30,11 @@ - Add preliminary support for parsing =\graphicspath= in =style/graphicx.el=. +** Changed + +- Change the default value of ~LaTeX-insert-into-comments~ from ~t~ to + ~nil~. + * [14.0.7] - 2024-10-05 ** Added diff --git a/doc/auctex.texi b/doc/auctex.texi index 718d4c2a..114b9e8d 100644 --- a/doc/auctex.texi +++ b/doc/auctex.texi @@ -1616,6 +1616,21 @@ paragraph is considered to consist of all preceding and succeeding lines starting with a @samp{%}, until the first non-comment line. @end deffn +In doc@TeX{} document, all documentations are commented out. @AUCTeX{} +inserts @samp{%} (with an accompanying space) at the beginning of line +when you issue some commands including sectioning (@kbd{C-c C-s}) and +inserting environments (@kbd{C-c C-e}), on a commented line. This +behavior is controlled by @code{LaTeX-insert-into-comments}. + +@defopt LaTeX-insert-into-comments +When this option is non-@code{nil}, some editing commands are aware of +comment prefix at the beginning of line and insert it in the line created +anew. + +The default value of this option is @code{nil} and is set to @code{t} +in doc@TeX{} mode. +@end defopt + @node Indenting @section Indenting @cindex Formatting diff --git a/doc/todo.texi b/doc/todo.texi index d144ba72..825e21aa 100644 --- a/doc/todo.texi +++ b/doc/todo.texi @@ -78,7 +78,7 @@ texinfo mode.) Following entries should be included in the document: @itemize @minus @item -Variables @code{LaTeX-insert-into-comments}, @code{TeX-translate-location-hook} +Variable @code{TeX-translate-location-hook} @item How to use @code{TeX-auto-add-type}, as well as functions and variables diff --git a/latex.el b/latex.el index 02fd1e33..5e1c628c 100644 --- a/latex.el +++ b/latex.el @@ -66,12 +66,14 @@ A comma-seperated list of strings." (make-variable-buffer-local 'LaTeX-default-options) -(defcustom LaTeX-insert-into-comments t +(defcustom LaTeX-insert-into-comments nil "Whether insertion commands stay in comments. -This allows using the insertion commands even when -the lines are outcommented, like in dtx files." +This allows using the insertion commands even when the lines are +outcommented, like in dtx files." :group 'LaTeX-environment - :type 'boolean) + :type 'boolean + :safe #'booleanp + :package-version '(auctex . "14.0.8")) (defcustom docTeX-indent-across-comments nil "If non-nil, indentation in docTeX is done across comments." -- 2.46.2 --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0002-Improve-insertion-of-item-bug-74056.patch Content-Description: patch2 >From a853f3fed7ef3648ecd9a31e0f5102cb5401a95d Mon Sep 17 00:00:00 2001 From: Ikumi Keita Date: Fri, 1 Nov 2024 15:41:58 +0900 Subject: [PATCH 2/2] Improve insertion of \item (bug#74056) * latex.el (LaTeX-insert-item): On whitespace-only line, use that line to put \item and don't create a new line after it. * tests/latex/latex-test.el (LaTeX-insert-item-in-whitespace-only-line): New test. --- latex.el | 13 ++++++++++++- tests/latex/latex-test.el | 18 ++++++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/latex.el b/latex.el index 5e1c628c..91aa16b5 100644 --- a/latex.el +++ b/latex.el @@ -1535,7 +1535,18 @@ You may use `LaTeX-item-list' to change the routines used to insert the item." (when (and (TeX-active-mark) (> (point) (mark))) (exchange-point-and-mark)) - (unless (bolp) (LaTeX-newline)) + (if (save-excursion + ;; If the current line has only whitespace characters, put + ;; the new \item on this line, not creating a new line + ;; below. + (goto-char (line-beginning-position)) + (if LaTeX-insert-into-comments + (re-search-forward + (concat "\\=" TeX-comment-start-regexp "+") + (line-end-position) t)) + (looking-at "[ \t]*$")) + (delete-region (match-beginning 0) (match-end 0)) + (LaTeX-newline)) (if (assoc environment LaTeX-item-list) (funcall (cdr (assoc environment LaTeX-item-list))) (TeX-insert-macro "item")) diff --git a/tests/latex/latex-test.el b/tests/latex/latex-test.el index e22d2a08..d7d202fc 100644 --- a/tests/latex/latex-test.el +++ b/tests/latex/latex-test.el @@ -730,4 +730,22 @@ check the indentation for optional argument of \\usepackage." (insert-file-contents docTeX/out) (buffer-string))))) +;; bug#74056 +(ert-deftest LaTeX-insert-item-in-whitespace-only-line () + "Test if `LaTeX-insert-item' doesn't insert spurious line." + (with-temp-buffer + (LaTeX-mode) + (insert "\ +\\begin{itemize} +\\item abc +\s\s\t") + (backward-char 1) + (LaTeX-insert-item) + (should (string= + (buffer-string) + "\ +\\begin{itemize} +\\item abc +\\item ")))) + ;;; latex-test.el ends here -- 2.46.2 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 03 05:17:19 2024 Received: (at 74056) by debbugs.gnu.org; 3 Nov 2024 10:17:19 +0000 Received: from localhost ([127.0.0.1]:59407 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t7Xfa-0000wO-Nq for submit@debbugs.gnu.org; Sun, 03 Nov 2024 05:17:19 -0500 Received: from eggs.gnu.org ([209.51.188.92]:41774) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t7XfY-0000wE-Db for 74056@debbugs.gnu.org; Sun, 03 Nov 2024 05:17:17 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t7XfR-0004iz-48; Sun, 03 Nov 2024 05:17:09 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=YjukCU+d7tKLkiOPK0pHFnzBpauNH8Rb79oZgBimkrs=; b=FQg2wNMsVd6GdzBWebZ0 /EWUAPlHIh1NlxcMBkqUmEc7N6jc7XNKMFWqWgG54jJgMi7FZwqkVwtFMzokuBZ5sKm8iMQym7l7I 1OwjbbYhIhjolOzysNd+GTFpsbIuEMs3iJ7wS9+F1WA+YeQlX6kHZzx+PWiu/SMALv7TrIFAtdYyX eFPhuZ5W5rbGudhb8Z9zPIIoATn7bw7M6ebnJptdQAjwJiy78H/ZWekKyPxqZ30CDI/ciUI9LJTIa mOVO8KGYH/da80bpwGSz6g+R5mDQsIwgDZWqzjkBrbox/H0adZtNadUVtNmPZ7oLMZLNpUiPThs4X 0npgU7RVLd384A==; From: Arash Esbati To: Ikumi Keita Subject: Re: bug#74056: `LaTeX-insert-item' inserts comment characters if called from inside comment In-Reply-To: <9601.1730538668@localhost> (Ikumi Keita's message of "Sat, 02 Nov 2024 18:11:08 +0900") References: <10090.1730184282@localhost> <11238.1730199619@localhost> <1992.1730368151@localhost> <5401.1730445943@localhost> <9601.1730538668@localhost> Date: Sun, 03 Nov 2024 11:17:05 +0100 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 74056 Cc: Vangelis Evangelou , 74056@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi Keita, Ikumi Keita writes: >>>>>> Arash Esbati writes: >> Thanks, I have 2 minor comments, see below. > >> I don't think we need to talk about the history in the manual. I >> suggest to change the last paragraph to something like this: > >> The default value of this option is @code{nil} in normal @LaTeX{} mode >> and is set to @code{t} in doc@TeX{} mode. > > OK. I've further simplified. > >> Reg. your other patch: Does it need an ERT-test? > > I think it's better to have one. I added. LGTM, thanks. Please go ahead and push them. Best, Arash From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 03 10:00:54 2024 Received: (at 74056) by debbugs.gnu.org; 3 Nov 2024 15:00:55 +0000 Received: from localhost ([127.0.0.1]:60905 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t7c62-0001l8-Ek for submit@debbugs.gnu.org; Sun, 03 Nov 2024 10:00:54 -0500 Received: from smtp1a.inetd.co.jp ([210.129.88.11]:50574) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t7c60-0001l2-Dk for 74056@debbugs.gnu.org; Sun, 03 Nov 2024 10:00:53 -0500 Received: from localhost (42-144-34-247.rev.home.ne.jp [42.144.34.247]) by smtp1a.inetd.co.jp (Postfix) with ESMTPSA id 8E80860; Mon, 4 Nov 2024 00:00:51 +0900 (JST) From: Ikumi Keita To: Arash Esbati Subject: Re: bug#74056: `LaTeX-insert-item' inserts comment characters if called from inside comment In-reply-to: References: <10090.1730184282@localhost> <11238.1730199619@localhost> <1992.1730368151@localhost> <5401.1730445943@localhost> <9601.1730538668@localhost> Comments: In-reply-to Arash Esbati message dated "Sun, 03 Nov 2024 11:17:05 +0100." X-Mailer: MH-E 8.6+git; nmh 1.8; Emacs 29.4 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3273.1730646052.1@localhost> Date: Mon, 04 Nov 2024 00:00:52 +0900 Message-ID: <3274.1730646052@localhost> X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 74056 Cc: Vangelis Evangelou , 74056@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >>>>> Arash Esbati writes: > LGTM, thanks. Please go ahead and push them. Thanks, I did. I'll close this bug. Regards, Ikumi Keita #StandWithUkraine #StopWarInUkraine #Gaza #StopMassiveKilling #CeasefireNOW From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 03 10:02:06 2024 Received: (at control) by debbugs.gnu.org; 3 Nov 2024 15:02:06 +0000 Received: from localhost ([127.0.0.1]:60917 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t7c7C-0001mo-HK for submit@debbugs.gnu.org; Sun, 03 Nov 2024 10:02:06 -0500 Received: from smtp1a.inetd.co.jp ([210.129.88.11]:50580) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t7c7A-0001mi-GA for control@debbugs.gnu.org; Sun, 03 Nov 2024 10:02:05 -0500 Received: from localhost (42-144-34-247.rev.home.ne.jp [42.144.34.247]) by smtp1a.inetd.co.jp (Postfix) with ESMTPSA id ADF7260 for ; Mon, 4 Nov 2024 00:02:03 +0900 (JST) To: control@debbugs.gnu.org From: Ikumi Keita Subject: control message for bug #74056 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3316.1730646124.1@localhost> Date: Mon, 04 Nov 2024 00:02:04 +0900 Message-ID: <3317.1730646124@localhost> X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) close 74056 quit From unknown Sat Sep 06 02:32:37 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 02 Dec 2024 12:24:06 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator