GNU bug report logs -
#63573
13.2.0; automatic style generation & loading unclear / does not work as expected
Previous Next
Reported by: Sebastian Drude <drude <at> xs4all.nl>
Date: Thu, 18 May 2023 15:33:01 UTC
Severity: normal
Tags: notabug
Found in version 13.2.0
Done: Ikumi Keita <ikumi <at> ikumi.que.jp>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 63573 in the body.
You can then email your comments to 63573 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-auctex <at> gnu.org
:
bug#63573
; Package
auctex
.
(Thu, 18 May 2023 15:33:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Sebastian Drude <drude <at> xs4all.nl>
:
New bug report received and forwarded. Copy sent to
bug-auctex <at> gnu.org
.
(Thu, 18 May 2023 15:33:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hello, friendly AucTeX help community,
I am not sure whether I did miss something or something is genuinely not
working as it should.
I am testing with a minimal (La)TeX-file, main.tex, with the following
local variables set at the bottom:
%%% Local Variables:
%%% mode: latex
%%% TeX-master: t
%%% TeX-engine: xetex
%%% TeX-auto-save: t
%%% TeX-parse-self: t
%%% End:
When opening (‘finding’) the file, AucTeX does not produce the Style
files for this file; I have to do that manually with *TeX-normal-mode*
(C-c C-n). But that does only produce the /./auto/main.el/ style, not
any other style files loaded by main.
I am using the langscibook class and their skeleton, which uses
customization files starting with “local”, in particular:
\input{/localpackages/}
\input{/localcommands/}
\addbibresource{/localbibliography.bib/}
The AucTeX-style-files for these are not automatically generated (why?);
I have to do that with *TeX-auto-generate* on the directory. Then, the
style file for /localcommands.tex/ and /localbibliography.bib/ are
generated (I put them into the ./auto/-directory).
But there is no style file for localpackages.tex. For testing, it
contains only one command: \usepackage{/IL-format/}. Even when I run
*TeX-auto-generate* manually directly on the localpackages.tex file, no
style file seems to be generated. This appears really odd and
unexpected to me.
The style file for /IL-format.sty/ is in ~/.emacs.d/auctex/auto/, so it
should be accessible to AucTeX, but it is not loaded: its commands are
not available when editing main.tex.
Even when I manually add "IL-format" to the TeX-run-style-hooks in the
TeX-add-style-hook in ./auto/main.el and load the main.tex file again,
the commands are not available.
The expected behavior, from what I understand from the documentation
(but this is not really spelled out, or am I missing something? where
is that explained in detail?) would be that the main style file and the
dependent style files are generated automatically in ./auto when I open
and parse the file /main.tex/, at least when I parse it manually with
*TeX-normal-mode*.
Then I would expect a style file for the /localpackages.tex/ file to be
generated, at least when I manually generate all style files in my
current directory, and in particular when I run *TeX-auto-generate*
directly on that file.
And finally, I would AucTeX expect to load the existing style file for
my own macro package /IL-format.sty/ in /~/.emacs.d/auctex/auto//, in
particular when I put that file in the list of TeX-run-style-hooks in
the style file /./auto/main.el/ that is loaded when parsing /main.tex/.
I annex the relevant files, and the configuration below shows that my
paths should be configured correctly.
Where is the generation of style files and their loading described? I
found the information in the AucTeX manual (info) not very helpful for
answering these questions. But as I said, probably I am missing
something. Please point me to the documentation that I was not able to
find.
Thanks in advance for all help!
Sebastian
Emacs : GNU Emacs 27.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version
3.24.30, cairo version 1.16.0)
of 2022-01-24, modified by Debian
Package: 13.2.0
current state:
==============
(setq
AUCTeX-date "2023-04-24"
window-system 'x
LaTeX-version "2e"
TeX-style-path '("~/.emacs.d/auctex"
"/home/sebastian/.emacs.d/elpa/auctex-13.2.0/style"
"/home/sebastian/.emacs.d/auctex/auto"
"/home/sebastian/.emacs.d/auctex/style" "auto" "style")
TeX-auto-save t
TeX-parse-self t
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 ams-tex-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
(ams-tex-mode) :help "Run AMSTeX")
("ConTeXt" "%(cntxcom) --once --texutil %(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 ams-tex-mode
texinfo-mode context-mode) :help "Run BibTeX")
("Biber" "biber %(output-dir) %s" TeX-run-Biber nil
(plain-tex-mode latex-mode doctex-mode ams-tex-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 ams-tex-mode
texinfo-mode) :help "Generate PostScript file")
("Dvips" "%(o?)dvips %d -o %f " TeX-run-dvips nil
(plain-tex-mode latex-mode doctex-mode ams-tex-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 ams-tex-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 ams-tex-mode
texinfo-mode) :help
"Convert PostScript file to PDF")
("Glossaries" "makeglossaries %(d-dir) %s" TeX-run-command nil
(plain-tex-mode latex-mode doctex-mode ams-tex-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 ams-tex-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 ams-tex-mode
texinfo-mode) :help
"Run upmendex to create index file")
("Xindy" "texindy %s" TeX-run-command nil
(plain-tex-mode latex-mode doctex-mode ams-tex-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"))
)
[Message part 2 (text/html, inline)]
[HOME.zip (application/zip, attachment)]
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#63573
; Package
auctex
.
(Fri, 19 May 2023 11:26:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 63573 <at> debbugs.gnu.org (full text, mbox):
Hi Sebastian,
>>>>> Sebastian Drude <drude <at> xs4all.nl> writes:
> When opening (‘finding’) the file, AucTeX does not produce the Style
> files for this file; I have to do that manually with *TeX-normal-mode*
> (C-c C-n). But that does only produce the /./auto/main.el/ style, not
> any other style files loaded by main.
TeX-normal-mode generates style files for the current buffer only.
> I am using the langscibook class and their skeleton, which uses
> customization files starting with “local”, in particular:
> \input{/localpackages/}
> \input{/localcommands/}
> \addbibresource{/localbibliography.bib/}
> The AucTeX-style-files for these are not automatically generated
> (why?);
AUCTeX generates style files, when `TeX-auto-save' is non-nil, only when
it saves the document file; it doesn't when it opens the document file.
> I have to do that with *TeX-auto-generate* on the directory.
> Then, the style file for /localcommands.tex/ and
> /localbibliography.bib/ are generated (I put them into the
> ./auto/-directory).
Those are expected behaviors.
> But there is no style file for localpackages.tex. For testing, it
> contains only one command: \usepackage{/IL-format/}. Even when I run
> *TeX-auto-generate* manually directly on the localpackages.tex file,
> no style file seems to be generated. This appears really odd and
> unexpected to me.
Add local variables section to localpackages.tex file like this:
----------------------------------------------------------------------
%%% Local Variables:
%%% mode: latex
%%% TeX-master: "main"
%%% End:
----------------------------------------------------------------------
You can use C-c _ (TeX-master-file-ask) in the buffer to add this part.
Without the "mode: latex" tag, AUCTeX doesn't recognize that this is
LaTeX file and regards it as plain TeX file instead. That's the reason
that `TeX-auto-generate' didn't work for you; plain TeX parsing routine
doesn't know \usepackage.
> The style file for /IL-format.sty/ is in ~/.emacs.d/auctex/auto/, so
> it should be accessible to AucTeX, but it is not loaded: its commands
> are not available when editing main.tex.
The above local variable section solves this issue at the same time.
> The expected behavior, from what I understand from the documentation
> (but this is not really spelled out, or am I missing something? where
> is that explained in detail?)
I admit that its detail isn't documented.
https://www.gnu.org/software/auctex/manual/auctex/Multifile.html#Multifile
----------------------------------------------------------------------
[...] Each time you save a file, AUCTeX will write information about the
file into the ‘auto’ directory. When you load a file, AUCTeX will read
the information in the ‘auto’ directory about the file you loaded and
the master file specified by TeX-master. [...]
AUCTeX will create the ‘auto’ directory automatically if TeX-auto-save
is non-nil.
----------------------------------------------------------------------
https://www.gnu.org/software/auctex/manual/auctex/Parsing-Files.html#Parsing-Files
----------------------------------------------------------------------
[...] The latter command will make AUCTeX store the parsed information
in an ‘auto’ subdirectory in the directory each time the TeX files are
stored
----------------------------------------------------------------------
https://www.gnu.org/software/auctex/manual/auctex/Automatic-Local.html#Automatic-Local
----------------------------------------------------------------------
AUCTeX can update the style information about a file each time you save
it if TeX-auto-save option is enabled. Saved information will be stored
in the directory TeX-auto-local, set to ‘"auto"’ by default.
----------------------------------------------------------------------
> Where is the generation of style files and their loading described? I
> found the information in the AucTeX manual (info) not very helpful for
> answering these questions. But as I said, probably I am missing
> something. Please point me to the documentation that I was not able
> to find.
Sorry for inconvenience. Maybe AUCTeX document should have more detailed
information about such topics.
Regards,
Ikumi Keita
#StandWithUkraine #StopWarInUkraine
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#63573
; Package
auctex
.
(Thu, 25 May 2023 22:11:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 63573 <at> debbugs.gnu.org (full text, mbox):
Dear Ikumi,
thanks a lot for your helpful answers, and sorry for my late reply.
My comments below.
Thanks again, best greetings,
Sebastian
> TeX-normal-mode generates style files for the current buffer only.
Right. I would have expected that also missing AucTeX style files for
the LaTeX-styles of the current buffer would be generated.
> AUCTeX generates style files, when `TeX-auto-save' is non-nil, only when
> it saves the document file; it doesn't when it opens the document file.
Okay. Still, I have opened and closed the file several times.
>> I have to do that with *TeX-auto-generate* on the directory.
>> Then, the style file for /localcommands.tex/ and
>> /localbibliography.bib/ are generated (I put them into the
>> ./auto/-directory).
> Those are expected behaviors.
Fine.
>> But there is no style file for localpackages.tex. For testing, it
>> contains only one command: \usepackage{/IL-format/}. Even when I run
>> *TeX-auto-generate* manually directly on the localpackages.tex file,
>> no style file seems to be generated. This appears really odd and
>> unexpected to me.
> Add local variables section to localpackages.tex file like this:
> ----------------------------------------------------------------------
> %%% Local Variables:
> %%% mode: latex
> %%% TeX-master: "main"
> %%% End:
> ----------------------------------------------------------------------
> You can use C-c _ (TeX-master-file-ask) in the buffer to add this part.
>
> Without the "mode: latex" tag, AUCTeX doesn't recognize that this is
> LaTeX file and regards it as plain TeX file instead. That's the reason
> that `TeX-auto-generate' didn't work for you; plain TeX parsing routine
> doesn't know \usepackage.
Okay, this makes sense, and thanks, this worked.
>> The style file for /IL-format.sty/ is in ~/.emacs.d/auctex/auto/, so
>> it should be accessible to AucTeX, but it is not loaded: its commands
>> are not available when editing main.tex.
> The above local variable section solves this issue at the same time.
Correct!
>> The expected behavior, from what I understand from the documentation
>> (but this is not really spelled out, or am I missing something? where
>> is that explained in detail?)
> I admit that its detail isn't documented.
> https://www.gnu.org/software/auctex/manual/auctex/Multifile.html#Multifile
> ----------------------------------------------------------------------
> [...] Each time you save a file, AUCTeX will write information about the
> file into the ‘auto’ directory. When you load a file, AUCTeX will read
> the information in the ‘auto’ directory about the file you loaded and
> the master file specified by TeX-master. [...]
>
> AUCTeX will create the ‘auto’ directory automatically if TeX-auto-save
> is non-nil.
Yes, I read that, but indeed, the info on my problems are not really
addressed.
> ----------------------------------------------------------------------
> https://www.gnu.org/software/auctex/manual/auctex/Parsing-Files.html#Parsing-Files
> ----------------------------------------------------------------------
> [...] The latter command will make AUCTeX store the parsed information
> in an ‘auto’ subdirectory in the directory each time the TeX files are
> stored
> ----------------------------------------------------------------------
> https://www.gnu.org/software/auctex/manual/auctex/Automatic-Local.html#Automatic-Local
> ----------------------------------------------------------------------
> AUCTeX can update the style information about a file each time you save
> it if TeX-auto-save option is enabled. Saved information will be stored
> in the directory TeX-auto-local, set to ‘"auto"’ by default.
> ----------------------------------------------------------------------
>
>> Where is the generation of style files and their loading described? I
>> found the information in the AucTeX manual (info) not very helpful for
>> answering these questions. But as I said, probably I am missing
>> something. Please point me to the documentation that I was not able
>> to find.
> Sorry for inconvenience. Maybe AUCTeX document should have more detailed
> information about such topics.
Agreed. Once more, thank you for being so helpful (and quick), this
makes up for the not very detailed info in the manual.
> Regards,
> Ikumi Keita
> #StandWithUkraine #StopWarInUkraine
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#63573
; Package
auctex
.
(Fri, 26 May 2023 15:47:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 63573 <at> debbugs.gnu.org (full text, mbox):
Hi Sebastian,
>>>>> Sebastian Drude <drude <at> xs4all.nl> writes:
> Dear Ikumi,
> thanks a lot for your helpful answers, and sorry for my late reply.
> My comments below.
> Thanks again, best greetings,
You're welcome. Thanks for reporting back, I'll close this bug.
Regards,
Ikumi Keita
#StandWithUkraine #StopWarInUkraine
Added tag(s) notabug.
Request was from
Ikumi Keita <ikumi <at> ikumi.que.jp>
to
control <at> debbugs.gnu.org
.
(Fri, 26 May 2023 15:48:02 GMT)
Full text and
rfc822 format available.
bug closed, send any further explanations to
63573 <at> debbugs.gnu.org and Sebastian Drude <drude <at> xs4all.nl>
Request was from
Ikumi Keita <ikumi <at> ikumi.que.jp>
to
control <at> debbugs.gnu.org
.
(Fri, 26 May 2023 15:48:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sat, 24 Jun 2023 11:24:08 GMT)
Full text and
rfc822 format available.
This bug report was last modified 1 year and 322 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.