Arash,

>   • In a terminal, do 'emacs -Q & RET'
>   • In the scratch buffer, paste this snippet (assuming that you've
>    installed AUCTeX from ELPA):

>     (progn
>      (package-initialize t)
>       (package-activate 'auctex)
>       (defun remove-electric-indent-mode ()
>         (electric-indent-local-mode -1))
>       (add-hook 'LaTeX-mode-hook 'remove-electric-indent-mode))

> put the curser after the last closing parenthesis and hit 'C-x C-e'

I did those.  The only response was for the echo area to say 
"(remove-electric-indent-mode)"

> • Now open a .tex file and check the value of the variable
>   `electric-indent-mode' (which should be nil)
>  • Also check the value of the variable `TeX-newline-function' which
>    should be `newline'.

Yes, both had the values that you expected (I checked with C-h v).

I then went to the .tex file

xxxx

\begin{itemize}
\item
    \begin{itemize}
    \item
    \end{itemize}test


\end{itemize}

put my cursor on the initial "t" in test and hit <Enter>.  The text moved to 
column 1 of the next line, as I wanted.  I'd sure like to make that permanent, 
if possible.

Thanks again,
Jim

    put the curser after the last closing parenthesis and hit 'C-x C-e'

________________________________________
From: Arash Esbati <ar...@gnu.org>
Sent: Wednesday, December 6, 2023 1:28
To: Hefferon, Jim S.
Cc: auctex-help
Subject: Re: Turn off auto-indent

⚠ External Sender ⚠


"Hefferon, Jim S." <jheffe...@smcvt.edu> writes:

> I did.  I opened a testemacs.tex and said C-h v
> "electric-indent-mode".  Here are the first few lines of the result.
>
> electric-indent-mode is a variable defined in ‘electric.el’.
> Its value is nil
> Original value was t
> Local in buffer testemacs.tex; global value is t
>
> That result looks sensible to me if it means that for .tex files it is
> nil, while for others it is t, maybe?

Yes, that looks Ok in terms of the minor mode is disabled for the .tex
file you're visiting.

Can you please run this procedure:

  • In a terminal, do 'emacs -Q & RET'
  • In the scratch buffer, paste this snippet (assuming that you've
    installed AUCTeX from ELPA):

     (progn
       (package-initialize t)
       (package-activate 'auctex)
       (defun remove-electric-indent-mode ()
         (electric-indent-local-mode -1))
       (add-hook 'LaTeX-mode-hook 'remove-electric-indent-mode))

    put the curser after the last closing parenthesis and hit 'C-x C-e'
  • Now open a .tex file and check the value of the variable
    `electric-indent-mode' (which should be nil)
  • Also check the value of the variable `TeX-newline-function' which
    should be `newline'.

> I put the the whole .emacs, below in case that is helpful, since it is
> only 41 lines.  Other than that, I think I have a standard Ubuntu
> emacs setup.

At a glance, I don't see anything suspicious.

Best, Arash

Reply via email to