GNU bug report logs - #15042
24.3.50; while-no-input and input-pending-p

Previous Next

Package: emacs;

Reported by: michael_heerdegen <at> web.de

Date: Wed, 7 Aug 2013 15:41:01 UTC

Severity: minor

Found in version 24.3.50

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Michael Heerdegen <michael_heerdegen <at> web.de>
Cc: 15042 <at> debbugs.gnu.org, Thierry Volpiatto <thierry.volpiatto <at> gmail.com>
Subject: bug#15042: 24.3.50; while-no-input and input-pending-p
Date: Wed, 07 Aug 2013 21:19:55 -0400
>> > 1.  `input-pending-p' can (and does) return t in cases were no input is
>> > pending (see the doc).  In such cases, `while-no-input' just returns t,
>> > although no input was given.  This contradicts the doc, is not useful
>> > and the behavior is unforeseeable.
>> Those cases where it immediately returns t should hopefully be very
>> similar to those cases where it stops in the middle even tho the event
>> that interrupted it is "ignorable".
> Sure? (What are such "ignorable" events?)  That would mean that binding
> `throw-on-input' also "fires" in cases where no input arrived.

Same as for input-pending-p, I think, yes.  The issue is not really "no
input" but that what you consider as input is not necessarily the same
as what Emacs considers as input.

E.g. Moving the mouse might send mouse-movement events.  Would you consider
that as "input"?  Emacs sometimes does (e.g. when you select text with
the mouse), but in most cases it should be ignored.  Emacs tries to get
it right, but...

> Is there an alternative to cancel a calculation on input without "false
> positives"?

I don't think so.  But we can refine the definition of "input" to ebtter
match the user's expectation.

>> > With the current implementation, I have to `discard-input' if I don't
>> > want this.
>> Can you give an example where you'd want to do that?
> Actually, no.  This was hypothetical, maybe unfounded.

If/when you do, please report it, so we can try and fix it.


        Stefan




This bug report was last modified 3 years and 325 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.