From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#50256: thing-at-mouse Date: Sun, 05 Sep 2021 19:13:15 +0300 Organization: LINKOV.NET Message-ID: <874kazxm9o.fsf@mail.linkov.net> References: <87sfys6ubm.fsf@mail.linkov.net> <83pmtsp4g1.fsf@gnu.org> <831r67ph8d.fsf@gnu.org> <87tuj3bffb.fsf@gnus.org> <83y28fo1xf.fsf@gnu.org> <191e9cc6-7370-5b7d-7777-716b61e0155d@gmx.at> <83pmtrnydh.fsf@gnu.org> <158a8854-f56a-9aaa-3a14-d108e086a24c@gmx.at> <83k0jznms2.fsf@gnu.org> <87v93j9dfz.fsf@mail.linkov.net> <87y28e4ysv.fsf@mail.linkov.net> <83czpqzupp.fsf@gnu.org> <83v93hyl3l.fsf@gnu.org> <83sfykwyyb.fsf@gnu.org> <087851c3-b3b1-5130-f4b1-50cd42ef83a8@gmx.at> <83ilzgwp2w.fsf@gnu.org> <361bb63a-5e29-9785-0785-6c46f6621223@gmx.at> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5664"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) Cc: 50256@debbugs.gnu.org, larsi@gnus.org To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Sep 05 18:43:01 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1mMvET-0001M8-I6 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 05 Sep 2021 18:43:01 +0200 Original-Received: from localhost ([::1]:44722 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mMvES-0001To-9f for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 05 Sep 2021 12:43:00 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43650) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mMvDX-0008TY-Ub for bug-gnu-emacs@gnu.org; Sun, 05 Sep 2021 12:42:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:39340) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mMvDX-00073a-Ms for bug-gnu-emacs@gnu.org; Sun, 05 Sep 2021 12:42:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mMvDX-0008Er-KR for bug-gnu-emacs@gnu.org; Sun, 05 Sep 2021 12:42:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 05 Sep 2021 16:42:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50256 X-GNU-PR-Package: emacs Original-Received: via spool by 50256-submit@debbugs.gnu.org id=B50256.163086011031590 (code B ref 50256); Sun, 05 Sep 2021 16:42:03 +0000 Original-Received: (at 50256) by debbugs.gnu.org; 5 Sep 2021 16:41:50 +0000 Original-Received: from localhost ([127.0.0.1]:50874 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mMvDK-0008DR-Gq for submit@debbugs.gnu.org; Sun, 05 Sep 2021 12:41:50 -0400 Original-Received: from relay10.mail.gandi.net ([217.70.178.230]:58653) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mMvDI-0008Cz-BV for 50256@debbugs.gnu.org; Sun, 05 Sep 2021 12:41:48 -0400 Original-Received: (Authenticated sender: juri@linkov.net) by relay10.mail.gandi.net (Postfix) with ESMTPSA id 1CF4E240005; Sun, 5 Sep 2021 16:41:39 +0000 (UTC) In-Reply-To: <361bb63a-5e29-9785-0785-6c46f6621223@gmx.at> (martin rudalics's message of "Sun, 5 Sep 2021 09:50:14 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:213515 Archived-At: > (1) Fix it in a general way. You don't want to do that because it might > harm calls of that function that silently worked until now. > > (2) Fix it by modifying the calls of `pos-visible-in-window-p'. In that > case the warning should help us find the calls that should be fixed. Since there is no way to fix (1), I sent a fix for (2): diff --git a/lisp/subr.el b/lisp/subr.el index 6ae6d242a4..bf0177a846 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -1510,8 +1510,8 @@ event-start For more information, see Info node `(elisp)Click Events'." (if (consp event) (nth 1 event) - (or (posn-at-point) - (list (selected-window) (point) '(0 . 0) 0)))) + (or (posn-at-point (window-point)) + (list (selected-window) (window-point) '(0 . 0) 0)))) (defun event-end (event) "Return the ending position of EVENT. @@ -1519,8 +1519,8 @@ event-end See `event-start' for a description of the value returned." (if (consp event) (nth (if (consp (nth 2 event)) 2 1) event) - (or (posn-at-point) - (list (selected-window) (point) '(0 . 0) 0)))) + (or (posn-at-point (window-point)) + (list (selected-window) (window-point) '(0 . 0) 0)))) (defsubst event-click-count (event) "Return the multi-click count of EVENT, a click or drag event.