auctex-devel
[Top][All Lists]
Advanced

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

[AUCTeX-devel] Re: About templates


From: Ralf Angeli
Subject: [AUCTeX-devel] Re: About templates
Date: Mon, 05 May 2008 23:17:49 +0200

* address@hidden (2008-05-05) writes:

> On Monday 05 May 2008, Ralf Angeli wrote:
>> * address@hidden (2008-05-05) writes:
>> > I wanted to use templates for latex files, so I tried the solution
>> > Ralf Angeli proposed some months ago in this mailing list. The problem
>> > with it is that loading auctex 11.85 causes (add-hook 'find-file-hook
>> > 'auto-insert) to fail, that is, evaluating find-file-hook when the
>> > buffer opens shows no sign of auto-insert and no text is added to the
>> > buffer.
>>
>> Try
>> (add-hook 'LaTeX-mode-hook 'auto-insert)
>
> Thanks, it works fine now.

It's a workaround.  AUCTeX modifies the buffer-local value of
`find-file-hook' to insert the local variables stanza.  The local hook
gets run before the global one and so there already is some content in
the buffer which prevents `auto-insert' from kicking in.  We should
probably put the AUCTeX addition to `find-file-hook' somewhere else, but
I haven't found a good place yet.

-- 
Ralf




reply via email to

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