From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: Xref/tags/lsp possible bug Date: Sat, 23 Apr 2022 15:52:18 +0300 Message-ID: <83v8v0nerh.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10334"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sat Apr 23 15:03:50 2022 Return-path: Envelope-to: geh-help-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 1niFQU-0002Zf-76 for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 23 Apr 2022 15:03:50 +0200 Original-Received: from localhost ([::1]:60490 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1niFQS-0001wg-3n for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 23 Apr 2022 09:03:49 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42668) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1niFFK-00073t-Ph for help-gnu-emacs@gnu.org; Sat, 23 Apr 2022 08:52:18 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:60020) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1niFFK-000589-Fo for help-gnu-emacs@gnu.org; Sat, 23 Apr 2022 08:52:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=NgmTo2PVfEZqIQbV9Xx5QV/MGnguv4FYzHZT+HCDS+Y=; b=a3rzwUSWdB/x PwO25W/h+LrEqdcRKCQPhFQb98eA1gdQg0xoV0j/Nhhkl6kBPDcV0CjXnBi3FO9g0nXNTkw1xbTj1 xXj7uQuB1RL+LEkPd0EDiR/W4oSoQh4HoB5S4uAjIDhFycJmYGq30pXmStorlC/3FPSmV9Pw159cd uZdZ7ToNXUzmjXJbUyIDKObSmzipsaSnSNwt1TcsdWapzvRrF4Hfw2EygJkWDBNWEI95bIW2GN3po Qti2m/inrNHRpkBVjUC/AqtkBc5OGEZPLMWndaoM0Ia/IPTsbHGocWfWTfn+Cb4yxXdFgXA/Dj1/J iSHGs/51mgDL67WmGH17Ew==; Original-Received: from [87.69.77.57] (port=1942 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1niFFJ-0001oP-VS for help-gnu-emacs@gnu.org; Sat, 23 Apr 2022 08:52:18 -0400 In-Reply-To: (message from Alessandro Bertulli on Sat, 23 Apr 2022 14:17:03 +0200) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:137000 Archived-At: > From: Alessandro Bertulli > Date: Sat, 23 Apr 2022 14:17:03 +0200 > > - First, when using LSP modes (both lsp-mode and eglot), the command > xref-find-definitions only acts on the symbol under point. I > explain: usually, in vanilla Emacs (emacs -q) if point is on a > whitespace/not on a symbol, invoking the command (bound to M-.) will > prompt you for an identifier to search for. However, when LSP is > active, it directly searches for an empty symbol, for example > reporting something similar to: "Symbol not found" (not the double > space, which makes me think it searches for a symbol named ""). As I > said, this happend both for lsp-mode and eglot, so maybe is a > problem of xref? > > - Second, and minor: while I was investigating, I noticed that, > depending on the loaded packages, when giving M-., xref sometimes > asks for the symbol to search, sometimes it asks the TAGS table > first. What package can be the problem? > > Do you think it is a bug of Emacs? Do you know a way to resolve? > Thanks to all! Every major mode needs to set up its Xref support. It sounds to me that what you experience are the differences in the major modes you use in each case.