bug-auctex
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#36217: style hooks not automatically applied for non-master files


From: Arash Esbati
Subject: bug#36217: style hooks not automatically applied for non-master files
Date: Tue, 05 Mar 2024 10:12:15 +0100
User-agent: Gnus/5.13 (Gnus v5.13)

Ikumi Keita <ikumi@ikumi.que.jp> writes:

> Hi Ryan,
>
>>>>>> Ryan Kavanagh <rak@debian.org> writes:
>> Steps to reproduce
>> ------------------
>
>> Create the following directory hierarchy
>
>>     foo/
>>         main.tex
>>         foo.tex
>
>> with the following contents:
>
> [ ... ]
>
>> Then
>
>> 1. Make sure foo/auto does not exist.
>
>> 2. Open foo.tex and notice that \cref{sec:foo} is not syntax-highlighted
>
>> 3. Exit emacs and open main.tex.  Notice that \cref{sec:foo} has
>> highlighting.
>
>> 4. Open foo.tex again. Same problem as #2. At this point, the 'auto/'
>> directory does not yet exist.
>
>> 5. Exit emacs and open main.tex. Go 'C-c C-n' and exit.
>
>> 6. Open foo.tex and observe that '\cref' has highlighting. This is
>> because 'auto/main.el' runs the style hook "cleveref".
>
> In my humble opinion, this is an expected behavior of AUCTeX.  By
> default, AUCTeX does not propagate information about parent (master)
> file to its child file.
>
> Perhaps something similar to what you want is the user option
> `TeX-auto-save'.  When this is enabled, auto/main.el is created
> automatically whenever you save main.tex.
>
> ,----[ Info node (auctex)Parsing Files ]
> | AUCTeX depends heavily on being able to extract information from the
> | buffers by parsing them.  Since parsing the buffer can be somewhat slow,
> | the parsing is initially disabled.  You are encouraged to enable them by
> | adding the following lines to your '.emacs' file.
> | 
> |      (setq TeX-parse-self t) ; Enable parse on load.
> |      (setq TeX-auto-save t) ; Enable parse on save.
> | 
> |    The latter command will make AUCTeX store the parsed information in
> | an 'auto' subdirectory in the directory each time the TeX files are
> | stored, *note Automatic Local::.
> `----

(I'm going through old bug reports that unfortunately weren't resolved
at the time.)

No further comments, so I'm closing this report.

Best, Arash





reply via email to

[Prev in Thread] Current Thread [Next in Thread]