From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Aaron Jensen Newsgroups: gmane.emacs.devel Subject: Re: input-pending-p after make-frame-visible Date: Wed, 20 Oct 2021 16:00:12 -0400 Message-ID: References: <6c69780538e1957d1002@heytings.org> <322f50be-0de1-c818-819d-6ecb400de928@gmx.at> <03ab7a19-6616-445c-cdcf-588fb30a514a@gmx.at> <3205a073-a6ca-b9a5-3834-929025b70b7b@gmx.at> <83wnm7absp.fsf@gnu.org> <83r1cfa92p.fsf@gnu.org> <83mtn3a71c.fsf@gnu.org> <83k0i7a57f.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22293"; mail-complaints-to="usenet@ciao.gmane.io" Cc: martin rudalics , Alan Third , Gregory Heytings , YAMAMOTO Mitsuharu , emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Oct 20 22:03:17 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mdHnx-0005aV-Pd for ged-emacs-devel@m.gmane-mx.org; Wed, 20 Oct 2021 22:03:17 +0200 Original-Received: from localhost ([::1]:35362 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mdHnv-0006MI-OI for ged-emacs-devel@m.gmane-mx.org; Wed, 20 Oct 2021 16:03:15 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45522) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mdHlL-0005V0-9x for emacs-devel@gnu.org; Wed, 20 Oct 2021 16:00:36 -0400 Original-Received: from mail-pl1-x62e.google.com ([2607:f8b0:4864:20::62e]:36435) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mdHlH-00018n-2j; Wed, 20 Oct 2021 16:00:34 -0400 Original-Received: by mail-pl1-x62e.google.com with SMTP id f21so16915724plb.3; Wed, 20 Oct 2021 13:00:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=82aX4XKDrkL3fczlIeP9CrXMyuMfgr/M5hlngt3vspQ=; b=JROeGHQG5htA28j9jicPCVCqwmOhiWJeqLbUBB+nhVIsLIvvP8uYBUnJFtqXwXt+Pb 9C3ESdbnaAFWUiGt5t8EG2i50mo2WRWMeNWKVNgvxaEkgPWZDoNlpspNnm6DMJ640Ns0 RNsPEW2AjpMHJt5fjH70J2bEzwHdoNGx2mrImQsNU2PyxLlS3irl7OrLeL5y81HRHVrX jPBX9zg1qkEEtANXUo6ugw1gwn0bg5NAFLQp61HeuHKL3EhzOveow1mlPIqN9YZo2fnY NoluiP5u7AoIseBtpA5El4pFLiuadqJXYKKby3AhxAu+KsU5P19pkdxk3pvczxE60Mdd Qpmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=82aX4XKDrkL3fczlIeP9CrXMyuMfgr/M5hlngt3vspQ=; b=NCyMDfdiMLRtX5sZGBqrdkeJyloZHUaxQsSX2di6fT2pBjXkQZXa2Q01p7aX8GxaU/ fgKwFJchut4sRhfqbeGYaSw28XzUIwi0s2mfBO58Q11x9FQBXwzFNZekp645UL+h/smv qnBD68ukdASYYGl4dkxkzZ3JvDDXNsO7AIaK0E11ShwEhUiLdyA9HZx+EyXj4Z7POV5Z DGOkEwk8hZDI/UE0GG+FZBDVBIRklXgc8kzeeCD3WmY5ubaFS7l9kav9LIbhk6iKinSz 6u9YJ7QoKauENZ5i557Phky8dFXwrSU1n7gsGVm5uhi+RTa45ru7FnZjtbHJTHywUaed 0zYQ== X-Gm-Message-State: AOAM533BRGJKogsgsYrQ2M1HcVWfrQihoMmm6MBylcFjGuM7Ugy/gTm2 QvRy1zjunM3gM5crqQMfloc2S1NdRRE+3gGwWN+r1P7J0X0= X-Google-Smtp-Source: ABdhPJwAQ4eyyDEMbP3dSizUnsfgNITozqKBVN4uy+J2NcWffQG7WOkcRYo694yoeRxgsVkI3ApyoIsWPEYiotFYCBI= X-Received: by 2002:a17:90b:251:: with SMTP id fz17mr1232947pjb.52.1634760024757; Wed, 20 Oct 2021 13:00:24 -0700 (PDT) In-Reply-To: <83k0i7a57f.fsf@gnu.org> Received-SPF: pass client-ip=2607:f8b0:4864:20::62e; envelope-from=aaronjensen@gmail.com; helo=mail-pl1-x62e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:277469 Archived-At: On Wed, Oct 20, 2021 at 3:03 PM Eli Zaretskii wrote: > > > From: Aaron Jensen > > Date: Wed, 20 Oct 2021 14:55:05 -0400 > > Cc: martin rudalics , Alan Third , > > Gregory Heytings , emacs-devel@gnu.org, > > YAMAMOTO Mitsuharu > > > > On Wed, Oct 20, 2021 at 2:24 PM Eli Zaretskii wrote: > > > > > > > AFAICT kbd_buffer_get_event calls `readable_events (0)' only, which > > > > will disregard any of the code I changed or added. The > > > > READABLE_EVENTS_FILTER_EVENTS must be set for it to come into play. > > > > Only input-pending-p sets that flag AFAICT. > > > > > > I don't see how this helps: who will remember that no caller of > > > readable_events can ever use that flag without invoking this behavior > > > whose justification we don't understand? > > > > Which behavior are you saying the justification is not understood? If > > it's the behavior I introduced, it should be understood as it is > > understandable. > > We are mis-communicating. What bothers me is that in some more or > less distant future someone will find a good reason to call > readable_events with that flag from some other place, not realizing > that doing so will get some of the events filtered out under some > subtle conditions. Thus, the fact that this flag has currently just > one user, which just happens to be the function whose behavior you are > interested to change, doesn't help, because we'd still have a ticking > maintenance bomb. Got it, so I guess the question is, what is the expected behavior of readable_events when READABLE_EVENTS_FILTER_EVENTS is set? Would adding another flag like READABLE_EVENTS_FILTER_WHILE_NO_INPUT_IGNORE_EVENTS make it more clear exactly what it is doing? I could add that w/o changing the behavior of READABLE_EVENTS_FILTER_EVENTS at all, and remove its only usage (which should beg the question "Should we keep that flag?"). So, maybe I could just rename the flag? It seems unlikely that a person would start using a flag that has a single use without understanding what that flag does, but I'm somewhat out of position here and I don't want to create a maintenance burden for anyone. Thanks, Aaron