From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: master 3b41141708: Expose the name of an event's input device to Lisp Date: Sat, 09 Apr 2022 17:31:52 +0300 Message-ID: <83fsmm8h0n.fsf@gnu.org> References: <164933858147.29834.15050766441005536059@vcs2.savannah.gnu.org> <20220407133623.9C209C009A8@vcs2.savannah.gnu.org> <87ee28xyg2.fsf@yahoo.com> <87lewfqf1q.fsf@yahoo.com> <87zgkvosia.fsf@yahoo.com> <87pmlql6mj.fsf@yahoo.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29223"; mail-complaints-to="usenet@ciao.gmane.io" Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Po Lu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Apr 09 16:32:29 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 1ndC8b-0007Th-Il for ged-emacs-devel@m.gmane-mx.org; Sat, 09 Apr 2022 16:32:29 +0200 Original-Received: from localhost ([::1]:45382 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ndC8a-0006yo-AD for ged-emacs-devel@m.gmane-mx.org; Sat, 09 Apr 2022 10:32:28 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40110) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ndC7n-0006BU-P9 for emacs-devel@gnu.org; Sat, 09 Apr 2022 10:31:39 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:50632) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ndC7n-0002Of-G4; Sat, 09 Apr 2022 10:31:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=sOMimaoAyzO3v3ZJxUJxbtltC6Q8KKE872f/zy5RTSg=; b=lZ8pSKAcu/Ni RY6vpCM5YHphO4Q4UUW8Z0WpxuNKhwoW8JqRZAawCoAZsbDMoxQjR45myOkTYyCTncdzM7cR2k/e6 wN8KpsISDksZMfS6LpG5h0bu52GDnnGrlj0E0HdN/WHtQMHQPkVYK1j/avHf+vfGIQgPugDlYxB7J RATfVVA1nxk51haJQzQ8VCI7JBBVwsxx18Wj+CtEK6uCVfFDux2LBBehvsSaCgTeMv8bbHsjgO6J5 qxr9uKyMRGvCc5Nsww0NtSdSald0GBAt570IlgrVLztnEdeU+BN9u9x4kdHKniqebHXqeEMncykds A4lDl/K8YBAFDrA6HQasWQ==; Original-Received: from [87.69.77.57] (port=2148 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ndC7m-0005vf-Op; Sat, 09 Apr 2022 10:31:39 -0400 In-Reply-To: <87pmlql6mj.fsf@yahoo.com> (message from Po Lu on Sat, 09 Apr 2022 21:37:56 +0800) 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:288027 Archived-At: > From: Po Lu > Cc: emacs-devel@gnu.org > Date: Sat, 09 Apr 2022 21:37:56 +0800 > > Stefan Monnier writes: > > > Not necessarily, it could be something like: > > > > (defun event-device (e) > > (when (consp e) > > (alist-get 'device (nthcdr 3 e)))) > > > > But I agree that the current representation of events is problematic. > > We should make it more regular and self-descriptive, either based on an > > alist as above or have every event come with some kind of "class" which > > then describes the name&position of every accompanying data. > > Unfortunately, our current representation is basically set in stone. > There is too much Lisp out there that relies on the current form of Lisp > events, and simply finding all that code will be a serious chore. We could keep the form, but add additional members to the list, no?