all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Mark Karpov <markkarpov@openmailbox.org>
Cc: 23204@debbugs.gnu.org
Subject: bug#23204: 25.1.50; Strange behaviour of ‘read-char’
Date: Sun, 03 Apr 2016 17:56:39 +0300	[thread overview]
Message-ID: <83bn5qrba0.fsf@gnu.org> (raw)
In-Reply-To: <87wpofx9ry.fsf@openmailbox.org> (message from Mark Karpov on Sun, 03 Apr 2016 16:32:33 +0600)

> From: Mark Karpov <markkarpov@openmailbox.org>
> Date: Sun, 03 Apr 2016 16:32:33 +0600
> 
>   (defun my-command ()
>     (interactive)
>     (while (read-char "My prompt…" t)))
> 
> Now if you call this from lisp or like this: ‘M-x my-command RET’,
> everything is fine: you see the prompt and you can type some chars
> (press ‘C-g’ to get out of this).
> 
> But if you bind the command to key sequence, like this:
> 
>   (global-set-key (kbd "<menu> t y") #'my-command)
> 
> Then you have a nasty problem when you actually call it. Try to call it
> and then type some characters — you will see no prompt and they will
> accumulate in echo area indefinitely:
> 
>   menu t y h e r e SPC I SPC t y p e SPC t h i n g s SPC a n d SPC i t
>   SPC i s SPC g e t t i n g SPC r a t h e r SPC l o n g

What if you do this instead:

  (global-set-key (kbd "<f8>") #'my-command)

Does this work as expected?  If so, does that explain what happens in
your original example?





  reply	other threads:[~2016-04-03 14:56 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-03 10:32 bug#23204: 25.1.50; Strange behaviour of ‘read-char’ Mark Karpov
2016-04-03 14:56 ` Eli Zaretskii [this message]
2016-04-03 16:33 ` Mark Karpov
2016-06-12 17:02 ` Noam Postavsky
2016-06-12 17:11   ` Eli Zaretskii
2016-06-12 17:13     ` Noam Postavsky
2016-06-12 17:17       ` Eli Zaretskii
2016-06-12 17:23         ` Noam Postavsky
2016-06-12 17:26           ` Eli Zaretskii
2022-02-03 20:47 ` Lars Ingebrigtsen

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=83bn5qrba0.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=23204@debbugs.gnu.org \
    --cc=markkarpov@openmailbox.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.