From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#65578: Eglot with mouse Date: Thu, 31 Aug 2023 03:27:29 +0300 Message-ID: <6752a462-ac85-65b5-e960-023215a3ca6a@gutov.dev> References: <86zg2beibp.fsf@mail.linkov.net> <402f3c93-748b-62d3-593f-4b852839deae@gutov.dev> <86o7irce5h.fsf@mail.linkov.net> <06ccb99d-27e5-179d-f34e-3ce64f92879d@gutov.dev> <86h6og4k6m.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38894"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Cc: 65578-done@debbugs.gnu.org, =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Aug 31 02:28:47 2023 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 1qbVYD-0009x3-Iy for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 31 Aug 2023 02:28:46 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qbVXa-0004OY-1j; Wed, 30 Aug 2023 20:28:06 -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 1qbVXS-0004CZ-Ch for bug-gnu-emacs@gnu.org; Wed, 30 Aug 2023 20:28:01 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qbVXO-0003Bu-Ns for bug-gnu-emacs@gnu.org; Wed, 30 Aug 2023 20:27:57 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qbVXW-0002aS-8E for bug-gnu-emacs@gnu.org; Wed, 30 Aug 2023 20:28:02 -0400 Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Thu, 31 Aug 2023 00:28:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 65578 X-GNU-PR-Package: emacs Mail-Followup-To: 65578@debbugs.gnu.org, dmitry@gutov.dev, juri@linkov.net Original-Received: via spool by 65578-done@debbugs.gnu.org id=D65578.16934416699922 (code D ref 65578); Thu, 31 Aug 2023 00:28:02 +0000 Original-Received: (at 65578-done) by debbugs.gnu.org; 31 Aug 2023 00:27:49 +0000 Original-Received: from localhost ([127.0.0.1]:54307 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qbVXJ-0002Zx-71 for submit@debbugs.gnu.org; Wed, 30 Aug 2023 20:27:49 -0400 Original-Received: from out3-smtp.messagingengine.com ([66.111.4.27]:51401) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qbVXF-0002Zi-N9 for 65578-done@debbugs.gnu.org; Wed, 30 Aug 2023 20:27:47 -0400 Original-Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 45DF35C009B; Wed, 30 Aug 2023 20:27:32 -0400 (EDT) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Wed, 30 Aug 2023 20:27:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm3; t= 1693441652; x=1693528052; bh=XAgRRWKdCHcDzNJhY/wOw9BfgH5UKixE+9S KrA4A5PI=; b=jqdy0C9En555P6n/kQClHYPon9Rk0kVhGeUG67iT4lecJDNZj0v y+zGEabOOGwABlJKSe0tZdNiFZWF4T0PEW98ZEd1iS9z6wCqzJZ7W1vKlEEFE+O+ TmtImVWkcZsEN8nA9MreYGE8wzMSiLNno5e2ilQdcM5PQRvODhNXD4kauN1DtoXt ooNQk6cKOvw0SiHx2Dty9vcQ3aiLecojXYXdhtgEQeWgzgqQ2jYD3XeHiZAZBJVY Uvqf9MlG3hoEC4Uy7Azo+/bDddNLlu7gmrCyQp6nnuF2UYG4N4Go6KtGj+6bGPxU 4tOA2GVRArBL3PcezcWsCMTPoaTlsi3Wpww== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1693441652; x=1693528052; bh=XAgRRWKdCHcDzNJhY/wOw9BfgH5UKixE+9S KrA4A5PI=; b=QYHrC7Ye4LP1ocyxjbdKyZDia2I6+xe/5Xe+3tEk+FbsBOE4Exf jsE3VK2gLVlwn3t2v0Gl8JIzlstcLnWqeWh3d9lRhfNDx4g2nGaRANUyKrtjJgDq aNdAM8rKTpdY98JHf/IInt6HSQUFeS062Z18ouFWsG2JSRJPlY4A3JOZAt9XnEA1 rZfRjYuQOT2okT/UjAWj8cY3gKfIZXXws9WpAgew2ruGH3GVMnpXIsaFnsXygr2M fQ/nBo/ZAW+YUjjoHOepEOYpWN27QafQLQaCSLqV+dHEaGUmPLdIS+C7tXIYbqwT 347IzROZENFyUY68WKsD+BZZreeBWD/PRuw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrudefledgfeegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtkeertddtfeejnecuhfhrohhmpeffmhhi thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth htvghrnhephfffheeljeffgeffueeghfekkedtfffgheejvdegjeettdduheeufffggfef jeehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug hmihhtrhihsehguhhtohhvrdguvghv X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 30 Aug 2023 20:27:31 -0400 (EDT) Content-Language: en-US In-Reply-To: <86h6og4k6m.fsf@mail.linkov.net> 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:268767 Archived-At: Version: 30.1 On 30/08/2023 19:35, Juri Linkov wrote: >>>> @@ -1637,7 +1637,9 @@ xref-find-definitions-at-mouse >>>> - (xref-find-definitions identifier) >>>> + (progn >>>> + (mouse-set-point event) >>>> + (xref-find-definitions identifier)) >>>> (user-error "No identifier here")))) >>> The problem with this solution is that when it doesn't find >>> the identifier then it leaves point at the wrong place. >> I'm not sure is a big problem, but we could save the original position and >> restore it in case of error too: > Thanks. I tend to agree with João that your initial version would be > sufficient to leave point at the position of right-clicking. > > Then the same change is also needed in xref-find-references-at-mouse > with mouse-set-point before xref-find-references. Very good, if you don't mind the side-effect too, I've pushed the fix for both functions to master. And closing. BTW, this context-menu-mode is looking pretty nifty. It'd be nice to turn it on by default someday.