From: Lars Ingebrigtsen <larsi@gnus.org>
To: Thierry Volpiatto <thierry.volpiatto@gmail.com>
Cc: 4909@debbugs.gnu.org
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 [thread overview]
Message-ID: <87pmx35m34.fsf@gnus.org> (raw)
In-Reply-To: <87iqdgqbc2.fsf@tux.homenetwork> (Thierry Volpiatto's message of "Thu, 12 Nov 2009 11:36:13 +0100")
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
next prev parent reply other threads:[~2021-06-03 9:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-12 10:36 bug#4909: 23.1.50; in emacs -nw `read-char' should return with error when an event is entered Thierry Volpiatto
2016-07-09 13:02 ` Andrew Hyatt
2021-06-03 9:33 ` Lars Ingebrigtsen [this message]
2021-07-01 11:43 ` 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=87pmx35m34.fsf@gnus.org \
--to=larsi@gnus.org \
--cc=4909@debbugs.gnu.org \
--cc=thierry.volpiatto@gmail.com \
/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.