GNU bug report logs -
#1456
Cannot Put Non-ASCII Characters in Init Files
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 1456 in the body.
You can then email your comments to 1456 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#1456
; Package
emacs
.
Full text and
rfc822 format available.
Acknowledgement sent to
Bostjan Vilfan <bostjanv <at> alum.mit.edu>
:
New bug report received and forwarded. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
Full text and
rfc822 format available.
Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):
[Message part 1 (text/plain, inline)]
--text follows this line--
Please write in English if possible, because the Emacs maintainers
usually do not have translators to read other languages for them.
Your bug report will be posted to the bug-gnu-emacs <at> gnu.org mailing list,
and to the gnu.emacs.bug news group.
Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:
This is most probably not a bug; but needs some input from an expert.
In Section 57.6.5 of the Emacs manual (Non-ASCII Characters in Init Files) it is stated
that to use non-ASCII characters the init file must start with a line of the form:
-*-coding: <coding system name> -*-
I tried that with coding system equal to utf-8 and got the following error:
Debugger entered--Lisp error: (void-variable \337-*-coding:)
eval-buffer(#<buffer *load*> nil "c:/Documents and Settings/Bostjan/My Documents/.emacs.d/init.el" nil t) ; Reading at buffer position 12
load-with-code-conversion("c:/Documents and Settings/Bostjan/My Documents/.emacs.d/init.el" "c:/Documents and Settings/Bostjan/My Documents/.emacs.d/init.el" t t)
load("c:/Documents and Settings/Bostjan/My Documents/.emacs.d/init" t t)
#[nil ^H\205\276^@ \306=\203^Q^@\307^H\310Q\202A^@ \311=\2033 etc.
When I replaced the first line as described above with the following three
lines at the end
;; Local Variables: **
;; coding:utf-8 **
;; End: **
I got a different error:
Debugger entered--Lisp error: (error "Invalid modifier in a string") etc.
any advice would be appreciated
Regards
Bostjan
If Emacs crashed, and you have the Emacs process in the gdb debugger,
please include the output from the following gdb commands:
`bt full' and `xbacktrace'.
If you would like to further debug the crash, please read the file
c:/Program Files/GNU/Emacs/emacs-22.3/etc/DEBUG for instructions.
In GNU Emacs 22.3.1 (i386-mingw-nt5.1.2600)
of 2008-09-06 on SOFT-MJASON
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (3.4)'
Important settings:
value of $LC_ALL: nil
value of $LC_COLLATE: nil
value of $LC_CTYPE: nil
value of $LC_MESSAGES: nil
value of $LC_MONETARY: nil
value of $LC_NUMERIC: nil
value of $LC_TIME: nil
value of $LANG: ENU
locale-coding-system: cp1250
default-enable-multibyte-characters: t
Major mode: Fundamental
Minor modes in effect:
encoded-kbd-mode: t
tooltip-mode: t
tool-bar-mode: t
mouse-wheel-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
blink-cursor-mode: t
unify-8859-on-encoding-mode: t
utf-translate-cjk-mode: t
auto-compression-mode: t
line-number-mode: t
Recent input:
<help-echo> <switch-frame> <switch-frame> <help-echo>
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo>
<switch-frame> <tool-bar> <kill-buffer> <help-echo>
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo>
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo>
<tool-bar> <one-window> <help-echo> <help-echo> M-x
o r f i l e <return> <kp-down> <kp-down> <kp-down>
<tab> <help-echo> <help-echo> <help-echo> <help-echo>
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo>
<down-mouse-1> <mouse-2> <help-echo> <tool-bar> <kill-buffer>
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo>
<help-echo> <help-echo> <help-echo> <help-echo> <menu-bar>
<buffer> "*GNU Emacs*" <help-echo> <help-echo> <help-echo>
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo>
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo>
<tool-bar> <help>
Recent messages:
Preparing diary...done
Preparing diary...done
Preparing diary...done
Preparing diary...done
Preparing diary...done
Preparing diary...done
Preparing diary...done
For information about GNU Emacs and the GNU system, type C-h C-a.
CHILDREN
Loading emacsbug...done
Information forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#1456
; Package
emacs
.
Full text and
rfc822 format available.
Message #8 received at 1456 <at> emacsbugs.donarmstrong.com (full text, mbox):
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.
Information forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#1456
; Package
emacs
.
Full text and
rfc822 format available.
Acknowledgement sent to
Chong Yidong <cyd <at> stupidchicken.com>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
Full text and
rfc822 format available.
Message #13 received at 1456 <at> emacsbugs.donarmstrong.com (full text, mbox):
> 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?
Information forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#1456
; Package
emacs
.
Full text and
rfc822 format available.
Acknowledgement sent to
Bostjan Vilfan <bvilf <at> yahoo.com>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
Full text and
rfc822 format available.
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)]
bug closed, send any further explanations to Bostjan Vilfan <bostjanv <at> alum.mit.edu>
Request was from
Chong Yidong <cyd <at> stupidchicken.com>
to
control <at> emacsbugs.donarmstrong.com
.
(Wed, 10 Dec 2008 17:45:03 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> emacsbugs.donarmstrong.com
.
(Thu, 08 Jan 2009 15:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 16 years and 161 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.