[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [AUCTeX] Can the hook `TeX-after-compilation-finished-functions' wor
From: |
Diogo F. S. Ramos |
Subject: |
Re: [AUCTeX] Can the hook `TeX-after-compilation-finished-functions' work as a file local variable? |
Date: |
Wed, 11 Apr 2018 18:24:12 -0300 |
>> I'm setting the hook `TeX-after-compilation-finished-functions' as a
>> file local variable, but the functions aren't being called after I
>> compile my document. Shouldn't they?
> try adding your function to the hook with `add-hook'; this works for me:
>
> ...
> \end{document}
>
> %%% Local Variables:
> %%% mode: latex
> %%% TeX-master: t
> %%% eval: (add-hook 'TeX-after-compilation-finished-functions (lambda (x)
> (message "hello, world!")))
> %%% End:
Ah, thank you, Arash. But I think then the variable
`TeX-after-compilation-finished-functions' won't be file local. I want
it to be file local so the function in hook will only execute if I
compile this document.
What I thought of doing, if the variable
`TeX-after-compilation-finished-functions' can't be file local, is to
add my function to the hook anyway, and inside the function, check if
it's running after the compilation of the document I want. Something
like:
(lambda (file)
(when (= file "/file/that/I/want")
...))