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: Thu, 21 Oct 2021 16:27:54 -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> <83wnm68pc5.fsf@gnu.org> <83lf2m8eld.fsf@gnu.org> <83fssu8dao.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="38913"; 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 Thu Oct 21 22:43:34 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 1mdeuU-0009o3-4q for ged-emacs-devel@m.gmane-mx.org; Thu, 21 Oct 2021 22:43:34 +0200 Original-Received: from localhost ([::1]:49850 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mdeuS-0007O6-Om for ged-emacs-devel@m.gmane-mx.org; Thu, 21 Oct 2021 16:43:32 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40330) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mdefa-0004Oy-Aa for emacs-devel@gnu.org; Thu, 21 Oct 2021 16:28:10 -0400 Original-Received: from mail-pl1-x62a.google.com ([2607:f8b0:4864:20::62a]:39512) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mdefY-00024d-AM; Thu, 21 Oct 2021 16:28:09 -0400 Original-Received: by mail-pl1-x62a.google.com with SMTP id t21so1220448plr.6; Thu, 21 Oct 2021 13:28:07 -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=8o56yhTA2HmI66FSYB8dmsEZTJwzkViBeZZ8KIuSBiw=; b=H72k2eV5xn/PlOIItxga23IZO79k0kyJxduua0dRr5Ddr1Xp7w9ssu16RPd/2Q8HKW PEHuUJPWuNiyRS3RPmte9Xzu7S7J6iJ55zSLAr5wN1WO+wD3jINeCa4IWDsVZ4yTXPJk RrJegn2ibQaOh1gquQTDQPiXau2VAkYwJhdsOTzZ0l4aQoL1exKj+nyZfeRfvUb4+66o hUgChK45ZNh3ZOUwja7aaKNpLPO2bd+w7vH4XyeDXshPNOVB7eXFBM47PZL/OuFJ0gsi R2B5eODYwhdSsjC787s64BhVuiWDT4h1LiPRZH2m1HpZhFyBE57nPYDgamma/Fcsp0B7 20qw== 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=8o56yhTA2HmI66FSYB8dmsEZTJwzkViBeZZ8KIuSBiw=; b=yPOPu8kGm/IxaszOkKmPGrdK5Pzp0iNVU2RFdGCbEXbO9vOiSpIEJTtCF+FrmvTqe3 5AN/dwhcfaqJXco6ePX0Xl1+5AdAI9xjp0o0MZ42BcH03D3FsAT66k0/4n0tx4hb65ae TfKwvvumIchkciRt3mwoy1zuiO2SIrOXDYpUVb2+R2MJhsfw35LVGaGV4gqvoA21evrt ZPBaUVgHRq4Gw+5185UQRPPWNTV+ZwGKmbqpzdehcgOUTi45C6MMnjQpJD5BdrvVPxyv 6iqyqPJdpYgP9qA6E3Gtmv/BgzJxZospbRZYCmTsYCWRhT2UjYMPbNMRoGpbTa5UqMPl /QUA== X-Gm-Message-State: AOAM530ogK3EIcxEI5fFboCCxoRXklgXhi98/PrQcKFcn9irhgE67j// +1uCg4FfbhgSsJXsiwL/X2qjVczqk8yIZ++QzWuvfD4Ts58= X-Google-Smtp-Source: ABdhPJxiyyjx+Apu13Toi39AxDfUWj4KRgrm979Pzw5meHO6biLcZDpI2XcOWHAgSaEkT+WbNECb7slTdjlTRwpYkxk= X-Received: by 2002:a17:90a:3189:: with SMTP id j9mr9284881pjb.54.1634848086301; Thu, 21 Oct 2021 13:28:06 -0700 (PDT) In-Reply-To: <83fssu8dao.fsf@gnu.org> Received-SPF: pass client-ip=2607:f8b0:4864:20::62a; envelope-from=aaronjensen@gmail.com; helo=mail-pl1-x62a.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:277532 Archived-At: On Thu, Oct 21, 2021 at 2:04 PM Eli Zaretskii wrote: > > > From: Aaron Jensen > > Date: Thu, 21 Oct 2021 13:46:47 -0400 > > Cc: martin rudalics , Alan Third , > > Gregory Heytings , > > YAMAMOTO Mitsuharu , emacs-devel@gnu.org > > > > Right, READABLE_EVENTS_FILTER_EVENTS does not (and should not) > > indicate that it is only used from input-pending-p. > > Does not: agree. Should not: why? If we decide that this is its only > purpose, why shouldn't limit its use to that caller only? It's a general principle that that I try to adhere to -- name things for what they do, rather than their use case. We cannot imagine all of the use cases that may come in the future and someone else may want to use readable events with non-input events filtered. If it was named after input-pending-p, they could either use it anyway and create confusing code, or rename it back to what it was, or rewrite it. Also, a reader of the code would no longer get any hints as to what the flag does from its name. Whereas if it were named after what it did they can always grep to find its uses -- no information is lost. If anything, I would suggest renaming it to READABLE_EVENTS_FILTER_NON_INPUT_EVENTS to go along with the non-input-events variable. I'm not here to enforce my norms onto Emacs though, I will conform with Emacs norms. > Well, one solution could be renaming the flag, or documenting that it > must not be used by any caller except input-pending-p. Documentation seems like it could be useful, would you want it to say it can't be used by anything but input-pending-p or that it is currently only used by it? Does the rest of the plan seem reasonable to you? Thanks, Aaron