bug-auctex
[Top][All Lists]
Advanced

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

Re: [Bug-AUCTeX] 11.85; TeX-parse-self is not active


From: Ralf Angeli
Subject: Re: [Bug-AUCTeX] 11.85; TeX-parse-self is not active
Date: Sat, 13 Sep 2008 13:02:58 +0200

* Harald von Aschen (2008-09-12) writes:

> See AucTeX documentation chapter 9 "Automatic Parsing" (pg. 54?):
>
>      (setq TeX-auto-save t) ; Enable parse on save.
>
> But below this:
>
>      TeX-auto-save [User Option]
>      Automatically save style information when saving the buffer.
>
> For me, it seems that the variable set with setq 
> is the same as the variable below and does not "enable parse on save".

Parse on save will only happen if the variable is non-nil.  However,
setting it to a non-nil value does not force parse on save to happen
every time.  AUCTeX adds `TeX-safe-auto-write' to
`{local-}write-file-hooks'.  This means `TeX-auto-write' will be called
when a file is about to be saved and `TeX-auto-write' will only call
`TeX-update-style' if `TeX-auto-save' is non-nil.  And
`TeX-update-style' may trigger parsing under certain circumstances.

> But for me it is not a bug it is by design and it 
> is totally correct; this means: Parsing is not 
> done for each word I'm typing, parsing is not 
> done "automagically" on save, but only manually or by reopening file.

This is not correct.  See above.

One should note that parsing is done to determine properties of the
document, e.g. the LaTeX packages used.  AUCTeX can get to know such
information as well while the document is being written if its
facilities for inserting macros and the like are used.  So for example
if you do `C-c <RET> usepackage <RET> babel <RET> ...' AUCTeX will
recognize that the babel package is used and load the respective AUCTeX
style file.  If you only type "\usepackage[english]{babel}" into the
buffer, AUCTeX will not immediately know about it but has to learn about
the use of the babel package at the next occasion where parsing is done.

-- 
Ralf




reply via email to

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