Subject: bug#46935: 28.0.50; Annoying interactions with X clipboard

From: Po Lu <[email-masked]>
Date: Mon, 20 Jun 2022 20:59:15 +0800

Lars Ingebrigtsen <[email-masked]> writes:

> The current trunk is back to hanging forever in this scenario.  Test
> case:
>
> $ emacs -Q
>
> Then select some text with the mouse and then `C-z' in the shell to stop
> the Emacs.
>
> Then start a new "emacs -Q" and use mouse-2 to paste.  Emacs will now
> hang forever (until you hit C-g).  So it seems like things have possibly
> regressed a bit, since it used to heed x-selection-timeout?
>
> Perhaps Po has some insights here; added to the CCs.

Thanks, should be fixed now.  The problem was wait_reading_process_input
skipping the call to select upon detect_input_pending even when just
waiting for a cell, without anyone reading keyboard input from the
keyboard buffer.

This bug has existed for a long time.  I wonder why it was only just
reported.