From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Steven Degutis Newsgroups: gmane.emacs.help Subject: Re: Always use UTF-8 mode with certain files Date: Tue, 23 Apr 2013 12:07:38 -0500 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: ger.gmane.org 1366736877 13889 80.91.229.3 (23 Apr 2013 17:07:57 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 23 Apr 2013 17:07:57 +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 19:08:01 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 1UUghF-0002wR-2U for geh-help-gnu-emacs@m.gmane.org; Tue, 23 Apr 2013 19:08:01 +0200 Original-Received: from localhost ([::1]:48652 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UUghE-00051k-Hs for geh-help-gnu-emacs@m.gmane.org; Tue, 23 Apr 2013 13:08:00 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:42163) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UUgh0-00051T-1Z for help-gnu-emacs@gnu.org; Tue, 23 Apr 2013 13:07:48 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UUggt-000890-Jp for help-gnu-emacs@gnu.org; Tue, 23 Apr 2013 13:07:45 -0400 Original-Received: from mail-da0-x22f.google.com ([2607:f8b0:400e:c00::22f]:53341) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UUggt-00088n-DE for help-gnu-emacs@gnu.org; Tue, 23 Apr 2013 13:07:39 -0400 Original-Received: by mail-da0-f47.google.com with SMTP id p1so437200dad.20 for ; Tue, 23 Apr 2013 10:07:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=B5HJhApSyHM2txo7LXZGgSwT5pVCGpewQKPik3dzIQg=; b=p19PlhAa1YV2ikvjcgVWEBC0f2Jyg7Zy9nwhAdNubxfNlCWjNDqH+JqcPiu/Dcymtr sXMjMFqna/NPoymamdmuCLht/hGIcWgGP5jfcJuRg7m3xQd/Depxy3CKGCDEZ7VvVdLq WanckZ8otOAJymmBwd1D3PK09GBC1v+BGlkM34PFbJpLCE2Vgo6w8p410Vvctnul1njJ 05PH8WM3f1lflNcJ/HFAFo8gA1giUZ/SZbp4aJ4AlhdCn5uBGWv1AwwGZxrjixjja9NZ vYug9XfUzd9TiFBB6REkonCaDYpWhCsYUwEJyLU39WSyZNTyKNmABfKQaEI+Uh7jF8PC SpNA== X-Received: by 10.68.111.195 with SMTP id ik3mr16709776pbb.89.1366736858195; Tue, 23 Apr 2013 10:07:38 -0700 (PDT) Original-Received: by 10.70.70.74 with HTTP; Tue, 23 Apr 2013 10:07:38 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400e:c00::22f 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:90310 Archived-At: This isn't a direct answer to the question, but I would point you to tip #1 in https://github.com/sdegutis/using-emacs#tips-about-pragmaticism -Steven On Tue, Apr 23, 2013 at 7:25 AM, Juha Nieminen wrote: > Hello. > > I would like for emacs to always use UTF-8 mode when opening certain > files (similarly as to what happens if I do a C-x C-m r utf-8, but > just when normally opening a file.) For example I would like this to > be the case when opening files with extensions .m, .mm and .h. > > I don't know what to write in the .emacs file for this to happen. (And > obviously it shouldn't interfere with any other hooks that are > triggered when opening such files...) >