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#65631: Xref updates stack in case of error Date: Fri, 1 Sep 2023 04:39:34 +0300 Message-ID: References: <864jkg4h0i.fsf@mail.linkov.net> <83r0nkfos1.fsf@gnu.org> <86leds30yw.fsf@mail.linkov.net> <86jztb2qkc.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="27925"; 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: 65631-done@debbugs.gnu.org, Eli Zaretskii To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Sep 01 03:40:14 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 1qbt8t-0006wZ-ML for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 01 Sep 2023 03:40:12 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qbt8e-0006zb-HF; Thu, 31 Aug 2023 21:39:58 -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 1qbt8c-0006z8-DQ for bug-gnu-emacs@gnu.org; Thu, 31 Aug 2023 21:39:54 -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 1qbt8c-0001LA-5b for bug-gnu-emacs@gnu.org; Thu, 31 Aug 2023 21:39:54 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qbt8k-0001xC-IP for bug-gnu-emacs@gnu.org; Thu, 31 Aug 2023 21:40:02 -0400 Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Fri, 01 Sep 2023 01:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 65631 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Mail-Followup-To: 65631@debbugs.gnu.org, dmitry@gutov.dev, juri@linkov.net Original-Received: via spool by 65631-done@debbugs.gnu.org id=D65631.16935323957487 (code D ref 65631); Fri, 01 Sep 2023 01:40:02 +0000 Original-Received: (at 65631-done) by debbugs.gnu.org; 1 Sep 2023 01:39:55 +0000 Original-Received: from localhost ([127.0.0.1]:59510 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qbt8d-0001wh-1d for submit@debbugs.gnu.org; Thu, 31 Aug 2023 21:39:55 -0400 Original-Received: from wout5-smtp.messagingengine.com ([64.147.123.21]:57037) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qbt8a-0001wU-RL for 65631-done@debbugs.gnu.org; Thu, 31 Aug 2023 21:39:53 -0400 Original-Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id B0423320091D; Thu, 31 Aug 2023 21:39:37 -0400 (EDT) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Thu, 31 Aug 2023 21:39:38 -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= 1693532377; x=1693618777; bh=f7DbSs3vhjd+BcBAayzP33A9EwwuNmuMcsq YZczFPxA=; b=QOen7xe2uFkIxcoj8st1EMgwrP6MH3vtBSJdt6EawoYIFnxUSbg xy/qr/56ggDvw/npsVui++cQiOviufCvjsv+hMdQo3MKQxuqjlr6A8gsWc5WWdrk bh2JB8cpHftjKp3PoeLY6prVk4hDogyjar+2E9mZXQx17gknU6+TG4iXwSQYQAdx 7x7CGJ7NZZFBpbIGIKX1bGNcS1ZHz3Qqu4d9hdLFH76APZT084mI0WqB28BncXxC RAEjO6wq2kBkn0fOxc1l8259XNn+ixPaalW2OFj6VG7/lTX3VJAQplMiaSIQn6N5 WYEeAFBZ8QtqR9M+uA1yfeSS2Hd5cipwGaw== 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= 1693532377; x=1693618777; bh=f7DbSs3vhjd+BcBAayzP33A9EwwuNmuMcsq YZczFPxA=; b=SMzJDs1/B9x01nJvEo3b4H8ic3hTzSHineeMP4d1hzBlmEZUIjJ Km1nItWdTmkTSd5s0LmeNtpntbCqQ6eEgjQrX5DwODjx6icnba7EkNLXl/EAc+6P wkDaJxShJumXQgCEnMe1RvTNxnNPE1bGUHUlCCBCyN9Yw5ms7Yyq3eELVY2fvY1t y37ckiiPZfQHE6zBiROncR7eIgpC7ChTEj90LFQ41G0BsZCf6k9vdifLk/LoXlLs 6lUId4d41HeU2BA+Kzo3gzOqcqH67dRBSs30H+tD5H8veHlYkUNcqJcMVZuFIJpZ eeAQtcSSbQV5XW7tZIz5Vkt3YYW1znyd7+Q== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrudeguddggeelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtkeertddtfeejnecuhfhrohhmpeffmhhi thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth htvghrnhephfffheeljeffgeffueeghfekkedtfffgheejvdegjeettdduheeufffggfef jeehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug hmihhtrhihsehguhhtohhvrdguvghv X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 31 Aug 2023 21:39:35 -0400 (EDT) Content-Language: en-US In-Reply-To: <86jztb2qkc.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:268859 Archived-At: Version: 30.1 On 31/08/2023 19:33, Juri Linkov wrote: >>>>> 1. move point to any word >>>>> 2. type 'M-.' (xref-find-definitions) >>>>> 3. an error is displayed correctly "No definitions found for: This" >>>>> >>>>> But the problem is that an unrecognized word is added to the xref stack. >>>>> So the context menu shows "Go Back", and 'M-,' (xref-go-back) goes back >>>>> to that word. >>>> FWIW, I'm not sure this is necessarily a bug. It looks like a bug in >>>> your case, because you deliberately tricked Xref into using a word >>>> that is definitely not a program symbol. But that is not the case in >>>> a more reasonable situation, where point is on a symbol, but for some >>>> reason the symbol's definition is not found, e.g., because the TAGS >>>> table needs to be regenerated. >>> In case of error, point doesn't move. So there is no need to go back. >> >> At this point, I was kind of feeling that this is a known-but-tolerated >> behavior (that some might already be relying on, also known as "spacebar >> heater" effect), but if it's still annoying, let's see about a fix. > > It's not annoying, just surprises with the requirement to type extra ‘M-,’. > >> How's the attached patch? > > Thanks. I expected a smaller change, but if this is still reliable, > then why not. At least, it works in cases that I tested. I was looking for a smaller change, too. Thanks for testing. Pushed to master in 17188e07ab9, closing.