From: <klaus.berndl@sdm.de>
Subject: RE: Problem with `while-no-input'
Date: Tue, 25 Apr 2006 11:35:08 +0200 [thread overview]
Message-ID: <A47B192B0358794C958615D788BF7FB701CD33A9@mucmail1.sdm.de> (raw)
after running a current build of CVS-Emacs with Windows NT and
testing the short test-snippet below with this current build i got
new results:
Now this code is also interrupted by any keypress (not only after C-g
as in a previous build) - Fine!
But pressing/releasing mouse-buttons does still not interrupt this
code! First after a keypress it is interrupted and then first the queued
mouse-click is performed before the pressed key is inserted in the buffer
(that key which has interrupted this code).
Is this behavior intended? If yes, why? Would it not better also
enabling mouse-interruption?
But nevertheless many thanks for your efforts to make it interruptable by key!
Ciao,
Klaus
> I tried this short test-code:
>
> (defun klaus-test-input ()
> (interactive)
> (let ((result nil)
> (i 0))
> (setq result (while-no-input
> (while t
> (setq i (1+ i)))))
> (message "Klaus: %s" result)))
>
> I expected this to being interrupted by any user-interaction (e.g.
> keypress etc..) and setting result to t according to the docstring of
> `while-no-input':
>
> while-no-input is a Lisp macro in `subr.el'.
> (while-no-input &rest body)
>
> Execute body only as long as there's no pending input.
> If input arrives, that ends the execution of body,
> and `while-no-input' returns t. Quitting makes it return nil.
> If body finishes, `while-no-input' returns whatever value body
> produced.
>
> But only C-g interrupts this code but not pressing any key like 'a'
> etc...
>
> Have i overlooked something or have i misunderstood the documentation
> of `while-no-input'? Have i misinterpreted the sentence "If input
> arrives,
> that ends the execution of body, and `while-no-input' returns t" or
> what
> I'm doing wrong?
>
> Thanks for your help!
>
> I tried this with Emacs 22.0.50.1 compiled on 29.1.2006 for
> Windows....
>
> Ciao,
> Klaus
>
>
> _______________________________________________
> Emacs-devel mailing list
> Emacs-devel@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-devel
next reply other threads:[~2006-04-25 9:35 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-25 9:35 klaus.berndl [this message]
2006-04-25 22:05 ` Problem with `while-no-input' Richard Stallman
2006-04-26 11:19 ` Jason Rumney
-- 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-03-10 7:38 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
2006-03-11 22:45 ` Jason Rumney
2006-03-11 23:46 ` Richard Stallman
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=A47B192B0358794C958615D788BF7FB701CD33A9@mucmail1.sdm.de \
--to=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.