From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Bostjan Vilfan Newsgroups: gmane.emacs.bugs Subject: bug#1456: Cannot Put Non-ASCII Characters in Init Files Date: Wed, 10 Dec 2008 09:19:00 -0800 (PST) Message-ID: <301112.5452.qm@web58601.mail.re3.yahoo.com> References: <87oczkf7li.fsf@cyd.mit.edu> Reply-To: Bostjan Vilfan , 1456@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0-1168887846-1228929540=:5452" X-Trace: ger.gmane.org 1228929905 13360 80.91.229.12 (10 Dec 2008 17:25:05 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 10 Dec 2008 17:25:05 +0000 (UTC) Cc: 1456@emacsbugs.donarmstrong.com To: Chong Yidong Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Dec 10 18:26:09 2008 Return-path: Envelope-to: geb-bug-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 1LASos-0005It-Vr for geb-bug-gnu-emacs@m.gmane.org; Wed, 10 Dec 2008 18:25:55 +0100 Original-Received: from localhost ([127.0.0.1]:38193 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LASnh-0007vr-MB for geb-bug-gnu-emacs@m.gmane.org; Wed, 10 Dec 2008 12:24:41 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LASnN-0007mR-HV for bug-gnu-emacs@gnu.org; Wed, 10 Dec 2008 12:24:21 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LASnN-0007m1-16 for bug-gnu-emacs@gnu.org; Wed, 10 Dec 2008 12:24:21 -0500 Original-Received: from [199.232.76.173] (port=51416 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LASnM-0007lo-FK for bug-gnu-emacs@gnu.org; Wed, 10 Dec 2008 12:24:20 -0500 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:37548) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LASnL-0003L4-SN for bug-gnu-emacs@gnu.org; Wed, 10 Dec 2008 12:24:20 -0500 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mBAHOHBe003325; Wed, 10 Dec 2008 09:24:18 -0800 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id mBAHK2FV001682; Wed, 10 Dec 2008 09:20:02 -0800 X-Loop: don@donarmstrong.com Resent-From: Bostjan Vilfan Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Wed, 10 Dec 2008 17:20:02 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 1456 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 1456-submit@emacsbugs.donarmstrong.com id=B1456.12289295491555 (code B ref 1456); Wed, 10 Dec 2008 17:20:02 +0000 X-Spam-Bayes: score:0.0000 Tokens: new, 60; hammy, 105; neutral, 130; spammy, 12. spammytokens:0.999-3--Central, 0.989-+--H*c:alternative, 0.975-+--H*F:D*yahoo.com, 0.971-+--desire, 0.969-+--H*MI:yahoo hammytokens:0.000-+--emacs, 0.000-+--Emacs, 0.000-+--UD:el, 0.000-+--m-x, 0.000-+--Mx Original-Received: (at 1456) by emacsbugs.donarmstrong.com; 10 Dec 2008 17:19:09 +0000 Original-Received: from web58601.mail.re3.yahoo.com (web58601.mail.re3.yahoo.com [68.142.236.199]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with SMTP id mBAHJ5JT001549 for <1456@emacsbugs.donarmstrong.com>; Wed, 10 Dec 2008 09:19:06 -0800 Original-Received: (qmail 5608 invoked by uid 60001); 10 Dec 2008 17:19:00 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:Cc:MIME-Version:Content-Type:Message-ID; b=EchrAYP/UrRGAO+ujUlQck2mQOVgxTD2kUY3xr6RMsOVRjL4DF8tydEdJNJILXE3Xqb0LR1AhA59NZlQcg6IQgU2rxd1pM1yAOCbPBcus8ZQQlKf7yEQxaNgZKffrxwcgoMWDPpi+uw/t5SqqKvfZ22+ScdZshxFI289dYkP6xE=; X-YMail-OSG: afGhs90VM1naKON3zDbMhbddo5dS3MHruLmrcqiM_9ueEVB.z6i1ePOCD4NW9cEQex758dJtRGzlte44wHG_SpG1OhaBwTdn.cwu8wJwid9BCqcoTPf_5EgA2T5uQZnSqIdDmWGhk.5U1VYQpQ7fdvGsLC7bGPCQChbanQJHC6.IVfavoSMWhosrFKM6Yyc4HXqwu5RTLLelYR0MJYP3Fg.dcoY- Original-Received: from [86.61.57.225] by web58601.mail.re3.yahoo.com via HTTP; Wed, 10 Dec 2008 09:19:00 PST X-Mailer: YahooMailRC/1155.32 YahooMailWebService/0.7.260.1 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Wed, 10 Dec 2008 12:24:21 -0500 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:23153 Archived-At: --0-1168887846-1228929540=:5452 Content-Type: text/plain; charset=us-ascii Thanks for your answer. I hope I now understand the problem. Actually, I already sent a reply to one comment message, but since I did not cc it to 1456@emacsbugs.donarmstrong.com, I am doing so now. It turned out that of the two problems described in my original bug report, the first (-*-coding: utf-8-*- in my init file did not work) resulted from not prefixing "-*-coding: utf-8-*-" with ";;". The second (error "Invalid modifier in a string") was the result of some key redefinitions, which apparently do not work, or do not work as I thought they would. My original desire was to provide encodings for some Central European characters that are located in certain places on the local keyboard. Specifically, they correspond to the US keys ; : ' " [ { ] } \ | . Therefore, I placed the following code in my init file: (global-set-key "\C-c;" 'insertch) ;OK (global-set-key "\C-c:" 'insertCh) ;OK (global-set-key "\C-c'" 'inserttj) ;OK (global-set-key "\C-c\"" 'insertTj) ;OK (global-set-key "\C-c]" 'insertdj) (global-set-key "\C-c}" 'insertDj) ;OK (global-set-key "\C-c[" 'insertsh) (global-set-key "\C-c{" 'insertSh) ;OK (global-set-key "\C-c\\" 'insertzh) (global-set-key "\C-c|" 'insertZh) ;OK where 'insertch etc. are functions for inserting the appropriate characters. After some investigation I discovered that one or more of these redefinitions are the cause of the "Invalid modifier in a string" error. Not wishing to pursue the matter further I simply took the advice in the manual to accept as user-defined key shortcuts the key sequences C-c. After choosing key definitions of that type, my problems went away. Regards, bostjanv ________________________________ From: Chong Yidong To: Bostjan Vilfan Cc: 1456@emacsbugs.donarmstrong.com Sent: Wednesday, December 10, 2008 3:06:01 PM Subject: Re: bug#1456: Cannot Put Non-ASCII Characters in Init Files > See for example the files buff-menu.el and ibuffer.el in the Emacs > distribution (you can use M-x locate-library) for the two ways to > specify coding. Don't forget it must be a comment line in the "first > line in file" method. > > Beyond that, any problem may be specific to your init file. Start with > an empty one and see that works. Then remove a half at a time from the > real file until you narrow down the problem. Starting with > "--debug-init" can also help. Did you manage to track down the problem? --0-1168887846-1228929540=:5452 Content-Type: text/html; charset=us-ascii
Thanks for your answer.
I hope I now understand the problem. Actually, I already sent a reply to one
comment message, but since I did not cc it to 1456@emacsbugs.donarmstrong.com,
I am doing so now.

It turned out that of the two problems described in my original bug report, the first
(-*-coding: utf-8-*- in my init file did not work) resulted from not prefixing
"-*-coding: utf-8-*-" with ";;".

The second (error "Invalid modifier in a string") was the result of some key redefinitions,
which apparently do not work, or do not work as I thought they would. My original desire
was to provide encodings for some Central European characters that are located in certain
places on the local keyboard. Specifically, they correspond to the US keys ; : ' " [ { ] }
\ | . Therefore, I placed the following code in my init file:

(global-set-key "\C-c;" 'insertch)    ;OK
(global-set-key "\C-c:" 'insertCh)    ;OK
(global-set-key "\C-c'" 'inserttj)    ;OK
(global-set-key "\C-c\"" 'insertTj)    ;OK
(global-set-key "\C-c]" 'insertdj)
(global-set-key "\C-c}" 'insertDj)    ;OK
(global-set-key "\C-c[" 'insertsh)
(global-set-key "\C-c{" 'insertSh)    ;OK
(global-set-key "\C-c\\" 'insertzh)
(global-set-key "\C-c|" 'insertZh)    ;OK

where 'insertch etc. are functions for inserting the appropriate characters. After some
investigation I discovered that one or more of these redefinitions are the cause of
the "Invalid modifier in a string" error. Not wishing to pursue the matter further I simply
took the advice in the manual to accept as user-defined key shortcuts the key sequences
C-c<l etter>. After choosing key definitions of that type, my problems went away.

Regards,
bostjanv


From: Chong Yidong <cyd@stupidchicken.com>
To: Bostjan Vilfan <bostjanv@alum.mit.edu>
Cc: 1456@emacsbugs.donarmstrong.com
Sent: Wednesday, December 10, 2008 3:06:01 PM
Subject: Re: bug#1456: Cannot Put Non-ASCII Characters in Init Files

> See for example the files buff-menu.el and ibuffer.el in the Emacs
> distribution (you can use M-x locate-library) for the two ways to
> specify coding. Don't forget it must be a comment line in the "first
> line in file" method.
>
> Beyond that, any problem may be specific to your init file. Start with
> an empty one and see that works. Then remove a half at a time from the
> real file until you narrow down the problem. Starting with
> "--debug-init" can also help.

Did you manage to track down the problem?

--0-1168887846-1228929540=:5452--