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 128ed5c9f17: Add one more mouse-set-point call to functions xref-find-*-at-mouse Date: Thu, 31 Aug 2023 09:10:32 +0800 Message-ID: <87edjkt3sn.fsf@yahoo.com> References: <169344150641.11482.13012085201452768898@vcs2.savannah.gnu.org> <20230831002506.C0C6DC038B5@vcs2.savannah.gnu.org> <87il8wt52f.fsf@yahoo.com> <583ae120-d016-e9e8-2783-db21c1e018b8@gutov.dev> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39126"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: emacs-devel@gnu.org To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Aug 31 03:12:02 2023 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 1qbWE3-0009qj-Lg for ged-emacs-devel@m.gmane-mx.org; Thu, 31 Aug 2023 03:11:59 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qbWD2-0001Ce-00; Wed, 30 Aug 2023 21:10:56 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qbWD0-0001CV-La for emacs-devel@gnu.org; Wed, 30 Aug 2023 21:10:54 -0400 Original-Received: from sonic303-22.consmr.mail.ne1.yahoo.com ([66.163.188.148]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qbWCy-0003IW-7C for emacs-devel@gnu.org; Wed, 30 Aug 2023 21:10:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1693444249; bh=qsva3lFs4/xMV1fJ1C2uuhhjlnj9oqfyWuvdIT5NBhk=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From:Subject:Reply-To; b=rYZHn543d6e14DLvDim84CrFolDBIujIYWjLd4qgeu5KIX5JYrwpLOIvyIqSwAHvKtyEJiHbQY3oErOc3BDheId0hCR0Ju6uLC9DxhTQDQH6b7snavzS6/tPznMx0NMCYaLTeSh+kfLfvaN9la8w5UqJAe/wCWwnNwnvJ23Vk0pxHFedV97WVHNDsqFudAJ0PpXCj/C03EeXmjkC1mxc1yZwwV9rMMVUFhpCcy6GBOxdHLRPv70uykA6gJ3Q2gmTIuK6v6lr6Ta4q7h2kuvdlwYuVvMiEeVCHA6E/XqT6FXV/Y2PdVabNSO8A2Ok7wGHVsuRiaYEAXNP7RV7NSzaqA== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1693444249; bh=MRlZsnZmsxzJDqyeKFOb5OXqga+KXaRtWsAxb18zfBT=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=LsHzYP814uQe9hll5xs6aIxEdKRkGE7M6RQk5GOsKSF1HmcWnGqOBfnjiwXlY4m/WSqta1T+XOvQzOmF4W2hlxNPYDuCgEsPKbVDtQGOWTVLSevQPz1W9BxudpktxgRH0Ne+lL0nUtlekBMVylcl5cE8Rp9Z1yJbm9epckNghKJdYp/IfRs9k/mXQ2mX4EUq7ynPhFXxlxnmkreg0ojuP/MbMyhURqffMvREheY+ADM4KcHjGSC8Z0sMDhLju/FEGUBL0haJ3TlS9UUyaC9UztmYNGpGqe829vtAZLtT8F4K9Qin3ZL6zt1nrHkyig2GZIVMgYYW9XBGPUexvKCCNA== X-YMail-OSG: FRr8EU0VM1lfgJSXRa_ihumW.vA6lPcsHsTdvOyAFwCQBp1UOsKjWXFKnxws6ET 6pGgEw.9dHf8aaQoKP3j6jJ8MsMAQooA5BHBW7.xoPbmy2R3OSH5CD98YKLKt4Zbsz65A0CJxIID 5wj9CkLN231Q4BiZiu9EmtDChICkx5LP1Gqkv2Arlo5YSzuS9R2oQbOXHD8ASGYUdsvC3aqrWzkn Lc3bOsDUvoa_hjcUFoy45sCbeUNYM61GaOj1ADtt6lNZHaV.5g3eBk_3VeBVqbSQXiHmWNPYeZDv AmgiYq0sJ.blnyQq5YiSh9PKAFf5GyBwoQMOTZbR4Tm5mPNcutIkMOs8Ufq4qom3ZsAxkoslTkBm qRtMjZiP9qUQv2fAHnxxtZ_mlbrPBsEkWAlqtSPPwBOmH1DPtJ29nS8s4Op.jIZUe84Djad6lLyW BhwVaMd036sh_MYhBqRHXKR3QAXTjSy1ZZITGuPu2mr4JqDDHeIYHMku.8UFQKQTbYYyFDFGyfYR NKUtzHXRblddaK0BfwLfczlhqis3qWSTWpQ3WtKRjKv63hMiowaPx7fLV._L3jVDxHgdi9ej7s7w YlGtAykhN4pd4SMGIeOIxC9IJjWfPT2uBpCEPSeOPoUb2BKgkNVA0yAJ3.l2CvRltUj6JEaZzLVG R_rTp67D3Ewa1FY0y.Ov2S2da._i_2Rff1RnzKYmp3lwhWlUkb6_A.nlWTQVjojvrHA8gMHHjPT9 WmqB4KNOYzlfJyAFchxZrtYPoTfAPo1pbKLlJtR06vrL39CgL6OlFU5aYYrzB8_aSKa2ITQVmoqc Xy4chSTgKRkmwDTh3yL5LuCg.yoU1cZK9F96QhSs_y X-Sonic-MF: X-Sonic-ID: 8acc5902-b9d7-4595-ae4f-2283a15e38d6 Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic303.consmr.mail.ne1.yahoo.com with HTTP; Thu, 31 Aug 2023 01:10:49 +0000 Original-Received: by hermes--production-sg3-69654d8bd-7fcnj (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 1dfc4c1f21043dfcaa5b0447d88265d1; Thu, 31 Aug 2023 01:10:41 +0000 (UTC) In-Reply-To: <583ae120-d016-e9e8-2783-db21c1e018b8@gutov.dev> (Dmitry Gutov's message of "Thu, 31 Aug 2023 03:54:26 +0300") X-Mailer: WebService/1.1.21763 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Received-SPF: pass client-ip=66.163.188.148; envelope-from=luangruo@yahoo.com; helo=sonic303-22.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 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:309570 Archived-At: Dmitry Gutov writes: > On 31/08/2023 03:43, Po Lu wrote: >> My experience with the entire touch screen affair says that many such >> errors would never have been written had `xref-find-definitions' taken >> an EVENT argument and used its posn-point if present. Something to >> consider, I suppose. > > Sorry, I don't quite understand which change you have in mind. > > The issue here was that we needed to move to the click's location both > when detecting the identifier (at that point), and before using the > identifier to find a set of locations. > > If we used a POSN value, it would also have to be used in two places, > I guess. One of which we could just as easily missed as we had here. In my opinion, commands or functions that respond to the location of a click should always take an EVENT argument, and use: (posn-point (event-start event)) if EVENT is present and incorporates a mouse position list. Rather than searching for an identifier at point, it should search for an identifier at the point of the mouse click. Adhering to such a convention is almost guaranteed to eliminate every bug where Emacs consults something under point instead of the mouse pointer when the user meant the latter. Thanks.