From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Phillip Lord Newsgroups: gmane.emacs.help Subject: input methods per file Date: Thu, 24 Jan 2008 14:29:15 +0000 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1201185165 23859 80.91.229.12 (24 Jan 2008 14:32:45 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 24 Jan 2008 14:32:45 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jan 24 15:33:03 2008 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 1JI38O-0001Xd-U8 for geh-help-gnu-emacs@m.gmane.org; Thu, 24 Jan 2008 15:32:53 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JI37y-0005SH-JL for geh-help-gnu-emacs@m.gmane.org; Thu, 24 Jan 2008 09:32:26 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JI37h-0005Rs-8P for help-gnu-emacs@gnu.org; Thu, 24 Jan 2008 09:32:09 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JI37c-0005RF-Vs for help-gnu-emacs@gnu.org; Thu, 24 Jan 2008 09:32:08 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JI37c-0005RB-Ln for help-gnu-emacs@gnu.org; Thu, 24 Jan 2008 09:32:04 -0500 Original-Received: from cheviot8.ncl.ac.uk ([128.240.234.5]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JI37c-000626-ED for help-gnu-emacs@gnu.org; Thu, 24 Jan 2008 09:32:04 -0500 X-Newcastle-MailScanner-Watermark: 1201789895.55733@szf+24TMNDpGSYmoJxXWnA Original-Received: from smtpauth1.ncl.ac.uk (smtpauth1.ncl.ac.uk [10.8.232.41]) by cheviot8.ncl.ac.uk (8.13.1/8.13.1) with ESMTP id m0OEVY2k030646 for ; Thu, 24 Jan 2008 14:31:34 GMT Original-Received: from HAUGHTON (dyn018v.cs.york.ac.uk [144.32.175.107]) (authenticated bits=0) by smtpauth1.ncl.ac.uk (8.13.8/8.13.8) with ESMTP id m0OEVWP7013639 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 24 Jan 2008 14:31:34 GMT User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.99 (windows-nt) X-Newcastle-MailScanner-Information: Please contact Postmaster@newcastle.ac.uk for more information X-Newcastle-MailScanner: Found to be clean X-Newcastle-MailScanner-MCPCheck: X-Newcastle-MailScanner-From: phillip.lord@newcastle.ac.uk X-NCL-Spam-Status: No X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) 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:50910 Archived-At: I've been tearing my hair out about this, but being new to internationalisation, I can't find an answer. I'm trying to set an input method on a per file basis. Most of the time I don't use an one, but a few files that I have are written in a different language. I've tried putting this at the end of the file. ;; Local Variables: *** ;; eval: (set-input-method "italian-postfix") *** ;; End: *** Which works well, but is a pain because I get asked a yes no question as eval is risky. As I use desktop to re-open my files this makes startup a problem. Obviously I could make eval non risky, but obviously I don't want to do that. I thought about language environments as well, but then this seems to require evaluating a function, rather than setting a variable. The best I can have come up with is to set a variable, and then put a hook into the open file process which runs set-input-method. I'm missing something surely. Am I the only one who wants to do this? Is there a better way to achieve the same thing? Phil