unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Aaron Jensen <aaronjensen@gmail.com>
Cc: rudalics@gmx.at, alan@idiocy.org, gregory@heytings.org,
	mituharu@math.s.chiba-u.ac.jp, emacs-devel@gnu.org
Subject: Re: input-pending-p after make-frame-visible
Date: Thu, 21 Oct 2021 16:40:41 +0300	[thread overview]
Message-ID: <83y26m8pie.fsf@gnu.org> (raw)
In-Reply-To: <CAHyO48zOso2CeoDny01fWgkxPS=03PK8wDtesbcErKO6No0w7A@mail.gmail.com> (message from Aaron Jensen on Thu, 21 Oct 2021 07:25:44 -0400)

> From: Aaron Jensen <aaronjensen@gmail.com>
> Date: Thu, 21 Oct 2021 07:25:44 -0400
> Cc: Eli Zaretskii <eliz@gnu.org>, martin rudalics <rudalics@gmx.at>, Alan Third <alan@idiocy.org>, 
> 	Gregory Heytings <gregory@heytings.org>, emacs-devel@gnu.org
> 
> I understand the change better now and why the `#ifdef
> USE_TOOLKIT_SCROLL_BARS` was added around the `flags &
> READABLE_EVENTS_FILTER_EVENTS` check. It was an optimization to avoid
> an additional check because there was a previous check already done
> before entering the loop. So, I don't think that a bug was introduced,
> it just made the code a little more difficult to decipher. I can add
> that check back into my patch in whatever its final form is.

Whatever the original reasons, that patch has proven its utility by
fixing the original problem and not generating new ones in all the
years that passed since then.

> > I think that the input-pending-p problem needs a real fix.
> > These events should be ignored for the sake of input-pending-p
> > even if they are not ignored for some other purposes.
> >
> > Perhaps there should be two different functions for asking
> > whether there is input, one for low-level Emacs purposes
> > and one for high-level purposes.  Can you try fixing it that way?
> 
> So, the original impetus for the filtering code was that
> input-pending-p was reporting t when only a filter change was made.

I have no problem with fixing stuff inside input-pending-p.  My
problem is that your fix is not in input-pending-p, it is in a general
function called from many places.  So its effects are much more
general than on input-pending-p alone.  And my concern is that the
change which you want to make will some day affect code unrelated to
input-pending-p, with no one the wiser.

Which is why I must insist on making the change either limited to
input-pending-p, come what may, or to have a variable that controls
the change if its effect is more general.  If the change proves to not
cause any harm, in some distant future we can consider removing the
condition.

> > A new flag might be a good idea, indeed, but (a) I'd need to see a
> > patch to have a clear idea what you mean, and (b) the application of
> > that flag should be dependent on that variable exposed to Lisp, so
> > that if problems happen, we can ask users to flip the variable and see
> > if the problems go away.
> 
> I think that the variable would just change how
> READABLE_EVENTS_FILTER_EVENTS worked, so I would not add a new flag
> unless you feel that ultimately renaming it would be beneficial.

The change you propose _does_ change how READABLE_EVENTS_FILTER_EVENTS
behaves.  I want that change to be controlled by a Lisp variable.  I'm
not wedded to the specific implementation I suggested.  If you can
think of a different way to reach that goal, it's fine with me; show
me the code.

> > > It seems unlikely that a person would start using a flag that has a
> > > single use without understanding what that flag does
> >
> > In general, yes.  But isn't that precisely what you suggest we do
> > here? ;-)
> 
> Hah, to be fair I understand exactly what the flag does :).

Famous last words.

> Please let me know how you would like me to proceed -- I'm happy to
> add the extra variable and vary the behavior based on it for now.

I hope the above answers that question.

Thanks.



  parent reply	other threads:[~2021-10-21 13:40 UTC|newest]

Thread overview: 85+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-24 17:12 input-pending-p after make-frame-visible Aaron Jensen
2021-09-26  9:11 ` martin rudalics
2021-09-26 14:02   ` Aaron Jensen
2021-09-26 17:50     ` martin rudalics
2021-09-26 23:55       ` Aaron Jensen
2021-09-27  8:51         ` martin rudalics
2021-09-27  9:46           ` Aaron Jensen
2021-09-27 17:14             ` martin rudalics
2021-09-27 18:57               ` Eli Zaretskii
2021-09-28  7:41                 ` martin rudalics
2021-09-28  8:06                   ` Eli Zaretskii
2021-09-29  9:28                     ` martin rudalics
2021-09-29 12:06                       ` Eli Zaretskii
2021-09-29 12:16                         ` Aaron Jensen
2021-09-29 13:13                           ` Eli Zaretskii
2021-09-29 14:16                             ` Aaron Jensen
2021-09-29 15:42                               ` Eli Zaretskii
2021-10-01 17:31                                 ` Aaron Jensen
2021-10-01 17:55                                   ` Eli Zaretskii
2021-10-01 17:57                                   ` Eli Zaretskii
2021-10-01 18:25                                     ` Aaron Jensen
2021-10-03 19:33                                       ` Aaron Jensen
2021-10-03 20:55                                         ` Aaron Jensen
2021-10-03 21:22                                           ` Gregory Heytings
2021-10-04  1:38                                             ` Aaron Jensen
2021-10-04  8:29                                               ` martin rudalics
2021-10-04 11:04                                                 ` Gregory Heytings
2021-10-04 15:00                                                   ` Aaron Jensen
2021-10-04 20:37                                                     ` Alan Third
2021-10-04 22:12                                                       ` Aaron Jensen
2021-10-05 15:47                                                         ` Alan Third
2021-10-14 11:15                                                           ` Aaron Jensen
2021-10-14 11:32                                                             ` Aaron Jensen
2021-10-14 12:42                                                             ` martin rudalics
2021-10-14 23:04                                                               ` Aaron Jensen
2021-10-15  7:05                                                                 ` martin rudalics
2021-10-15 11:30                                                                   ` Aaron Jensen
2021-10-16  7:54                                                                     ` martin rudalics
2021-10-16 14:16                                                                       ` Aaron Jensen
2021-10-16 14:45                                                                         ` Aaron Jensen
2021-10-16 15:09                                                                           ` Aaron Jensen
2021-10-16 16:49                                                                             ` martin rudalics
2021-10-16 17:14                                                                               ` Aaron Jensen
2021-10-20 15:27                                                                                 ` Aaron Jensen
2021-10-20 16:41                                                                                   ` Eli Zaretskii
2021-10-20 17:15                                                                                     ` Aaron Jensen
2021-10-20 17:40                                                                                       ` Eli Zaretskii
2021-10-20 17:47                                                                                         ` Aaron Jensen
2021-10-20 18:24                                                                                           ` Eli Zaretskii
2021-10-20 18:55                                                                                             ` Aaron Jensen
2021-10-20 19:04                                                                                               ` Eli Zaretskii
2021-10-20 20:00                                                                                                 ` Aaron Jensen
2021-10-21  6:02                                                                                                   ` Eli Zaretskii
2021-10-21  6:58                                                                                       ` YAMAMOTO Mitsuharu
2021-10-21  7:47                                                                                         ` Eli Zaretskii
2021-10-21 11:25                                                                                         ` Aaron Jensen
2021-10-21 11:33                                                                                           ` Aaron Jensen
2021-10-21 12:40                                                                                             ` Stefan Monnier
2021-10-21 13:44                                                                                             ` Eli Zaretskii
2021-10-21 14:07                                                                                               ` Aaron Jensen
2021-10-21 17:36                                                                                                 ` Eli Zaretskii
2021-10-21 17:46                                                                                                   ` Aaron Jensen
2021-10-21 18:04                                                                                                     ` Eli Zaretskii
2021-10-21 20:27                                                                                                       ` Aaron Jensen
2021-10-22  2:28                                                                                                         ` Aaron Jensen
2021-10-22  6:10                                                                                                         ` Eli Zaretskii
2021-10-22 13:58                                                                                                           ` Aaron Jensen
2021-10-26 13:23                                                                                                             ` Aaron Jensen
2021-10-26 14:05                                                                                                               ` Eli Zaretskii
2021-10-28 15:51                                                                                                             ` Eli Zaretskii
2021-10-28 18:12                                                                                                               ` Aaron Jensen
2021-10-28 18:20                                                                                                                 ` Eli Zaretskii
2021-10-31 10:33                                                                                                                 ` Alan Third
2021-10-31 16:42                                                                                                                   ` Aaron Jensen
2021-10-21 13:40                                                                                           ` Eli Zaretskii [this message]
2021-10-15 17:32                                                             ` Alan Third
2021-10-15 17:54                                                               ` Stefan Monnier
2021-10-15 18:28                                                               ` Aaron Jensen
2021-10-04  8:28                                           ` martin rudalics
2021-09-27 19:26             ` Stefan Monnier
2021-09-27 23:02           ` Aaron Jensen
2021-09-28  2:29             ` Aaron Jensen
2021-09-29  5:10               ` Aaron Jensen
2021-09-29  9:28                 ` martin rudalics
2021-09-28  5:50             ` 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

  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=83y26m8pie.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=aaronjensen@gmail.com \
    --cc=alan@idiocy.org \
    --cc=emacs-devel@gnu.org \
    --cc=gregory@heytings.org \
    --cc=mituharu@math.s.chiba-u.ac.jp \
    --cc=rudalics@gmx.at \
    /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).