bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#23204: 25.1.50; Strange behaviour of ‘read-char’


From: Lars Ingebrigtsen
Subject: bug#23204: 25.1.50; Strange behaviour of ‘read-char’
Date: Thu, 03 Feb 2022 21:47:45 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Mark Karpov <markkarpov@openmailbox.org> writes:

> I'm not sure if it's sort of feature (rather undocumented) or a bug.
> Let's say I have a command that uses ‘read-char’ repeatedly, and it's
> given a custom prompt as the first argument, like this:
>
>   (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

(I'm going through old bug reports that unfortunately weren't resolved
at the time.)

I can reproduce this problem in Emacs 25.1, but not on the current
master, so it looks like it's been fixed in the years since this was
first reported, and I'm therefore closing this bug report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





reply via email to

[Prev in Thread] Current Thread [Next in Thread]