all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
Cc: klaus.berndl@sdm.de, emacs-devel@gnu.org
Subject: Re: Problem with `while-no-input'
Date: Sat, 11 Mar 2006 19:41:32 +0200	[thread overview]
Message-ID: <uacbwvpyr.fsf@gnu.org> (raw)
In-Reply-To: <u7j712m6y.fsf@jasonrumney.net> (message from Jason Rumney on Sat, 11 Mar 2006 12:35:49 +0000)

> From: Jason Rumney <jasonr@gnu.org>
> Date: Sat, 11 Mar 2006 12:35:49 +0000
> Cc: emacs-devel@gnu.org, storm@cua.dk, klaus.berndl@sdm.de
> 
> Richard Stallman <rms@gnu.org> writes:
> 
> >     Hmm, would it not better, to enable while-not-input also working with Windows? ;-)
> >
> > Yes, it would be better, but that may be very difficult.  (I don't
> > know.)  We should document it if we can't fix it.
> 
> I think the relevant code is in keyboard.c in the POLL_FOR_INPUT
> conditional blocks. Currently this code handles detection of C-g
> according to the comments, I do not know why it manages to do that
> without also handling general detection of input.

Jason, I'm looking at keyboard.c, and I don't understand what you are
saying.  Are you saying that POLL_FOR_INPUT code is used by Windows,
and that it should handle this case, but currently only handles C-g?
Or are you saying that the POLL_FOR_INPUT code detects both C-g and
any other sorts of input, but somehow, only on Windows, non-C-g input
goes undetected?

Anyway, I see in w32fns.c:post_character_message that C-g is handled
specially in this function.  When we detect C-g, we signal the special
interrupt_handle.  However, I'm not quite sure who and how sees that
this handle is signaled: sys_select isn't called while the body of
while-no-input runs in this case, since that body is pure Lisp code,
right?  What am I missing?

I also see in the debugger that, when the while-no-input form runs,
w32_read_socket is not called.  I think this explains why Emacs
doesn't see the input, and doesn't interrupt the form's body:
w32_read_socket is the only way to receive input on Windows, right?

I think we can arrange for _any_ input to interrupt a while-no-input
form, but this needs to be done from w32_wnd_proc (which is in another
thread, right?).  Do you think this is a good approach?

  parent reply	other threads:[~2006-03-11 17:41 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-10  7:38 Problem with `while-no-input' klaus.berndl
2006-03-11  0:08 ` Richard Stallman
2006-03-11 12:35   ` Jason Rumney
2006-03-11 15:29     ` Jason Rumney
2006-03-11 21:55       ` Eli Zaretskii
2006-03-11 22:47         ` Jason Rumney
2006-03-12  0:00         ` Jason Rumney
2006-03-11 17:41     ` Eli Zaretskii [this message]
2006-03-11 22:45       ` Jason Rumney
2006-03-11 23:46     ` Richard Stallman
  -- strict thread matches above, loose matches on Subject: below --
2006-04-27  6:41 klaus.berndl
2006-04-27 21:26 ` Richard Stallman
2006-04-26 12:58 klaus.berndl
2006-04-26 12:10 klaus.berndl
2006-04-26 12:43 ` Lennart Borgman
2006-04-26 12:58   ` Jason Rumney
2006-04-26 12:52 ` Jason Rumney
2006-04-26 11:46 klaus.berndl
2006-04-26 11:59 ` Jason Rumney
2006-04-26 18:05   ` Jason Rumney
2006-04-26  9:42 klaus.berndl
2006-04-26 18:53 ` Richard Stallman
2006-04-25  9:35 klaus.berndl
2006-04-25 22:05 ` Richard Stallman
2006-04-26 11:19 ` Jason Rumney
2006-03-08 14:50 klaus.berndl
2006-03-08 13:05 LENNART BORGMAN
2006-03-08 13:50 ` martin rudalics
2006-03-08 14:01   ` martin rudalics
2006-03-11 16:37   ` Eli Zaretskii
2006-03-08 14:50 ` Jason Rumney
2006-03-08 15:00 ` Stefan Monnier
2006-03-08 11:34 klaus.berndl
2006-03-08 12:41 ` Kim F. Storm
2006-03-09 17:13   ` Richard Stallman

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=uacbwvpyr.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=klaus.berndl@sdm.de \
    /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.