* bug#8479: 24.0.50; Strange error message upon M-z M-z
@ 2011-04-11 16:01 David Kastrup
2011-04-11 16:56 ` Eli Zaretskii
2011-04-11 22:10 ` Andy Moreton
0 siblings, 2 replies; 10+ messages in thread
From: David Kastrup @ 2011-04-11 16:01 UTC (permalink / raw)
To: 8479
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
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#8479: 24.0.50; Strange error message upon M-z M-z
2011-04-11 16:01 bug#8479: 24.0.50; Strange error message upon M-z M-z David Kastrup
@ 2011-04-11 16:56 ` Eli Zaretskii
2011-10-07 6:59 ` Glenn Morris
2011-04-11 22:10 ` Andy Moreton
1 sibling, 1 reply; 10+ messages in thread
From: Eli Zaretskii @ 2011-04-11 16:56 UTC (permalink / raw)
To: David Kastrup; +Cc: 8479
> From: David Kastrup <dak@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.
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#8479: 24.0.50; Strange error message upon M-z M-z
2011-04-11 16:01 bug#8479: 24.0.50; Strange error message upon M-z M-z David Kastrup
2011-04-11 16:56 ` Eli Zaretskii
@ 2011-04-11 22:10 ` Andy Moreton
2011-04-12 5:15 ` Kevin Rodgers
1 sibling, 1 reply; 10+ messages in thread
From: Andy Moreton @ 2011-04-11 22:10 UTC (permalink / raw)
To: bug-gnu-emacs
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
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#8479: 24.0.50; Strange error message upon M-z M-z
2011-04-11 22:10 ` Andy Moreton
@ 2011-04-12 5:15 ` Kevin Rodgers
2011-04-12 6:00 ` Eli Zaretskii
2011-04-15 1:17 ` Stefan Monnier
0 siblings, 2 replies; 10+ messages in thread
From: Kevin Rodgers @ 2011-04-12 5:15 UTC (permalink / raw)
To: bug-gnu-emacs
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
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#8479: 24.0.50; Strange error message upon M-z M-z
2011-04-12 5:15 ` Kevin Rodgers
@ 2011-04-12 6:00 ` Eli Zaretskii
2011-04-14 2:05 ` Kevin Rodgers
2011-04-15 1:17 ` Stefan Monnier
1 sibling, 1 reply; 10+ messages in thread
From: Eli Zaretskii @ 2011-04-12 6:00 UTC (permalink / raw)
To: Kevin Rodgers; +Cc: bug-gnu-emacs
> From: Kevin Rodgers <kevin.d.rodgers@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.
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#8479: 24.0.50; Strange error message upon M-z M-z
2011-04-12 6:00 ` Eli Zaretskii
@ 2011-04-14 2:05 ` Kevin Rodgers
0 siblings, 0 replies; 10+ messages in thread
From: Kevin Rodgers @ 2011-04-14 2:05 UTC (permalink / raw)
To: bug-gnu-emacs
On 4/12/11 12:00 AM, Eli Zaretskii wrote:
>> From: Kevin Rodgers<kevin.d.rodgers@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
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#8479: 24.0.50; Strange error message upon M-z M-z
2011-04-12 5:15 ` Kevin Rodgers
2011-04-12 6:00 ` Eli Zaretskii
@ 2011-04-15 1:17 ` Stefan Monnier
1 sibling, 0 replies; 10+ messages in thread
From: Stefan Monnier @ 2011-04-15 1:17 UTC (permalink / raw)
To: Kevin Rodgers; +Cc: bug-gnu-emacs
> 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
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#8479: 24.0.50; Strange error message upon M-z M-z
2011-04-11 16:56 ` Eli Zaretskii
@ 2011-10-07 6:59 ` Glenn Morris
2011-10-07 12:17 ` Eli Zaretskii
2011-10-08 21:07 ` Glenn Morris
0 siblings, 2 replies; 10+ messages in thread
From: Glenn Morris @ 2011-10-07 6:59 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: David Kastrup, 8479
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;
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#8479: 24.0.50; Strange error message upon M-z M-z
2011-10-07 6:59 ` Glenn Morris
@ 2011-10-07 12:17 ` Eli Zaretskii
2011-10-08 21:07 ` Glenn Morris
1 sibling, 0 replies; 10+ messages in thread
From: Eli Zaretskii @ 2011-10-07 12:17 UTC (permalink / raw)
To: Glenn Morris; +Cc: dak, 8479
> From: Glenn Morris <rgm@gnu.org>
> Cc: David Kastrup <dak@gnu.org>, 8479@debbugs.gnu.org
> Date: Fri, 07 Oct 2011 02:59:36 -0400
>
> How about just making the error message more explicit:
Fine with me.
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#8479: 24.0.50; Strange error message upon M-z M-z
2011-10-07 6:59 ` Glenn Morris
2011-10-07 12:17 ` Eli Zaretskii
@ 2011-10-08 21:07 ` Glenn Morris
1 sibling, 0 replies; 10+ messages in thread
From: Glenn Morris @ 2011-10-08 21:07 UTC (permalink / raw)
To: 8479-done
Version: 24.0.91
Glenn Morris wrote:
> How about just making the error message more explicit:
Installed.
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2011-10-08 21:07 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-11 16:01 bug#8479: 24.0.50; Strange error message upon M-z M-z David Kastrup
2011-04-11 16:56 ` Eli Zaretskii
2011-10-07 6:59 ` Glenn Morris
2011-10-07 12:17 ` Eli Zaretskii
2011-10-08 21:07 ` Glenn Morris
2011-04-11 22:10 ` Andy Moreton
2011-04-12 5:15 ` Kevin Rodgers
2011-04-12 6:00 ` Eli Zaretskii
2011-04-14 2:05 ` Kevin Rodgers
2011-04-15 1:17 ` Stefan Monnier
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).