unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Michael Heerdegen <michael_heerdegen@web.de>
Cc: 15042@debbugs.gnu.org, Thierry Volpiatto <thierry.volpiatto@gmail.com>
Subject: bug#15042: 24.3.50; while-no-input and input-pending-p
Date: Wed, 07 Aug 2013 21:19:55 -0400	[thread overview]
Message-ID: <jwvli4d0yox.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <87fvul9qi8.fsf@web.de> (Michael Heerdegen's message of "Wed, 07 Aug 2013 22:48:15 +0200")

>> > 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





  reply	other threads:[~2013-08-08  1:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-07 15:39 bug#15042: 24.3.50; while-no-input and input-pending-p Michael Heerdegen
2013-08-07 18:02 ` Stefan Monnier
2013-08-07 20:48   ` Michael Heerdegen
2013-08-08  1:19     ` Stefan Monnier [this message]
2021-08-21 13:50     ` Lars Ingebrigtsen

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvli4d0yox.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=15042@debbugs.gnu.org \
    --cc=michael_heerdegen@web.de \
    --cc=thierry.volpiatto@gmail.com \
    /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 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).