[Top][All Lists]

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

[AUCTeX] have AUCTeX insert the encoding as local variable specification

From: jfbu
Subject: [AUCTeX] have AUCTeX insert the encoding as local variable specification
Date: Fri, 28 Nov 2014 19:52:25 +0100


This is a suggestion.

AUCTeX 11.88 prompts for packages, and one can
choose inputenc, and then, elegantly, one gets
asked whether the buffer encoding should be set 
to match the inputenc parameter.

could this be also accompanied by insertion of
a local variable line such as

% -*- coding: iso-latin-1; -*-  

at the top ?

Perhaps this would be inserted only if the
chosen encoding differs from the one to
which .tex files defaults according to a

Thus, as the default proposed by AUCTeX for inputenc
is utf8, if it is seen that this is also the default
for opening a .tex file, then the insertion of the
coding local variable could be skipped.

On the other hand, for files destined to be exchanged
with people I believe it is always better to have
some specification of the encoding which is internal
to the file. (such specification will be viewer specific
but anyhow it doesn't harm if following a % )

So far, I don't know if there are TeX-devoted editors
which parse the file to look for the inputenc parameter
and adjust accordingly automatically the encoding.

as far as I know, Emacs/AUCTeX does not do it.


reply via email to

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