bug-auctex
[Top][All Lists]

## bug#48914: 2021-06-07; C-cC-e environment insertion with first line of c

 From: jfbu Subject: bug#48914: 2021-06-07; C-cC-e environment insertion with first line of contents commented out Date: Thu, 10 Jun 2021 17:27:11 +0200 User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:78.0) Gecko/20100101 Thunderbird/78.11.0

Hi Keita,

Le 10/06/2021 à 08:05, Ikumi Keita a écrit :

Hi Jean,


jfbu <jfbu@free.fr> writes:

The result is



% \begin{foo}
%   deliberately missing closing $after \simeq Reduces the background count rate by a factor of$R$($R\simeq 1/(1-.89) = 9.1
for the shielding I used).
% \end{foo}



Perhaps environment insertion should by default, except
if in doctex-mode, not use % ?



or use it only if **all** lines are commented out ?


has an effect of adding comment prefixes at the beginning of line for
some commands, and defaults to t.



Thank you.  I have set it to nil and will see what happens.



AUCTeX sets this option to t unconditionally in doctex mode, so the
current default makes the standard latex mode to behave like doctex mode
in some aspects. (I'm not sure why it defaults to t.)


It would be better to be able to set it to nil only in non-doctex mode.

But, although I do currently work often with doctex-mode, I rarely
insert an environment in comments, because
1. in my way of using dtx, the documentation for user is not commented
out in the file
2. only code comments are commented out (sic)
and I rarely (almost never) use environments as I use there most of
the time a custom tex macro for multi-paragraph \verb-like behaviour



Some other commands are affected when you set this to nil, so please
report if it brings any undesired experience for you.



I will try to be alert to changes I may detect.

Thanks for the tip.

Jean-François

`