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: Sun, 10 Apr 2022 16:42:36 +0800 Message-ID: <87ee25cosj.fsf@yahoo.com> References: <164933858147.29834.15050766441005536059@vcs2.savannah.gnu.org> <87fsmow1hz.fsf@yahoo.com> <83a6cway59.fsf@gnu.org> <87tub4uivu.fsf@yahoo.com> <83y20fakwn.fsf@gnu.org> <87o81bu7zj.fsf@yahoo.com> <83v8vjai4s.fsf@gnu.org> <87bkxbsqfl.fsf@yahoo.com> <835yniah0u.fsf@gnu.org> <8735impqw4.fsf@yahoo.com> <83v8vi8uyu.fsf@gnu.org> <871qy6o9p3.fsf@yahoo.com> <83o81a8qnd.fsf@gnu.org> <87zgkulbuu.fsf@yahoo.com> <83ilri8iag.fsf@gnu.org> <87tub1kbkf.fsf@yahoo.com> <831qy58ofh.fsf@gnu.org> <87sfqlfomt.fsf@yahoo.com> <83wnfx77s0.fsf@gnu.org> <87o819e80r.fsf@yahoo.com> <83sfql73di.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32049"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.91 (gnu/linux) Cc: larsi@gnus.org, emacs-devel@gnu.org, rms@gnu.org, monnier@iro.umontreal.ca To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Apr 10 10:46:10 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 1ndTD0-0008ED-8d for ged-emacs-devel@m.gmane-mx.org; Sun, 10 Apr 2022 10:46:10 +0200 Original-Received: from localhost ([::1]:35854 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ndTCz-00069T-3z for ged-emacs-devel@m.gmane-mx.org; Sun, 10 Apr 2022 04:46:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58190) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ndT9l-0004D8-Ri for emacs-devel@gnu.org; Sun, 10 Apr 2022 04:42:49 -0400 Original-Received: from sonic302-20.consmr.mail.ne1.yahoo.com ([66.163.186.146]:38326) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ndT9i-0008Si-Mx for emacs-devel@gnu.org; Sun, 10 Apr 2022 04:42:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1649580164; bh=iCRlyuh2F9QUeGsrpvP1RT0n8P+oVr2j7Af0TtehskA=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From:Subject:Reply-To; b=Q+s0XfAm6phQr65zOrm6Bjhyyf0B3K0u7Am6f39uobvbzTCo+TOJZUm/2g0aqYaWPSlVgJmd85L6oiAMXiO6VH95Lz/8qvrW0I6SbN68gLnUTBLfHVtKX/E8BFT+ODBKkxy/wANWUCXbLqIkBr/9A2Q5w2L3wIW20SQZePGGZzc95ngFiUt25pZ6FCjlszWQgr2AISN2t+h90iiih7F/93gV/sX4lyt0+PjvfT3DOFOdrtPaw4yNQIC7NyRcELoNs0u078jfipVUXU1Ow13PEqTQfSrwjuX2374+R7tHkRmzZbIDS19KyVjYBlMctS6bHIbn/CNCqlgco1Wau5kUiA== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1649580164; bh=fri5XTyF11Cd+h9cEj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26Va 0gihLSMivMZ2kmnas3rKerX0q4Y7dfCLSpawSc9WoqOx.EgFkf4kUwhziIhjmsO4CRwQevh6Z8qr r1qG7xW0OOHgM1JE_tkfnFSLBNkOKDTi4nFWz1T6.CqeNQtPEM5mLoN4.CFbwBW6iBNe2uTCDTTR wUjzCCUK6J2pvjjtrvqFil7yVmNat6SR9c2kAuIsmx X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic302.consmr.mail.ne1.yahoo.com with HTTP; Sun, 10 Apr 2022 08:42:44 +0000 Original-Received: by hermes--canary-production-sg3-65d7bd97b5-5w6fp (VZM Hermes SMTP Server) with ESMTPA ID 7da260d9d619b4fd60b702d824504a2b; Sun, 10 Apr 2022 08:42:41 +0000 (UTC) In-Reply-To: <83sfql73di.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 10 Apr 2022 11:24:09 +0300") 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.186.146; envelope-from=luangruo@yahoo.com; helo=sonic302-20.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=unavailable 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:288119 Archived-At: Eli Zaretskii writes: > Again, who is "we"? If this is about code that reads events from X, > then it certainly knows which mouse produced the button-press, by the > very nature of reading inputs from the devices. By contrast, in Lisp, > buttons of different mice will appear with different symbols, like > mouse2-1 or mouse-15, and there's no special need to know which button > belongs to which mouse in order to process the button-press. [...] > Define "wrong order"? IOW, how and in which situations is the order > important/significant, Because the user doesn't know what lispy button a given button on a certain mouse corresponds to. `mouse-15', for example, could be the first button of any mouse connected to the system, assuming each mouse has 14 buttons. The only way to have this system become remotely predictable is for the button assignment to follow some logical order, such as the alphabetical order of the names of the mice. For example, the mouse named "ABC" might get assigned the buttons 1 to 14, the mouse named "ABD" 15 to 29, and the mouse named "BDC" 30 to 44. But that still doesn't work very well. If another mouse named "BAA" is attached to the system, then it will get the buttons 30 to 44, and "BDC" will get buttons 45 to 59, and any bindings that were made to buttons on "BDC" will now be for the wrong mouse. > and on what level in Emacs should that be known? The code which will assign button numbers to each mouse, if it's implemented that way. > Why will the user need to know? And why is the user's need to know > related to how we process the events from the mouse in Lisp? Because the user will want the buttons from different mice to behave differently, and that will be a customization done in Lisp. > This is orthogonal. Being able to show the user the details of > connected input devices is unrelated to how the input events are > processed. The information comes from the same source, of course, but > the code which produces input events can (and IMO should) consult this > information at a low enough level, so that interpreting the events in > Lisp and binding them to commands should not need any device > information to be known by the application code. The application code > should only use the Lispy input event, and that event should already > include all the information required for processing it. Those programs don't just show the details to the user, they expose those details to application code, in the hopes that the application code will allow the code to behave appropriately, and the user to customise the behavior based on those details. Thanks.