unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* 23.0.50: erc and quail problem
@ 2007-11-14 23:55 John J Foerch
  2008-02-19 16:17 ` processes, read-char, " John J Foerch
  0 siblings, 1 reply; 2+ messages in thread
From: John J Foerch @ 2007-11-14 23:55 UTC (permalink / raw)
  To: emacs-pretest-bug

Hello,

I'm able to reproduce a problem with the following steps in both gui
and non-gui invocations of emacs 23 from CVS, on a Debian Lenny
machine.

  Run: emacs -Q
  M-x erc RET
  ; connect to irc with defaults at all prompts
  ; change buffer to *scratch*
  C-\ chinese-py RET
  n e <backspace> <backspace>
  ; now wait at least a minute, then type a character; it does
  ; not go to the input method.  instead, it appears in the buffer
  ; as ordinary ascii.

I don't believe the problem has to do with the `chinese-py' input
method itself, because I also reproduced it with another input method
that is not part of emacs, `chinese-wubi'.

Hope this helps,
Thanks,
John Foerch

^ permalink raw reply	[flat|nested] 2+ messages in thread

* processes, read-char, and quail problem
  2007-11-14 23:55 23.0.50: erc and quail problem John J Foerch
@ 2008-02-19 16:17 ` John J Foerch
  0 siblings, 0 replies; 2+ messages in thread
From: John J Foerch @ 2008-02-19 16:17 UTC (permalink / raw)
  To: emacs-devel

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





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-02-19 16:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-14 23:55 23.0.50: erc and quail problem John J Foerch
2008-02-19 16:17 ` processes, read-char, " John J Foerch

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).