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#71068: 30.0.50; Incorrect xref positions for eglot-execute Date: Mon, 3 Jun 2024 14:27:42 +0300 Message-ID: <541c1ea5-64b9-4fdc-a337-b7f1ac3934a6@gutov.dev> References: <57e38600-785a-4a12-b69a-001e2e3e3977@gutov.dev> <508511e2-f964-420d-a453-b098303c5def@gutov.dev> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30238"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: 71068@debbugs.gnu.org To: Eshel Yaron Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jun 03 13:37:25 2024 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 1sE60A-0007b8-EA for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 03 Jun 2024 13:37:22 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sE5zf-000586-Uj; Mon, 03 Jun 2024 07:36:51 -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 1sE5zd-00056n-Ts for bug-gnu-emacs@gnu.org; Mon, 03 Jun 2024 07:36:50 -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 1sE5zd-0002iR-Lu for bug-gnu-emacs@gnu.org; Mon, 03 Jun 2024 07:36:49 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sE5zq-00049S-CL for bug-gnu-emacs@gnu.org; Mon, 03 Jun 2024 07:37:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 03 Jun 2024 11:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71068 X-GNU-PR-Package: emacs Original-Received: via spool by 71068-submit@debbugs.gnu.org id=B71068.171741458415841 (code B ref 71068); Mon, 03 Jun 2024 11:37:02 +0000 Original-Received: (at 71068) by debbugs.gnu.org; 3 Jun 2024 11:36:24 +0000 Original-Received: from localhost ([127.0.0.1]:60349 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sE5zE-00047P-Ey for submit@debbugs.gnu.org; Mon, 03 Jun 2024 07:36:24 -0400 Original-Received: from wfout5-smtp.messagingengine.com ([64.147.123.148]:50601) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sE5zD-00046r-6H for 71068@debbugs.gnu.org; Mon, 03 Jun 2024 07:36:23 -0400 Original-Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailfout.west.internal (Postfix) with ESMTP id 795F11C000AE; Mon, 3 Jun 2024 07:27:45 -0400 (EDT) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Mon, 03 Jun 2024 07:27:45 -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:subject:subject:to:to; s=fm3; t=1717414065; x=1717500465; bh=oElZXDsWa2coVm2hzJPBswxek3/pS9c7ulMwSv10NTc=; b= HkLxPgVVC2WCJNjb1DWbPMYmMmIJDwcE3bbY9Lx7L9QvrhhTuvNfHGAnBZ/mSrnj 6T6wjlAFWGdciJlLeha4qCB3JrFI/DI/OkHYaw9Nh8MEj3fLULUs54ses4G4nW2v GeacGn/eV34OHgOz9r1XjY1TVfbsH9qiahiY6/A2CobXixZPJKJBOoIJmRPnoqpT D3mAmk/eLVM5w+AVNlKxi4qPYdm/QEja5yYGkrZEh9zchbG+eUpFR8M2xObeH7yc W7tDpxXtsnauPN5q7a+zuPDmSe6fS5auSJDJ4HwN/t5STYxVT5biFcKmHqMuvvHp zD9GVuYru3lAqSCXGiKybw== 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:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1717414065; x= 1717500465; bh=oElZXDsWa2coVm2hzJPBswxek3/pS9c7ulMwSv10NTc=; b=H ddusULiUXCAwCc5GJJIQfB1ekfhq1X2HCQKweN9nfiVrk4LyPIVx5sZxAezHdtd8 ucsJsaQ3LsQzj2dYqklMGSeknaX63KFKVJLRJ+QOOZHupcrxv0TNW/cObevqbLOa CrfOFybGF/jl6dccsfuhfvTymInBKAUADdkZytSKLPwYIRT+TGgkDV9DR+tgA3iA jY/HemTjD1YejbutsNu/FX7+XabSQd6EarKqve4WANeFk2XJ6TVuu2FMQTJqzpNA RP2axJBkoYkEW0Z2qjAMr1by6eisl3k1XUj3j741QznGRJU/kBQ6t49qSmA8QWKV 41voMEvJWKaWrWHMpFKjA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvdelvddggedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefkffggfgfuvfevfhfhjggtgfesth ejredttddvjeenucfhrhhomhepffhmihhtrhihucfiuhhtohhvuceoughmihhtrhihsehg uhhtohhvrdguvghvqeenucggtffrrghtthgvrhhnpeetudeljeegheetgfehgeejkeeuhe dvveeikeeufedtvddtveefhfdvveegudejheenucevlhhushhtvghrufhiiigvpedtnecu rfgrrhgrmhepmhgrihhlfhhrohhmpegumhhithhrhiesghhuthhovhdruggvvh X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 3 Jun 2024 07:27:44 -0400 (EDT) Content-Language: en-US In-Reply-To: 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:286430 Archived-At: On 03/06/2024 08:47, Eshel Yaron wrote: > Hi Dmitry, > > Dmitry Gutov writes: > >> On 26/05/2024 11:00, Eshel Yaron wrote: >>> + (or (and (re-search-forward (format cl--generic-find-defgeneric-regexp name) >>> + nil t) >>> + (or (funcall search ":method[ \t\n]+" >>> + (save-excursion (end-of-defun) (point))) >>> + (not (goto-char (point-min))))) >>> + (funcall search base-re) >> >> Should the second clause also be wrapped in some save-excursion or similar? > > Do you mean the (funcall search base-re) part? If so, then no, it > doesn't need save-excursion because it just calls re-search-forward, > which doesn't move point when the search fails. Fair point. >> And I'd probably change the order (looking for the variations on >> defmethod first), but that's not too important. > > Actually I think neither order is quite correct for all cases, because the > regex we construct is currently too lax: if we're searching for a method > definition with no specializers, it also matches definitions with > specializers. So ISTM that this needs some more work to get right. > If no one beats me to it, I'll look into it when I have some time. Thanks.