GNU bug report logs -
#8479
24.0.50; Strange error message upon M-z M-z
Previous Next
Reported by: David Kastrup <dak <at> gnu.org>
Date: Mon, 11 Apr 2011 16:03:02 UTC
Severity: minor
Found in version 24.0.50
Fixed in version 24.0.91
Done: Glenn Morris <rgm <at> gnu.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 8479 in the body.
You can then email your comments to 8479 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#8479
; Package
emacs
.
(Mon, 11 Apr 2011 16:03:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
David Kastrup <dak <at> gnu.org>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Mon, 11 Apr 2011 16:03:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Type M-z M-z and you get the following error back trace and message:
Debugger entered--Lisp error: (wrong-type-argument characterp 134217850)
call-interactively(zap-to-char nil nil)
In GNU Emacs 24.0.50.1 (i686-pc-linux-gnu, GTK+ Version 2.24.4)
of 2011-04-10 on lola
Windowing system distributor `The X.Org Foundation', version 11.0.11000000
configured using `configure '--prefix=/usr/local/emacs' '--without-toolkit-scroll-bars' 'CFLAGS=-O2 -fno-crossjumping -g''
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: en_US.UTF-8
value of $XMODIFIERS: nil
locale-coding-system: utf-8-unix
default enable-multibyte-characters: t
Major mode: Debugger
Minor modes in effect:
shell-dirtrack-mode: t
diff-auto-refine-mode: t
TeX-PDF-mode: t
desktop-save-mode: t
minibuffer-electric-default-mode: t
tooltip-mode: t
mouse-wheel-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
line-number-mode: t
transient-mark-mode: t
Recent input:
M-z M-z M-x r e p o r t - e m a c
s - b u <tab> <return>
Recent messages:
Entering debugger...
Load-path shadows:
/usr/local/emacs/share/emacs/site-lisp/preview/preview hides /usr/local/emacs/share/emacs/site-lisp/auctex/preview
/usr/local/emacs/share/emacs/site-lisp/preview/prv-emacs hides /usr/local/emacs/share/emacs/site-lisp/auctex/prv-emacs
Features:
(shadow emacsbug url-util url-parse url-vars nnagent gnus-topic rect
etags shr-color color shr gnus-dup vc-bzr vc-sccs vc-svn vc
vc-dispatcher debug shell make-mode sendmail ispell gnus-uu yenc
browse-url ediff-merg ediff-diff ediff-wind ediff-help ediff-util
ediff-mult ediff-init ediff smerge-mode diff-mode dabbrev canlock sha1
hex-util newcomment gnus-fun flow-fill grep mule-util sort smiley
ansi-color gnus-cite mail-extr gnus-bcklg multi-isearch find-func
help-mode view gnus-async gnus-kill qp gnus-ml pop3 nndraft nnmh nnnil
nnml nnfolder parse-time rot13 disp-table auth-source eieio assoc netrc
gnus-agent gnus-srvr gnus-score score-mode nnvirtual gnus-msg gnus-art
mm-uu mml2015 epg-config mm-view mml-smime smime password-cache dig
mailcap nntp proto-stream starttls tls gnus-cache gnus-mlspl nnir
gnus-sum macroexp nnoo gnus-group gnus-undo nnmail mail-source
gnus-start gnus-spec gnus-int gnus-range message format-spec rfc822 mml
mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045
ietf-drums mailabbrev gmm-utils mailheader gnus-win info doc-view
jka-compr image-mode vc-cvs lilypond-mode compile comint ring dired-x
dired latexenc cc-mode cc-fonts cc-menus cc-cmds cc-styles cc-align
cc-engine cc-vars cc-defs vc-git scheme vc-rcs preview prv-emacs
byte-opt warnings reftex-vcr reftex-dcr reftex-auc reftex reftex-vars
tex-bar tex-buf toolbar-x noutline outline font-latex bytecomp
byte-compile latex easy-mmode edmacro kmacro tex-style tex regexp-opt
easymenu advice help-fns advice-preload desktop minibuf-eldef gnus
gnus-ems nnheader gnus-util time-date mail-utils mm-util mail-prsvr
wid-edit cus-start cus-load preview-latex tex-site auto-loads server
tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar
dnd fontset image fringe lisp-mode register page menu-bar rfn-eshadow
timer select scroll-bar mouse jit-lock font-lock syntax facemenu
font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan
thai tai-viet lao korean japanese hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese case-table epa-hook
jka-cmpr-hook help simple abbrev minibuffer loaddefs button faces
cus-face files text-properties overlay md5 base64 format env code-pages
mule custom widget hashtable-print-readable backquote
make-network-process dbusbind dynamic-setting system-font-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs)
--
David Kastrup
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#8479
; Package
emacs
.
(Mon, 11 Apr 2011 16:57:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 8479 <at> debbugs.gnu.org (full text, mbox):
> From: David Kastrup <dak <at> gnu.org>
> Date: Mon, 11 Apr 2011 18:01:44 +0200
> Cc:
>
> Type M-z M-z and you get the following error back trace and message:
>
> Debugger entered--Lisp error: (wrong-type-argument characterp 134217850)
> call-interactively(zap-to-char nil nil)
Confirmed, and I also see it in Emacs 23.3, FWIW.
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#8479
; Package
emacs
.
(Tue, 12 Apr 2011 02:19:02 GMT)
Full text and
rfc822 format available.
Message #11 received at submit <at> debbugs.gnu.org (full text, mbox):
On Mon 11 Apr 2011, David Kastrup wrote:
> Type M-z M-z and you get the following error back trace and message:
>
> Debugger entered--Lisp error: (wrong-type-argument characterp 134217850)
> call-interactively(zap-to-char nil nil)
`zap-to-char' (in simple.el) has interactive spec:
(interactive "p\ncZap to char: ")
Looking at `call-interactively' (in callint.c):
--8<---------------cut here---------------start------------->8---
case 'c': /* Character */
/* Prompt in `minibuffer-prompt' face. */
Fput_text_property (make_number (0),
make_number (SCHARS (callint_message)),
Qface, Qminibuffer_prompt, callint_message);
args[i] = Fread_char (callint_message, Qnil, Qnil);
message1_nolog ((char *) 0);
/* Passing args[i] directly stimulates compiler bug */
teml = args[i];
visargs[i] = Fchar_to_string (teml);
break;
--8<---------------cut here---------------end--------------->8---
Looking at the help for `read-char':
--8<---------------cut here---------------start------------->8---
If the user generates an event which is not a character (i.e. a mouse
click or function key event), `read-char' signals an error. As an
exception, switch-frame events are put off until non-character events
can be read.
If you want to read non-character events, or ignore them, call
`read-event' or `read-char-exclusive' instead.
--8<---------------cut here---------------end--------------->8---
Perhaps `call-interactively' should be using `read-char-exclusive' so
that the second M-z is ignored ?
AndyM
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#8479
; Package
emacs
.
(Tue, 12 Apr 2011 05:17:02 GMT)
Full text and
rfc822 format available.
Message #14 received at submit <at> debbugs.gnu.org (full text, mbox):
On 4/11/11 4:10 PM, Andy Moreton wrote:
> On Mon 11 Apr 2011, David Kastrup wrote:
>
>> Type M-z M-z and you get the following error back trace and message:
>>
>> Debugger entered--Lisp error: (wrong-type-argument characterp 134217850)
>> call-interactively(zap-to-char nil nil)
>
> `zap-to-char' (in simple.el) has interactive spec:
>
> (interactive "p\ncZap to char: ")
>
> Looking at `call-interactively' (in callint.c):
>
> --8<---------------cut here---------------start------------->8---
> case 'c': /* Character */
> /* Prompt in `minibuffer-prompt' face. */
> Fput_text_property (make_number (0),
> make_number (SCHARS (callint_message)),
> Qface, Qminibuffer_prompt, callint_message);
> args[i] = Fread_char (callint_message, Qnil, Qnil);
> message1_nolog ((char *) 0);
> /* Passing args[i] directly stimulates compiler bug */
> teml = args[i];
> visargs[i] = Fchar_to_string (teml);
> break;
> --8<---------------cut here---------------end--------------->8---
>
> Looking at the help for `read-char':
>
> --8<---------------cut here---------------start------------->8---
> If the user generates an event which is not a character (i.e. a mouse
> click or function key event), `read-char' signals an error. As an
> exception, switch-frame events are put off until non-character events
> can be read.
> If you want to read non-character events, or ignore them, call
> `read-event' or `read-char-exclusive' instead.
> --8<---------------cut here---------------end--------------->8---
Yes, but why is M-z not a character?
?\M-z ⇒ 134217850
;; Which is greater than #x3FFF7F (4194175), but ...
"\M-z" ⇒ "\372"
;; ... strings can only have characters as elements, right?
(characterp ?\M-z) ⇒ nil
;; Puzzled am I.
> Perhaps `call-interactively' should be using `read-char-exclusive' so
> that the second M-z is ignored ?
--
Kevin Rodgers
Denver, Colorado, USA
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#8479
; Package
emacs
.
(Tue, 12 Apr 2011 06:01:01 GMT)
Full text and
rfc822 format available.
Message #17 received at submit <at> debbugs.gnu.org (full text, mbox):
> From: Kevin Rodgers <kevin.d.rodgers <at> gmail.com>
> Date: Mon, 11 Apr 2011 23:15:50 -0600
>
> Yes, but why is M-z not a character?
Because the "M-" part sets bits in the area outside the valid range of
character code points.
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#8479
; Package
emacs
.
(Thu, 14 Apr 2011 02:06:01 GMT)
Full text and
rfc822 format available.
Message #20 received at submit <at> debbugs.gnu.org (full text, mbox):
On 4/12/11 12:00 AM, Eli Zaretskii wrote:
>> From: Kevin Rodgers<kevin.d.rodgers <at> gmail.com>
>> Date: Mon, 11 Apr 2011 23:15:50 -0600
>>
>> Yes, but why is M-z not a character?
>
> Because the "M-" part sets bits in the area outside the valid range of
> character code points.
This is what I was looking for, in the Meta-Character Syntax section of the
Emacs Lisp manual:
A "meta character" is a character typed with the <META> modifier key.
The integer that represents such a character has the 2**27 bit set. We
use high bits for this and other modifiers to make possible a wide
range of basic character codes.
In a string, the 2**7 bit attached to an ASCII character indicates a
meta character; thus, the meta characters that can fit in a string have
codes in the range from 128 to 255, and are the meta versions of the
ordinary ASCII characters. *Note Strings of Events::, for details
about <META>-handling in strings.
--
Kevin Rodgers
Denver, Colorado, USA
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#8479
; Package
emacs
.
(Fri, 15 Apr 2011 02:08:01 GMT)
Full text and
rfc822 format available.
Message #23 received at submit <at> debbugs.gnu.org (full text, mbox):
> Yes, but why is M-z not a character?
Because H-z is not a character either.
> "\M-z" ⇒ "\372"
> ;; ... strings can only have characters as elements, right?
Hysterical raisins.
Stefan
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#8479
; Package
emacs
.
(Fri, 07 Oct 2011 07:00:03 GMT)
Full text and
rfc822 format available.
Message #26 received at 8479 <at> debbugs.gnu.org (full text, mbox):
This is a general issue, eg:
M-x number-to-register RET M-z
Wrong type argument: characterp, 134217850
It seems reasonable to me to get an error in these circumstances.
How about just making the error message more explicit:
*** src/callint.c 2011-07-09 07:06:04 +0000
--- src/callint.c 2011-10-07 06:55:53 +0000
***************
*** 535,540 ****
--- 535,541 ----
message1_nolog ((char *) 0);
/* Passing args[i] directly stimulates compiler bug */
teml = args[i];
+ if (! CHARACTERP (teml)) error ("Non-character input-event");
visargs[i] = Fchar_to_string (teml);
break;
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#8479
; Package
emacs
.
(Fri, 07 Oct 2011 12:20:02 GMT)
Full text and
rfc822 format available.
Message #29 received at 8479 <at> debbugs.gnu.org (full text, mbox):
> From: Glenn Morris <rgm <at> gnu.org>
> Cc: David Kastrup <dak <at> gnu.org>, 8479 <at> debbugs.gnu.org
> Date: Fri, 07 Oct 2011 02:59:36 -0400
>
> How about just making the error message more explicit:
Fine with me.
Reply sent
to
Glenn Morris <rgm <at> gnu.org>
:
You have taken responsibility.
(Sat, 08 Oct 2011 21:08:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
David Kastrup <dak <at> gnu.org>
:
bug acknowledged by developer.
(Sat, 08 Oct 2011 21:08:01 GMT)
Full text and
rfc822 format available.
Message #34 received at 8479-done <at> debbugs.gnu.org (full text, mbox):
Version: 24.0.91
Glenn Morris wrote:
> How about just making the error message more explicit:
Installed.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sun, 06 Nov 2011 12:24:05 GMT)
Full text and
rfc822 format available.
This bug report was last modified 13 years and 232 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.