From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Peter Dyballa Newsgroups: gmane.emacs.help Subject: Re: Always use UTF-8 mode with certain files Date: Tue, 23 Apr 2013 21:02:28 +0200 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Apple Message framework v1085) Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1366743760 28727 80.91.229.3 (23 Apr 2013 19:02:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 23 Apr 2013 19:02:40 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Juha Nieminen Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Apr 23 21:02:44 2013 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UUiUF-0004fO-MR for geh-help-gnu-emacs@m.gmane.org; Tue, 23 Apr 2013 21:02:43 +0200 Original-Received: from localhost ([::1]:55397 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UUiUF-00023q-Ai for geh-help-gnu-emacs@m.gmane.org; Tue, 23 Apr 2013 15:02:43 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:50039) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UUiU3-00023U-Nw for help-gnu-emacs@gnu.org; Tue, 23 Apr 2013 15:02:32 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UUiU2-0000yI-Gs for help-gnu-emacs@gnu.org; Tue, 23 Apr 2013 15:02:31 -0400 Original-Received: from mout.web.de ([212.227.15.3]:62528) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UUiU2-0000y5-8L for help-gnu-emacs@gnu.org; Tue, 23 Apr 2013 15:02:30 -0400 Original-Received: from sumac.fritz.box ([88.153.243.36]) by smtp.web.de (mrweb002) with ESMTPA (Nemesis) id 0M5woT-1Uk9uP1nCr-00xat8; Tue, 23 Apr 2013 21:02:28 +0200 In-Reply-To: X-Mailer: Apple Mail (2.1085) X-Provags-ID: V02:K0:vmDsmDWdtQOQx4BH1lTctyS9pDwNG5BtKdmjxrtmuJi 9htMwfP0Xmzw5AYny6WMcxDQtX8YdUVW4ke0l/EOT2jDKVvSoV pwsF+gOrrt2Vk6Z2RnqAimdtEEmfExVBQKckHURV5mm6keG/2N 0iP/tzBTpD+kondoDfR7r2gExjqMwQDwgbeBy3oUD6gFALW7MD gOoqVBHAZa+EpDIS6nCUw== X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 212.227.15.3 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:90312 Archived-At: Am 23.04.2013 um 14:25 schrieb Juha Nieminen: > I would like for emacs to always use UTF-8 mode when opening certain = files You can open all files, except they have local variables set or similar = settings to open in a different encoding, by setting in your environment = LANG and LC_CTYPE to some UTF-8 value. In your init file you can set = additionally: (prefer-coding-system 'utf-8) For /some/ instead of all file types you could use statements =E0 la: (add-to-list 'file-coding-system-alist '("\\.m\\'" . utf-8))=20 -- Greetings Pete We have to expect it, otherwise we would be surprised.