[Top][All Lists]

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

Re: `y-or-n-p' does not wait for input - assumes `n'

From: Richard Stallman
Subject: Re: `y-or-n-p' does not wait for input - assumes `n'
Date: Fri, 28 Jan 2005 09:13:56 -0500

    > I think that the right solution in this case is for the
    > specific callers to avoid calling them inside
    > of track-mouse.

    I disagree.  The problem is actually not limited to mouse-movement.
    There's also switch-frame and select-window.

Could you give a bit more details of the problems that occur with the
latter two events?  Since generation of switch-frame and select-window
events is not limited to inside an unusual construct such as
track-mouse, I would expect them to happen often if they happen at
all.  But people don't seem to be complaining about such problems.
Why not?

    Most code that uses things like read-event end up looping and filtering
    unwanted events.

Yes, I see that y-or-n-p does this thru read_filtered_event.

Most Emacs input uses read-key-sequence, which handles those funny
events for you.  Using read-event means you get all kinds of events;
that is what it's for.  You have to be prepared to handle them all.

I don't see how to make this situation better in general.  Do you have
an idea to suggest?

reply via email to

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