all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Kevin Rodgers <kevin.d.rodgers@gmail.com>
To: bug-gnu-emacs@gnu.org
Subject: bug#8479: 24.0.50; Strange error message upon M-z M-z
Date: Mon, 11 Apr 2011 23:15:50 -0600	[thread overview]
Message-ID: <io0n5v$h9q$1@dough.gmane.org> (raw)
In-Reply-To: <82fwpozbgb.fsf@gmail.com>

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






  reply	other threads:[~2011-04-12  5:15 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2011-04-12  6:00     ` Eli Zaretskii
2011-04-14  2:05       ` Kevin Rodgers
2011-04-15  1:17     ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='io0n5v$h9q$1@dough.gmane.org' \
    --to=kevin.d.rodgers@gmail.com \
    --cc=bug-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.