[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#4909: 23.1.50; in emacs -nw `read-char' should return with error whe
From: |
Lars Ingebrigtsen |
Subject: |
bug#4909: 23.1.50; in emacs -nw `read-char' should return with error when an event is entered. |
Date: |
Thu, 03 Jun 2021 11:33:35 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Thierry Volpiatto <thierry.volpiatto@gmail.com> writes:
> However `read-key' do the right thing, but is not usable in lesser emacs
> versions.
> So i have to use this function to replace `read-key' in not emacs-cvs:
>
> ,----
> | (defun traverse-read-char-or-event (prompt)
> | "Use `read-char' to read keyboard input, if input is not a char use
> `read-event' instead."
> | (let* ((chr (condition-case nil (read-char prompt) (error nil)))
> | (evt (unless chr (read-event))))
> | (or chr evt)))
> `----
>
> And i lost the ability of using arrow keys in an emacs -nw because
> `read-char' and `read-event' return the wrong thing.
> However C-n and C-p work fine.
(I'm going through old bug reports that unfortunately got little response at
the time.)
I'm not sure I quite understand this bug report -- read-event/key seems
to return the values described, but the arrow keys work fine for me in
Emacs 28 with -nw (on Debian/bullseye).
So is this a problem that has gone away in the years since this was
reported, or do you still see these issues?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- bug#4909: 23.1.50; in emacs -nw `read-char' should return with error when an event is entered.,
Lars Ingebrigtsen <=