[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#36217: style hooks not automatically applied for non-master files
From: |
Ikumi Keita |
Subject: |
bug#36217: style hooks not automatically applied for non-master files |
Date: |
Wed, 19 Jun 2019 20:05:37 +0900 |
Hi Ryan,
>>>>> Ryan Kavanagh <address@hidden> 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::.
`----
Regards,
Ikumi Keita