all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Artur Malabarba <bruce.connor.am@gmail.com>
To: Tassilo Horn <tsdh@gnu.org>
Cc: Stefan Monnier <monnier@iro.umontreal.ca>,
	21747@debbugs.gnu.org, Kim Storm <storm@cua.dk>
Subject: bug#21747: 25.0.50; while-no-input breaks kbd event handling when called from post-command-hook
Date: Sat, 24 Oct 2015 11:30:42 +0100	[thread overview]
Message-ID: <CAAdUY-LR6_uG=UXGBK2sb=E8u73yJw_TYPz_1YbEViXoN71sGw@mail.gmail.com> (raw)
In-Reply-To: <8737x0egvm.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 1322 bytes --]

On 24 Oct 2015 10:49 am, "Tassilo Horn" <tsdh@gnu.org> wrote:> >> So the
question is: should `while-no-input' call (sit-for 0) as the
> >> first statement in the `progn' or should functions using
> >> `while-no-input' do that on their own?  I'd prefer the former because
> >> the current behavior is not really obvious (at least not to me nor
> >> Artur).
> >
> > I don't have enough experience in using while-no-input to answer that.
> > Perhaps others could chime in and voice their opinions.  Maybe we
> > should have a discussion on emacs-devel about this (because many
> > people who read emacs-devel don't read the bug list).
>
> Yes, I think that would be a good idea.  Originally, `while-no-input'
> used (not (sit-for 0 0 t)) instead of (input-pending-p) which I think is
> pretty equivalent except that the former forces a redisplay.

Reading this discussion, it sounds to me like this is more about
post-command-hook than while-no-input.
By the time this code is run, the user's input has been received and
processed. The reason why redisplay doesn't happen is the fact that this
code is running on post-command-hook.

So maybe the docstring for post-command-hook should point out this detail
and recommend that functions added to this hook call sit-for if they're
going to do potentially expensive processing.

[-- Attachment #2: Type: text/html, Size: 1636 bytes --]

  reply	other threads:[~2015-10-24 10:30 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-24  7:42 bug#21747: 25.0.50; while-no-input breaks kbd event handling when called from post-command-hook Tassilo Horn
2015-10-24  8:02 ` Eli Zaretskii
2015-10-24  8:53   ` Tassilo Horn
2015-10-24  9:14     ` Eli Zaretskii
2015-10-24  9:49       ` Tassilo Horn
2015-10-24 10:30         ` Artur Malabarba [this message]
2015-10-24 10:52           ` Eli Zaretskii
2015-10-24 12:13             ` Tassilo Horn
2015-10-24 12:45               ` Eli Zaretskii
2015-10-24 13:30                 ` Tassilo Horn
2015-10-24 13:57                   ` Artur Malabarba
2015-10-24 14:06                     ` Eli Zaretskii
2015-10-24 14:05                   ` Eli Zaretskii
2015-10-25  7:19                     ` Tassilo Horn
2015-10-25  8:10                       ` Tassilo Horn
2015-10-25  9:25                         ` Tassilo Horn
2015-10-25 18:45                           ` Eli Zaretskii
2015-10-25 18:49                             ` Tassilo Horn
2015-10-25 20:10                           ` Stefan Monnier
2015-10-26  6:57                             ` Tassilo Horn
2015-10-25 18:43                       ` Eli Zaretskii
2015-10-24 12:46               ` Tassilo Horn
2015-10-25 14:43             ` Artur Malabarba
2015-10-25 18:50               ` Eli Zaretskii
2015-10-26  0:27                 ` Artur Malabarba
2015-10-26  3:32                   ` Eli Zaretskii
2015-10-26 13:43                     ` Tassilo Horn
2015-10-24 10:35         ` Eli Zaretskii

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='CAAdUY-LR6_uG=UXGBK2sb=E8u73yJw_TYPz_1YbEViXoN71sGw@mail.gmail.com' \
    --to=bruce.connor.am@gmail.com \
    --cc=21747@debbugs.gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=storm@cua.dk \
    --cc=tsdh@gnu.org \
    /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.