Hi Paul,
"Paul D. Nelson" <[email protected]> writes:
> To reproduce:
>
> 1. Enable auto-insert-mode, with auto-insert-query non-nil and some
> auto-insert-alist entry matching "\.tex\'".
I tried your recipe with this:
--8<---------------cut here---------------start------------->8---
(progn
(setq auto-insert-query t)
(setq auto-insert-alist
`(("\\.tex\\'"
;; should try to offer completing read for these
"options, RET: "
"\\documentclass[" str & ?\] | -1
?{ (read-string "class: ") "}\n"
("package, %s: "
"\\usepackage[" (read-string "options, RET: ") & ?\] | -1 ?{ str
"}\n")
_ "\n\\begin{document}\n" _
"\n\\end{document}")))
(auto-insert-mode) )
--8<---------------cut here---------------end--------------->8---
> 2. Create a buffer running LaTeX-mode, but do not save it to a file.
>
> 3. Write a valid LaTeX document and run M-x preview-buffer.
>
> Emacs then asks you whether to perform TeX auto-insertion. This seems
> undesired and doesn't make much sense from a user POV.
Yes, the result is confusing.
> From 0d5b9ed72c92dd5e1f1c61efcc21dc154a03a4e6 Mon Sep 17 00:00:00 2001
> From: Paul Nelson <[email protected]>
> Date: Thu, 25 Jun 2026 14:46:10 +0200
> Subject: [PATCH] Avoid auto-insert when visiting TeX master file
>
> * tex.el (auto-insert): Add defvar.
> (TeX-region-create): Bind auto-insert to nil while visiting the
> master file.
My only comment is to wrap `auto-insert' in quotes in the ChangeLog body
and add the bug number before pushing.
TIA. Best, Arash
_______________________________________________
bug-auctex mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-auctex