emacs-devel
[Top][All Lists]
Advanced

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

processes, read-char, and quail problem


From: John J Foerch
Subject: processes, read-char, and quail problem
Date: Tue, 19 Feb 2008 11:17:21 -0500
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.50 (gnu/linux)

Hello,

Bojohan investigated a bug I originally reported as a quail+erc bug.
He found that the problem is not particular to erc, but can be
reproduced with any process, and that the bug seems to be in emacs
`read_char'.  I will quote what he told me.  The conversation was on
irc so I have changed the formatting.

### quote

To reproduce, try:

 * emacs -Q
 * M-x server-start RET
 * C-\ chinese-py RET
 * x <backspace>
 * emacsclient --eval 0
 * x

`read_char' contains this condition:

   /* Pass this to the input method, if appropriate.  */
   if (INTEGERP (c)
       && ! NILP (Vinput_method_function)
       /* Don't run the input method within a key sequence,
         after the first event of the key sequence.  */
       && NILP (prev_event)
       [...]

The input method does it's own event reading in a loop. accepting
process input interrupts it. `read_key_sequence' reenters `read_char',
but this time prev_event isn't nil.  It's `backspace'.

Processing input calls `record_asynch_buffer_change':

   /* Put a BUFFER_SWITCH_EVENT in the buffer so that read_key_sequence
     will notice the new current buffer. */

When `read_key_sequence' continues reading chars it is in the middle
of a sequence and the input method is skipped.  So basically, normally
"x <backspace> x ..." happens within the one and same invocation of
read_char. when a process intervenes, read_key_sequence resumes in the
middle of the sequence.

### end quote

I hope this information can be of use.

Thank you,
John Foerch





reply via email to

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