Subject: bug#45292: Acknowledgement (28.0.50; first key typed ignores current input method (in magit commit buffer))

From: Platon Pronko <[email-masked]>
Date: Thu, 17 Dec 2020 19:31:57 +0300

Digged into it further. Here's what I found:

1. quail-input-method is used to translate keys according current keymap.

2. At the time of the first keystroke ("j" in my example) quail-input-method sees incorrect buffer (verified this by calling and printing buffer-name from inside quail-input-method). It sees "magit: test-repo" on the first keystroke, and "COMMIT_EDITMSG" on subsequent keystrokes. And since "magit: test-repo" is read-only, no translation is done and key is returned as-is.

3. So apparently record_asynch_buffer_change() was crucial to update the current buffer.