From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Po Lu Newsgroups: gmane.emacs.devel Subject: Re: master 3b41141708: Expose the name of an event's input device to Lisp Date: Sat, 09 Apr 2022 08:24:49 +0800 Message-ID: <87lewfqf1q.fsf@yahoo.com> References: <164933858147.29834.15050766441005536059@vcs2.savannah.gnu.org> <20220407133623.9C209C009A8@vcs2.savannah.gnu.org> <87ee28xyg2.fsf@yahoo.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11572"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.91 (gnu/linux) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Apr 09 02:27:04 2022 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 1ncywS-0002nj-MM for ged-emacs-devel@m.gmane-mx.org; Sat, 09 Apr 2022 02:27:04 +0200 Original-Received: from localhost ([::1]:45656 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ncywR-0005k8-CS for ged-emacs-devel@m.gmane-mx.org; Fri, 08 Apr 2022 20:27:03 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50566) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ncyuU-0003Dr-PN for emacs-devel@gnu.org; Fri, 08 Apr 2022 20:25:03 -0400 Original-Received: from sonic316-21.consmr.mail.ne1.yahoo.com ([66.163.187.147]:41820) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ncyuS-0005zr-Hm for emacs-devel@gnu.org; Fri, 08 Apr 2022 20:25:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1649463898; bh=+LjHteqS6N8U55DTs4yw+H0YT0pfnCQsmDdPxwe6hO8=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From:Subject:Reply-To; b=eol7LSamv+hKl19eHd1JXTPscbWlzdJhbRaWxuIGr915t6Gu1yVk8M3EmLV71WxhHlyn1SOuX1FXpYCKCjT3Mjn1RfImV9qyQhbEhoMjHdt417mQAmCMNvYgCNLvP4R6yIej1ElASjgnxm7fjne/MYaF+qzHth+MrmVdmOWIh5LLSE4ntc32eijPzh4dB5TZti+V6RFhZZbaZhn4K6fDb12HmU9mZ4I/OdhYiZ3+oxyTlWq+V1EXywcCCiU6vmxsJEAFGKEUKnwgo/XRSau6tOwKtvVh3cWtMg2IG8nPjHbjniwYLhnGEn06mzlydNBgYUhCP2nIOlVKS9VqcNwU1w== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1649463898; bh=FIjUA7xE2WD9JgRLX/GyPVGFWw5K0eZ9QqiGwcTBkVL=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=gZ2F1hTdIc/FWGBR1ZTr6LR0o8TYFXTtCU5L6HMMO7fmfz7JicT3n1wkLMC7rhYpu2s9Zr4U1W4hcon4yde5XI/oU8FIfbwNJjrl9DeBU8225FPkpaxG7CDUD08UnkxfOspR6qhKQ/aPxsDgs1Esdrvig7SY8CUuA74ZJyopRfs/oPHqtMb80wIY2pJ2EAwKSyUTW7BmRAORCyqy87aYRueL01AQRbBOGtWSqGCwz76dHfP5n+nlzetG67IFLPiDSuIGYZNwkB79PZeisIBoBgKHAwv4x8jq4R6efT/Xw6NZsY7bqdU/WVy7V6N3/Zp83GSO7F6zVKKrrYcvr53KOw== X-YMail-OSG: d.95gnYVM1mW9K7CdCGVyYevXU8IeHWisxgYqQfeUipuTTECXTnYYXX2C_HS7r7 VUc9JSD6e2VTcrmAEo8T0.bdWG6fq18ju3WJEdu8hA6r6cNK_TIrZSaucIJIU5lWYXq47.Oh1S0z U.GETz1Nnsg8kW9fkgJU_fkXRF9wGVsc1y4_BLlaFL14UyTgOZ_9y0AkXpuCr52ID1rT2va9NtPk fRQ66is3aSPgXoSeSOx.veMX3.tD8.d27RxtcbdQS_HRShGM8EbTii6BpUhJsnQuq10EChubAlpE K8sa1CRkzHYj.urse8hf0SOmUIfHiR4edrM8jhSiM14kkZToZGo1Gv.b.F9aOUV1G00mcXgqEcY0 LiIEbso7WF2JNZgxD0M2s2Br02kIgcTrVywyrnXw2Dc5vFC5u1hKWWDN28g_HBp3cv7IjLO4t5Bq y4meY6YJOXM4ZeiqW_iUT7iN82LFL3eq3MtwGFC87ndyx3eR8DV9e8BABP5U7aA.uSubZLQ_eE06 ImWivYM.Ki9f4MlGi6ys9NfCWHcJ42.4PLrn4kFJtMYc3d2f.O6OlLq3TLsT4HlNa51sPw6T1MDV kqXkv7jIPoZJMNSVndgL_KWpaw5GuXdq.3K4lUhM5ztjaDpYweBvTOlD1jBVsrHYp5YgMXm1Gwa9 c3zofUnTYT__poNPZO5FNi7Ka0u4sszcXJs5QHwdRvIH66Oe8TM9_sydvHhKD30SU0rc9C981z2U 2BN_YE1dWgcIYumX5NqCeVxnv0mlz2dljidOi7Zs2sX8UdoYYrsL.EFdXuVIrjn5wt_txp0a2Psc 0jbkxauRaQBbR9N2Y.CdlRaJ5tMZZWXbfJ2.Fxc41. X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic316.consmr.mail.ne1.yahoo.com with HTTP; Sat, 9 Apr 2022 00:24:58 +0000 Original-Received: by hermes--canary-production-sg3-65d7bd97b5-5v4hr (VZM Hermes SMTP Server) with ESMTPA ID 11a5e6b351507a47d59125c65162e549; Sat, 09 Apr 2022 00:24:55 +0000 (UTC) In-Reply-To: (Stefan Monnier's message of "Fri, 08 Apr 2022 10:27:37 -0400") X-Mailer: WebService/1.1.20048 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Received-SPF: pass client-ip=66.163.187.147; envelope-from=luangruo@yahoo.com; helo=sonic316-21.consmr.mail.ne1.yahoo.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, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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:287984 Archived-At: Stefan Monnier writes: >>> Which event the global variable applies to is also perfectly clear: it >>> applies to the last event that was read, either by the command loop or >>> read-event. >> Yeah, it works, but relying on state is ugly and better avoided if >> we can. > > How 'bout a midway solution: we keep the var but we additionally put > that info into those events where we can? I'm fine with that, but we need a consistent way to get it from the event structures. WDYT about putting the device in the mouse position list? (Of course, Eli's concerns about the info itself will have to be addressed.) That way, we can have a single function `posn-device' to access the device.