3

when i open a .tex files, i always see

Applying style hooks...done
Sorting environment...done
Removing duplicates...done

yes, i use

(load "auctex.el" nil t t)
(load "preview-latex.el" nil t t)

in .emacs

now, i want to know:

which "duplicates" found and removed ?
which "style hooks" applied ?
which "enviroment" sorted ?
2

AUCTeX doesn't make a detailed log. If you want to see what it does, you'll have to explore the variables used by the corresponding function, or run it in a debugger. You can find the corresponding function by searching the message in the AUCTeX source code. (C-h m in a TeX file to open the major mode description, click the hyperlink to TeX-latex-mode, click the source link to latex.el, then M-x grep with the word to search and *.el.)

For style hooks, the function that prints the message is TeX-update-style in tex.el. It runs functions collected from various places. It runs style hooks registered for the file. You can find the list of style hooks that have run in the buffer-local variable TeX-active-styles (in reverse chronological order). In addition, it runs the hook functions in TeX-update-style-hook.

“Sorting environment” and “Removing duplicates” are from TeX-auto-list-information in tex.el which is called for things registered by TeX-auto-add-type. Environments are one of these things, there are also labels, bibliographies, symbols, etc. You can find the result of what it did in LaTeX-environment-list. More generally, "Sorting foo" operates on the content of a variable which is recorded in TeX-auto-parser: the variable's name is the third sublist element after "foo" (for example the sublist starting with "environment" is("environment" LaTeX-auto-environment LaTeX-add-environments LaTeX-environment-list LaTeX-environment-changed)so what has been sorted and deduplicated is the content of the variableLaTeX-environment-list). If you want to know how the entries were ordered before the sorting, you'd have to instrumentTeX-auto-list-information`, but this information is pretty boring.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.