From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: doclist Newsgroups: gmane.emacs.help Subject: dir-locals and buffer-file-coding-system Date: Mon, 26 Oct 2009 10:15:37 -0400 Message-ID: <87hbtmtf5i.fsf@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1256583953 11018 80.91.229.12 (26 Oct 2009 19:05:53 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 26 Oct 2009 19:05:53 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Oct 26 20:05:46 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1N2Usx-0004Z2-8D for geh-help-gnu-emacs@m.gmane.org; Mon, 26 Oct 2009 20:05:43 +0100 Original-Received: from localhost ([127.0.0.1]:48261 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N2Usw-0000pa-Oq for geh-help-gnu-emacs@m.gmane.org; Mon, 26 Oct 2009 15:05:42 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N2QMW-0003Mx-1j for help-gnu-emacs@gnu.org; Mon, 26 Oct 2009 10:15:56 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N2QMR-0003ML-RO for help-gnu-emacs@gnu.org; Mon, 26 Oct 2009 10:15:55 -0400 Original-Received: from [199.232.76.173] (port=48285 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N2QMR-0003MH-NY for help-gnu-emacs@gnu.org; Mon, 26 Oct 2009 10:15:51 -0400 Original-Received: from mail-qy0-f196.google.com ([209.85.221.196]:47765) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1N2QMR-00025p-C2 for help-gnu-emacs@gnu.org; Mon, 26 Oct 2009 10:15:51 -0400 Original-Received: by qyk34 with SMTP id 34so6631354qyk.14 for ; Mon, 26 Oct 2009 07:15:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:subject:date :message-id:user-agent:mime-version:content-type; bh=VG1gljuPDVYa4X/1EDl1B+tjb/phhN46hJEmXH6XrdI=; b=fTSvWtbksBZwFJG5VKNWjMYQi0X8OCP51NJ2oB8M51/EFUDH7NekmD9yUSvrsj6M2K Dxkn2zu63nz1X9iet/be4FWF/lJMImdvGhe9aN0ROLurUh4kd0E2Fie5TX+4nG6efpc7 vhZZhzpsf1IvBKybIaH/LuGb25duNAWDS5ODY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:date:message-id:user-agent:mime-version :content-type; b=QiTEe4XL44A1y/ioJZZ+g7EGoRN50GuyesuyFZ29HyZ3NHJ3wCufYEl2/lmIHnbMkE ucSkNGiGV2lqsJJzseaEa1r6ztGMKirKO9Epy0AHwu3DFpj76nRt0pmxGL+IhnALL4Q4 fcYBeKc3h3bvPskjrYCwu3PI+6B6PnQTtio9k= Original-Received: by 10.224.43.168 with SMTP id w40mr7225567qae.19.1256566550444; Mon, 26 Oct 2009 07:15:50 -0700 (PDT) Original-Received: from argus ([70.50.9.51]) by mx.google.com with ESMTPS id 6sm10513493qwk.34.2009.10.26.07.15.48 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 26 Oct 2009 07:15:49 -0700 (PDT) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-Mailman-Approved-At: Mon, 26 Oct 2009 15:04:19 -0400 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:69251 Archived-At: 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?