From: Ryan Johnson <ryanjohn@ece.cmu.edu>
To: emacs-devel@gnu.org
Subject: Improve input handling documentation (was Re: Best way to intercept terminal escape sequences?)
Date: Sat, 04 Sep 2010 21:05:30 +0200 [thread overview]
Message-ID: <4C82987A.4060300@ece.cmu.edu> (raw)
In-Reply-To: <20100904160740.988082D5@osgood.ece.cmu.edu>
On Sat, 04 Sep 2010 15:01:28 +0200 stepnem wrote:
>> > It would be really nice to have, somewhere in the emacs docs, a diagram
>> > showing what processing happens to keyboard input, starting from raw bytes and
>> > UI events, and tracing them (or their translations) through coding systems,
>> > input methods, command loop, various keymaps, etc. and showing where in that
>> > process the different read-* functions intercept that data (and where the
>> > various unread-*-events reinsert things). A similar diagram for reading and
>> > writing files would probably also be useful.
> Sounds great indeed!
>
> [...]
>> > Unfortunately, even after spending so long on this problem I don't think I
>> > know enough to generate that diagram...
> But perhaps you could come up with some initial version that others
> could continue improving upon?
What format should the diagram take? I don't think I've ever seen ascii
art, let alone an image, in the emacs docs...
Meanwhile, here's what I have inferred, roughly, about input handling.
Hopefully those familiar with emacs' guts can correct and improve it:
<-------- keyboard input
keyboard-coding-system
<-------- unread-input-method-events
[Input Method (optional, printable ascii chars only)]
<-------- unread-post-input-method-events
???
<-------- non-keyboard (e.g. mouse) events
<-------- unread-command-events (and unread-command-char)
--------> read-char, read-event
input-decode-map
key-translation-map
[local-]function-key-map
--------> read-key
assorted keymaps (global, local, minor mode, emulation, char/text
properties, overriding)
--------> read-key-sequence
???
read-number, read-string, etc. (???)
(I have no idea where read-passwd fits in this hierarchy, nor how the
command loop lines up with things).
NOTE: the description of read-key and input-decode-map makes it sound
like read-event comes before coding systems, but empirically this is not
true.
Regards,
Ryan
next parent reply other threads:[~2010-09-04 19:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20100904160740.988082D5@osgood.ece.cmu.edu>
2010-09-04 19:05 ` Ryan Johnson [this message]
2010-09-04 19:20 ` Improve input handling documentation Chong Yidong
2010-09-06 5:27 ` Ryan Johnson
2010-09-08 9:11 ` Stefan Monnier
[not found] <20100827142724.E1DD712F@hazard.ece.cmu.edu>
2010-08-27 14:44 ` Best way to intercept terminal escape sequences? Ryan Johnson
2010-08-27 15:40 ` Eli Zaretskii
2010-08-27 23:54 ` Stefan Monnier
2010-08-28 7:54 ` Ryan Johnson
2010-08-28 14:47 ` Stefan Monnier
2010-08-31 23:12 ` Ryan Johnson
2010-09-02 10:53 ` Stefan Monnier
2010-09-02 12:33 ` Ryan Johnson
2010-09-04 13:01 ` Improve input handling documentation (was Re: Best way to intercept terminal escape sequences?) Štěpán Němec
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=4C82987A.4060300@ece.cmu.edu \
--to=ryanjohn@ece.cmu.edu \
--cc=emacs-devel@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.