I use Emacs+AUCTex for writing LaTeX documents. I have specific needs so my typical preamble is quite long. Today, I have a .tex file with only this preamble (a template so) and I use C-x C-w to write a new file from this template. It isn't the best solution because my template localization could be far away from the new file.
So is there a way to call LaTeX templates in Emacs in another (shorter) way?
EDIT : auto-insert-mode offers a way to achieve what I want but it doesn't put automatically my template (LaTeX preamble) when I create a .tex file. I have to launch M-x auto-insert. How can I automatize this based on the file extension?
insert-file
. If using OSX, theninsert-file-from-osx-panel
is available if Emacs was built--with-ns
. – lawlist