From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Philip K." Newsgroups: gmane.emacs.devel Subject: Xref Fallback Date: Mon, 10 Aug 2020 19:10:13 +0200 Message-ID: <874kpas9ze.fsf@posteo.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35846"; mail-complaints-to="usenet@ciao.gmane.io" To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Aug 10 20:25:45 2020 Return-path: Envelope-to: ged-emacs-devel@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 1k5CUT-0009CU-Fz for ged-emacs-devel@m.gmane-mx.org; Mon, 10 Aug 2020 20:25:45 +0200 Original-Received: from localhost ([::1]:47164 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k5CUS-0007qn-ES for ged-emacs-devel@m.gmane-mx.org; Mon, 10 Aug 2020 14:25:44 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45676) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k5BJX-0007bj-5q for emacs-devel@gnu.org; Mon, 10 Aug 2020 13:10:23 -0400 Original-Received: from mout02.posteo.de ([185.67.36.66]:58813) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k5BJU-0002pD-1J for emacs-devel@gnu.org; Mon, 10 Aug 2020 13:10:22 -0400 Original-Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id E061A2400FD for ; Mon, 10 Aug 2020 19:10:15 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1597079415; bh=+OV9iGcFv7mouBwbJAPzE5HfOYdRFJyZNiJxMqudQLA=; h=From:To:Subject:Date:From; b=XcKEaneDpdpwKD2QEb/kzIwJpmMl1erDdF2h+jz2dSd+2Z6CqMq0kI/I5sYflGlii eOvPygY+NPqwIDXIkXU9u+/sLgGbLHAPyNHs+RmmazGAQo8IBYghl+W5k6HuLaKRP1 z4kpumTR/pHQRiKp1N3bSoaHIEsrAnajAnbSTMK8X1bWETCsnQVDOYFPHALtnqS2Zw MzTTmD8pE9P15ybTecaACb/zh4K5XHxdyV8QG+uZudU4K11qI7Ch1cnx3WUXj4aoXx 5kyGPY5dUm8RhFRPb6scjHlGBQT1ojxnu+chPRHA6FODCEBwyaNaq9dB1oWi2OEPDb hHpiF4a20UEzQ== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4BQMsg3MQkz9rxS for ; Mon, 10 Aug 2020 19:10:15 +0200 (CEST) Received-SPF: pass client-ip=185.67.36.66; envelope-from=philipk@posteo.net; helo=mout02.posteo.de X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/10 13:10:16 X-ACL-Warn: Detected OS = Linux 3.11 and newer X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Mon, 10 Aug 2020 14:24:50 -0400 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:253602 Archived-At: Hi, a few weeks ago, I managed to port "dumb-jump"[0] to use Xref instead of it's own custom interface[1]. Part of the transition was to deprecate the old commands[2], that has lead to some complaints among "lsp-mode"[3] users, because lsp-mode doesn't fall back on dumb-jump if it has no results[4]. Part of the issue is that LSP's Xref activation function just returns "'xref-lsp", the symbol that is specializes it's xref methods on, without any checking -- which is fairly common from what I see. But if that fails, Xref won't go on searching, even though the next backend could have more to offer. Before writing this message, I was fairly sure that there were some discussions on this issue, but I couldn't find them in the archives anymore, so just to be safe, I re-iterated the problem. What I would want to know, is if there have been discussion on this issue, what the status is, and if not what would have to be done. I can imagine, that falling back onto the next backend isn't always desirable (especially if etags is next, and it demands a TAGS file that doesn't exist). [0] For those unfamiliar, dumb-jump is a package for finding places where functions or variables are defined, but without any permanent external tools such as etags or indexing servers, but by using grep or grep-like tools and a search-database (https://github.com/jacktasia/dumb-jump). [1] https://github.com/jacktasia/dumb-jump/pull/343 [2] https://github.com/jacktasia/dumb-jump/pull/349 [3] https://github.com/emacs-lsp/lsp-mode/ [4] https://github.com/jacktasia/dumb-jump/issues/353#issuecomment-671462247 [5] https://github.com/emacs-lsp/lsp-mode/blob/00fcee92ae2e57055fdb31d25741b9637fe96215/lsp-mode.el#L6174