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.devel Subject: Re: Xref Fallback Date: Mon, 10 Aug 2020 22:01:34 +0300 Message-ID: <6288a8d5-1891-7382-0404-422821f6a37f@yandex.ru> References: <874kpas9ze.fsf@posteo.net> 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="35909"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 To: "Philip K." , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Aug 10 21:02:26 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 1k5D3x-0009Dt-Tp for ged-emacs-devel@m.gmane-mx.org; Mon, 10 Aug 2020 21:02:25 +0200 Original-Received: from localhost ([::1]:58072 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k5D3w-0000Jr-W9 for ged-emacs-devel@m.gmane-mx.org; Mon, 10 Aug 2020 15:02:25 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42268) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k5D3I-0008JK-2a for emacs-devel@gnu.org; Mon, 10 Aug 2020 15:01:44 -0400 Original-Received: from mail-ed1-x52a.google.com ([2a00:1450:4864:20::52a]:40318) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k5D3C-000822-H7 for emacs-devel@gnu.org; Mon, 10 Aug 2020 15:01:40 -0400 Original-Received: by mail-ed1-x52a.google.com with SMTP id a14so7193682edx.7 for ; Mon, 10 Aug 2020 12:01:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=LZ6PsSdEsQ9zqRjR8eoxAava4LhBWjxOkA9Kwz1/jgc=; b=KMjUkXJBRa40GREHPLTADFtNx4iWhWKf/FaDY7O/nHmCcJs0BPy/RdH11MCn07CF8w b7M6cne0RDAUfVjMoHGRI+drSEbsgJI4j7LolS0AcgsCdi9X7CmHYcu/OIQZOzBfvBSU DhS0xNsMl5j+nqMf1YShFyQ0AeAOis0gkK31AcD0KGXzkMS0TnXqxAgtioGD2gGD5/IO jbiJ3Hzkly8HMJp67RL0fkhlRtdtv15CtSdnQkCazd1dbiTpXbk/K5bxFNjqkMKJqhmO XAENQtAx3ywKlU3sOEnTjVVdxhC6hOlWXimj33JlIryPc0JHEV2Tr9pPrrUZFeYaVnRt prsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=LZ6PsSdEsQ9zqRjR8eoxAava4LhBWjxOkA9Kwz1/jgc=; b=PoEQ4MvLT/4iVEicKUd0iNCurpg0uNLhDVz4qeYFbgvclHQkfYi39EQHmPVPnCcwNK uLMB2GqDZUHNJF9GThYCygxM9l9jjfnr7UEYYT4SHAyCoB8PeHV3IxUGuAALVFcjf0tn Z11jrqu27DRpWeGjAG6UERqcS3A+mOALJtlZXtm+Ad+1s73Nv0Frn1+R7GO3gY9H0Z54 3KbCRi0oECnDE43QQAlB8ZZ5NJS6EgEiAlOk5AvB2OL5mezJ5IubLPnAtlMD2m3eMp2K WltD7BmFWZk1yPCul2wnmMx08YKOEkH6jD94Jv3oYkkQAcKjKZ0f+kYmeixGYi1fRNbU zpwg== X-Gm-Message-State: AOAM531Jd7vCsPp7AdbugApJgoPm3uDKRJn3JF6bN5kxIOGJetYlmC6q 3X/ocXhilya9dz5TDLsPZGDOfMjf X-Google-Smtp-Source: ABdhPJzeV75f9d3LIKyaZCbJdJ97BMmZYmEpxqpgHYbSTbamOr0oRMYcJo7BGrDiYjUUJg6O2iyr4Q== X-Received: by 2002:aa7:d85a:: with SMTP id f26mr22549394eds.363.1597086096281; Mon, 10 Aug 2020 12:01:36 -0700 (PDT) Original-Received: from [192.168.0.3] ([66.205.73.129]) by smtp.googlemail.com with ESMTPSA id s4sm12730810edr.55.2020.08.10.12.01.35 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 10 Aug 2020 12:01:35 -0700 (PDT) In-Reply-To: <874kpas9ze.fsf@posteo.net> Content-Language: en-US Received-SPF: pass client-ip=2a00:1450:4864:20::52a; envelope-from=raaahh@gmail.com; helo=mail-ed1-x52a.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: 0 X-Spam_score: 0.0 X-Spam_bar: / X-Spam_report: (0.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=1, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action 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:253603 Archived-At: On 10.08.2020 20:10, Philip K. wrote: > 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. Some time ago Joao declared an intention to improve this (on the Eglot bug tracker), but that didn't have a follow-up. > 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). How would you feel about creating an xref backend that would implement the fallback logic? It would basically only do the combining, without having any navigation logic of its own. This way users could include it in the xref-backend-functions to enable fallback mechanics. The said combinator backend could also hardcode some particular backends to skip.