GNU bug report logs - #79556
14.0.7; TeX-add-style-hook of style files are ignored

Previous Next

Package: auctex;

Reported by: "Dr. Werner Fink" <werner <at> suse.de>

Date: Thu, 2 Oct 2025 10:00:02 UTC

Severity: normal

Found in version 14.0.7

Done: Arash Esbati <arash <at> gnu.org>

To reply to this bug, email your comments to 79556 AT debbugs.gnu.org.
There is no need to reopen the bug first.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-auctex <at> gnu.org:
bug#79556; Package auctex. (Thu, 02 Oct 2025 10:00:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Dr. Werner Fink" <werner <at> suse.de>:
New bug report received and forwarded. Copy sent to bug-auctex <at> gnu.org. (Thu, 02 Oct 2025 10:00:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: "Dr. Werner Fink" <werner <at> suse.de>
To: bug-auctex <at> gnu.org
Subject: 14.0.7; TeX-add-style-hook of style files are ignored
Date: Thu, 2 Oct 2025 11:57:27 +0200
[Message part 1 (text/plain, inline)]
Hi,

Just detected during writing a german letter with dinbrief class and
also seen with letter class and article class.  First one have to use
a name for the letter which does not have the same basename as the
AucTeX style file.  Means calling `emacs letter.tex` and using
letter as document class works as now the environment `letter` exists
and will do the questions given in letter.el.  But using an other
basename does not work that way. Also in this case the variable 
`LaTeX-default-document-environment` is `nil` ... the same with
a german letter with the dinbrief class which uses dinbrief.el.
In both cases the options are known but the hook is not expanded.
The same test with a fresh file using the article class ... the
in the `TeX-add-style-hook` added "abstract" environment is not known.

Emacs  : GNU Emacs 30.2 (build 1, x86_64-suse-linux-gnu, GTK+ Version 3.24.50, cairo version 1.18.4)
Package: 14.0.7

current state:
==============
(setq
 window-system 'x
 LaTeX-version "2e"
 TeX-style-path '("~/.emacs.d/auctex/"
		  "/usr/share/emacs/site-lisp/elpa/auctex-14.0.7/style"
		  "/suse/werner/.emacs.d/auctex/auto"
		  "/suse/werner/.emacs.d/auctex/style" "auto" "style")
 TeX-auto-save nil
 TeX-parse-self nil
 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 AmSTeX-mode Texinfo-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 (AmSTeX-mode) :help "Run AMSTeX")
		    ("ConTeXt" "%(cntxcom) --once %(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 %(O?aux)" TeX-run-BibTeX nil
		     (plain-TeX-mode LaTeX-mode docTeX-mode AmSTeX-mode
		      Texinfo-mode ConTeXt-mode)
		     :help "Run BibTeX")
		    ("Biber" "biber %(output-dir) %s" TeX-run-Biber nil
		     (plain-TeX-mode LaTeX-mode docTeX-mode AmSTeX-mode
		      Texinfo-mode)
		     :help "Run Biber")
		    ("Texindex" "texindex %s.??" TeX-run-command nil
		     (Texinfo-mode) :help "Run Texindex")
		    ("Texi2dvi" "%(PDF)texi2dvi %t" TeX-run-command nil
		     (Texinfo-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-TeX-mode LaTeX-mode docTeX-mode AmSTeX-mode
		      Texinfo-mode)
		     :help "Generate PostScript file")
		    ("Dvips" "%(o?)dvips %d -o %f " TeX-run-dvips nil
		     (plain-TeX-mode LaTeX-mode docTeX-mode AmSTeX-mode
		      Texinfo-mode)
		     :help "Convert DVI file to PostScript")
		    ("Dvipdfmx" "dvipdfmx -o %(O?pdf) %d" TeX-run-dvipdfmx nil
		     (plain-TeX-mode LaTeX-mode docTeX-mode AmSTeX-mode
		      Texinfo-mode)
		     :help "Convert DVI file to PDF with dvipdfmx")
		    ("Ps2pdf" "ps2pdf %f %(O?pdf)" TeX-run-ps2pdf nil
		     (plain-TeX-mode LaTeX-mode docTeX-mode AmSTeX-mode
		      Texinfo-mode)
		     :help "Convert PostScript file to PDF")
		    ("LaTeXMk"
		     "latexmk %(latexmk-out) %(file-line-error) %(output-dir) %`%(extraopts) %S%(mode)%' %t"
		     TeX-run-format nil (LaTeX-mode docTeX-mode) :help
		     "Run LaTeXMk")
		    ("Glossaries" "makeglossaries %(d-dir) %s" TeX-run-command
		     nil
		     (plain-TeX-mode LaTeX-mode docTeX-mode AmSTeX-mode
		      Texinfo-mode)
		     :help "Run makeglossaries to create glossary file")
		    ("Index" "makeindex %(O?idx)" TeX-run-index nil
		     (plain-TeX-mode LaTeX-mode docTeX-mode AmSTeX-mode
		      Texinfo-mode)
		     :help "Run makeindex to create index file")
		    ("upMendex" "upmendex %(O?idx)" TeX-run-index t
		     (plain-TeX-mode LaTeX-mode docTeX-mode AmSTeX-mode
		      Texinfo-mode)
		     :help "Run upmendex to create index file")
		    ("Xindy" "texindy %s" TeX-run-command nil
		     (plain-TeX-mode LaTeX-mode docTeX-mode AmSTeX-mode
		      Texinfo-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-mode)
		     :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
		     "Delete generated intermediate files")
		    ("Clean All" "(TeX-clean t)" TeX-run-function nil t :help
		     "Delete generated intermediate and output files")
		    ("Other" "" TeX-run-command t t :help
		     "Run an arbitrary command")
		    )
 )

[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-auctex <at> gnu.org:
bug#79556; Package auctex. (Thu, 02 Oct 2025 18:21:01 GMT) Full text and rfc822 format available.

Message #8 received at 79556 <at> debbugs.gnu.org (full text, mbox):

From: Arash Esbati <arash <at> gnu.org>
To: "Dr. Werner Fink" <werner <at> suse.de>
Cc: 79556 <at> debbugs.gnu.org
Subject: Re: bug#79556: 14.0.7; TeX-add-style-hook of style files are ignored
Date: Thu, 02 Oct 2025 20:20:27 +0200
Hi Werner,

"Dr. Werner Fink" <werner <at> suse.de> writes:

> Just detected during writing a german letter with dinbrief class and
> also seen with letter class and article class.  First one have to use
> a name for the letter which does not have the same basename as the
> AucTeX style file.  Means calling `emacs letter.tex` and using
> letter as document class works as now the environment `letter` exists
> and will do the questions given in letter.el.  But using an other
> basename does not work that way. Also in this case the variable 
> `LaTeX-default-document-environment` is `nil` ... the same with
> a german letter with the dinbrief class which uses dinbrief.el.
> In both cases the options are known but the hook is not expanded.
> The same test with a fresh file using the article class ... the
> in the `TeX-add-style-hook` added "abstract" environment is not known.

Thanks for the report.  I admit I'm not sure if I exactly understand
what you describe.  Can you please:

  • Set `TeX-parse-self' to t and try it again?  I see have you have
    that variable set to nil.

  • If that doesn't work, can you please provide a minimal .tex file for
    us in order to reproduce what you describe?

TIA.  Best, Arash




Information forwarded to bug-auctex <at> gnu.org:
bug#79556; Package auctex. (Sun, 30 Nov 2025 16:24:02 GMT) Full text and rfc822 format available.

Message #11 received at 79556 <at> debbugs.gnu.org (full text, mbox):

From: Arash Esbati <arash <at> gnu.org>
To: "Dr. Werner Fink" <werner <at> suse.de>
Cc: 79556 <at> debbugs.gnu.org
Subject: Re: bug#79556: 14.0.7; TeX-add-style-hook of style files are ignored
Date: Sun, 30 Nov 2025 17:23:19 +0100
Arash Esbati <arash <at> gnu.org> writes:

> "Dr. Werner Fink" <werner <at> suse.de> writes:
>
>> Just detected during writing a german letter with dinbrief class and
>> also seen with letter class and article class.  First one have to use
>> a name for the letter which does not have the same basename as the
>> AucTeX style file.  Means calling `emacs letter.tex` and using
>> letter as document class works as now the environment `letter` exists
>> and will do the questions given in letter.el.  But using an other
>> basename does not work that way. Also in this case the variable 
>> `LaTeX-default-document-environment` is `nil` ... the same with
>> a german letter with the dinbrief class which uses dinbrief.el.
>> In both cases the options are known but the hook is not expanded.
>> The same test with a fresh file using the article class ... the
>> in the `TeX-add-style-hook` added "abstract" environment is not known.
>
> Thanks for the report.  I admit I'm not sure if I exactly understand
> what you describe.  Can you please:
>
>   • Set `TeX-parse-self' to t and try it again?  I see have you have
>     that variable set to nil.
>
>   • If that doesn't work, can you please provide a minimal .tex file for
>     us in order to reproduce what you describe?

Ping!  Werner, any update about this issue?

Best, Arash




Information forwarded to bug-auctex <at> gnu.org:
bug#79556; Package auctex. (Mon, 01 Dec 2025 12:41:04 GMT) Full text and rfc822 format available.

Message #14 received at 79556 <at> debbugs.gnu.org (full text, mbox):

From: "Dr. Werner Fink" <werner <at> suse.de>
To: Arash Esbati <arash <at> gnu.org>
Cc: 79556 <at> debbugs.gnu.org
Subject: Re: bug#79556: 14.0.7; TeX-add-style-hook of style files are ignored
Date: Mon, 1 Dec 2025 13:40:28 +0100
[Message part 1 (text/plain, inline)]
On 2025/11/30 17:23:19 +0100, Arash Esbati wrote:
> Arash Esbati <arash <at> gnu.org> writes:
> 
> > "Dr. Werner Fink" <werner <at> suse.de> writes:
> >
> >> Just detected during writing a german letter with dinbrief class and
> >> also seen with letter class and article class.  First one have to use
> >> a name for the letter which does not have the same basename as the
> >> AucTeX style file.  Means calling `emacs letter.tex` and using
> >> letter as document class works as now the environment `letter` exists
> >> and will do the questions given in letter.el.  But using an other
> >> basename does not work that way. Also in this case the variable 
> >> `LaTeX-default-document-environment` is `nil` ... the same with
> >> a german letter with the dinbrief class which uses dinbrief.el.
> >> In both cases the options are known but the hook is not expanded.
> >> The same test with a fresh file using the article class ... the
> >> in the `TeX-add-style-hook` added "abstract" environment is not known.
> >
> > Thanks for the report.  I admit I'm not sure if I exactly understand
> > what you describe.  Can you please:
> >
> >   • Set `TeX-parse-self' to t and try it again?  I see have you have
> >     that variable set to nil.
> >
> >   • If that doesn't work, can you please provide a minimal .tex file for
> >     us in order to reproduce what you describe?
> 
> Ping!  Werner, any update about this issue?
> 
> Best, Arash

Hi,

thanks for pinging ... I've a simple patch to resolve this problem.
Beside missing parentheses the correct order of the LaTeX-add-environments
solve it for me.

Werner

-- 
  "Having a smoking section in a restaurant is like having
          a peeing section in a swimming pool." -- Edward Burr
[auctex-14.1.0-dinbrief.patch (text/x-patch, attachment)]
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-auctex <at> gnu.org:
bug#79556; Package auctex. (Tue, 02 Dec 2025 09:24:02 GMT) Full text and rfc822 format available.

Message #17 received at 79556 <at> debbugs.gnu.org (full text, mbox):

From: Arash Esbati <arash <at> gnu.org>
To: "Dr. Werner Fink" <werner <at> suse.de>
Cc: 79556 <at> debbugs.gnu.org
Subject: Re: bug#79556: 14.0.7; TeX-add-style-hook of style files are ignored
Date: Tue, 02 Dec 2025 10:23:27 +0100
"Dr. Werner Fink" <werner <at> suse.de> writes:

> thanks for pinging ... I've a simple patch to resolve this problem.
> Beside missing parentheses the correct order of the
> LaTeX-add-environments solve it for me.

Thanks, I installed that change under your name (9b8d8499).  While
skimming the code, what do think about this change:

--8<---------------cut here---------------start------------->8---
diff --git a/style/dinbrief.el b/style/dinbrief.el
index 3b3a800e..9e1ac4f3 100644
--- a/style/dinbrief.el
+++ b/style/dinbrief.el
@@ -117,7 +117,7 @@
         (address (LaTeX-dinbrief-recipient))
         (date (TeX-read-string "Datum: " (LaTeX-dinbrief-today)))
         (postremark (TeX-read-string "Postvermerk: "))
-        (fenster (TeX-read-string "Fenster (ja/nein): "))
+        (fenster (y-or-n-p "Fenster: "))
         (vermerk (TeX-read-string "Behandlungsvermerk: "))
         (verteil (TeX-read-string "Verteiler: "))
         (betreff (TeX-read-string "Betreff: "))
@@ -125,7 +125,7 @@
         (closing (TeX-read-string "Schluss: "))
         (signature (TeX-read-string "Unterschrift: "))
         (anlage (TeX-read-string "Anlagen: ")))
-    (if (string= fenster "ja")
+    (if fenster
         (progn
           (LaTeX-dinbrief-insert TeX-esc "enabledraftstandard")
           (newline-and-indent)
--8<---------------cut here---------------end--------------->8---

This should make it easier to select the "fenster" option; you don't
have to type "ja" or "nein".  WDYT?

Best, Arash




Information forwarded to bug-auctex <at> gnu.org:
bug#79556; Package auctex. (Tue, 02 Dec 2025 10:48:02 GMT) Full text and rfc822 format available.

Message #20 received at 79556 <at> debbugs.gnu.org (full text, mbox):

From: "Dr. Werner Fink" <werner <at> suse.de>
To: Arash Esbati <arash <at> gnu.org>
Cc: 79556 <at> debbugs.gnu.org
Subject: Re: bug#79556: 14.0.7; TeX-add-style-hook of style files are ignored
Date: Tue, 2 Dec 2025 11:46:53 +0100
[Message part 1 (text/plain, inline)]
On 2025/12/02 10:23:27 +0100, Arash Esbati wrote:
> "Dr. Werner Fink" <werner <at> suse.de> writes:
> 
> > thanks for pinging ... I've a simple patch to resolve this problem.
> > Beside missing parentheses the correct order of the
> > LaTeX-add-environments solve it for me.
> 
> Thanks, I installed that change under your name (9b8d8499).  While
> skimming the code, what do think about this change:
> 
> --8<---------------cut here---------------start------------->8---
> diff --git a/style/dinbrief.el b/style/dinbrief.el
> index 3b3a800e..9e1ac4f3 100644
> --- a/style/dinbrief.el
> +++ b/style/dinbrief.el
> @@ -117,7 +117,7 @@
>          (address (LaTeX-dinbrief-recipient))
>          (date (TeX-read-string "Datum: " (LaTeX-dinbrief-today)))
>          (postremark (TeX-read-string "Postvermerk: "))
> -        (fenster (TeX-read-string "Fenster (ja/nein): "))
> +        (fenster (y-or-n-p "Fenster: "))
>          (vermerk (TeX-read-string "Behandlungsvermerk: "))
>          (verteil (TeX-read-string "Verteiler: "))
>          (betreff (TeX-read-string "Betreff: "))
> @@ -125,7 +125,7 @@
>          (closing (TeX-read-string "Schluss: "))
>          (signature (TeX-read-string "Unterschrift: "))
>          (anlage (TeX-read-string "Anlagen: ")))
> -    (if (string= fenster "ja")
> +    (if fenster
>          (progn
>            (LaTeX-dinbrief-insert TeX-esc "enabledraftstandard")
>            (newline-and-indent)
> --8<---------------cut here---------------end--------------->8---
> 
> This should make it easier to select the "fenster" option; you don't
> have to type "ja" or "nein".  WDYT?

Sound reasonable indeed! Thanks for the proposal.

Werner

-- 
  "Having a smoking section in a restaurant is like having
          a peeing section in a swimming pool." -- Edward Burr
[signature.asc (application/pgp-signature, inline)]

Reply sent to Arash Esbati <arash <at> gnu.org>:
You have taken responsibility. (Tue, 02 Dec 2025 11:38:02 GMT) Full text and rfc822 format available.

Notification sent to "Dr. Werner Fink" <werner <at> suse.de>:
bug acknowledged by developer. (Tue, 02 Dec 2025 11:38:02 GMT) Full text and rfc822 format available.

Message #25 received at 79556-done <at> debbugs.gnu.org (full text, mbox):

From: Arash Esbati <arash <at> gnu.org>
To: "Dr. Werner Fink" <werner <at> suse.de>
Cc: 79556-done <at> debbugs.gnu.org
Subject: Re: bug#79556: 14.0.7; TeX-add-style-hook of style files are ignored
Date: Tue, 02 Dec 2025 12:37:30 +0100
"Dr. Werner Fink" <werner <at> suse.de> writes:

> Sound reasonable indeed! Thanks for the proposal.

Thanks for the confirmation.  I pushed that change as well, so I'm
closing this report.

Best, Arash




This bug report was last modified 2 days ago.

Previous Next


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