help-gnu-emacs
[Top][All Lists]
Advanced

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

dir-locals and buffer-file-coding-system


From: doclist
Subject: dir-locals and buffer-file-coding-system
Date: Mon, 26 Oct 2009 10:15:37 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)

I have a directory containing many files which use a different coding
system than my default. I would like to set them all to open with the
proper coding system.

I tried using

(dir-locals-set-class-variables
 'euc-jp-encoding
 '((nil . ((buffer-file-coding-system . euc-jp-unix)
           (coding-system-for-read . euc-jp-unix)))))
     
which correctly sets the coding system when the file is opened, as
evidenced by the modeline, but the glyphs are not correctly
rendered. They are however rendered correctly when using
universal-coding-system-argument to open the file.

I suspect my problem is that coding-system-for-read is applied after the
file is opened.

What is the correct way to handle file coding for files in a sub-directory?





reply via email to

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