GNU bug report logs -
#1456
Cannot Put Non-ASCII Characters in Init Files
Previous Next
Full log
Message #18 received at 1456 <at> emacsbugs.donarmstrong.com (full text, mbox):
[Message part 1 (text/plain, inline)]
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 <at> debbugs.gnu.org,
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<letter>. After choosing key definitions of that type, my problems went away.
Regards,
bostjanv
________________________________
From: Chong Yidong <cyd <at> stupidchicken.com>
To: Bostjan Vilfan <bostjanv <at> alum.mit.edu>
Cc: 1456 <at> debbugs.gnu.org
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?
[Message part 2 (text/html, inline)]
This bug report was last modified 16 years and 162 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.