From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Newsgroups: gmane.emacs.devel Subject: Re: Adding support for xref jumping to headers/interfaces Date: Fri, 10 Mar 2023 22:18:33 +0000 Message-ID: References: <1587ddb6-f631-0890-965a-c7acb5729fa6@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13567"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Ergus , emacs-devel@gnu.org, John Yates , Helmut Eller To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Mar 10 23:19:21 2023 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 1pal57-0003Ly-5f for ged-emacs-devel@m.gmane-mx.org; Fri, 10 Mar 2023 23:19:21 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pal4c-0002u4-Ac; Fri, 10 Mar 2023 17:18:50 -0500 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 1pal4a-0002tu-JD for emacs-devel@gnu.org; Fri, 10 Mar 2023 17:18:48 -0500 Original-Received: from mail-ot1-x32b.google.com ([2607:f8b0:4864:20::32b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pal4Y-0005IK-8V for emacs-devel@gnu.org; Fri, 10 Mar 2023 17:18:48 -0500 Original-Received: by mail-ot1-x32b.google.com with SMTP id p13-20020a9d744d000000b0069438f0db7eso3757838otk.3 for ; Fri, 10 Mar 2023 14:18:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678486725; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=JdLkRDnEqbqfJFWUIvl3Itf5GK1/L/36AwMCORTcvyo=; b=RImaoIlutFDVoZbT1yC/76Bw9XeuDJptM2Mt4LskV6uee+0gvYfoPPCgTa+2BHVq/T bvvE1fQI0o3ovXDKAswEZIjE52O0e2lbkYrMWotm+h3d0OiPnIx33i0Xo1ra/eHvkLwe 5wCuTb6bMifBt4HRAho1r/p+qLCNQc0Yuj3d4kafpOlrFNr8RXefUKrtMrr8Wzfw8CuB R4s597QbcMHUkAbd+iPf8ySuloyAjwEqDwfbMG2O2gycBrzjrhlxZkYHdhF5cvYx9waC q585APup42cIRdr3oChzUFywGTGtC/ULL3aX5UhlCi4Zj8qHLUTspJp/IrdHwx26iELF R3Wg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678486725; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=JdLkRDnEqbqfJFWUIvl3Itf5GK1/L/36AwMCORTcvyo=; b=WxHoFSvTppEPLb82znSiaVMblXWOtuBRYgB04g2BnwQSor8ZV2anGaWKdLdrFdcto7 +0MopTK1UEf/KQx9VpKMtCmElE3fE4u22ylgLVROEu1EOsF+X1S8OJ+ZiQpHqjKGD7MM yzEI0LAvriV5Juf9QzMf4TeotzXS3neRPinTSThck+9FHIE/Qnx0uSvNzvXYNS6yajvG uodFAmuTzeDR6EoPF4zUysI0hCTAPDmqGEUvnIVDV2tZ6OGY0f4x4jQmdpj5aVVOYuLr IBcTsXfwZb+bSxZixwM3u8y9rcj3BvujY8ZRBOxFplD1+HCZIs3FDLABLtIjIz3d7/RC hoxg== X-Gm-Message-State: AO0yUKX9PU8JGC/R1/ZubxE4BU92es12yN4AYm4dN/AZ0JACVaelf1iR B3RY8bM8+1NNv5EMYOfiv4PPa/DwmO0tGD7lAXA= X-Google-Smtp-Source: AK7set8o447QELaTD+AQUfw9eTTtqmidqhMF2EDEeS1g31fDhqV9HrOq0ZI1kKefy00l0UK3EbeU/Z/zetilkTX13bA= X-Received: by 2002:a9d:6112:0:b0:68d:4b7f:e993 with SMTP id i18-20020a9d6112000000b0068d4b7fe993mr9770265otj.3.1678486724755; Fri, 10 Mar 2023 14:18:44 -0800 (PST) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::32b; envelope-from=joaotavora@gmail.com; helo=mail-ot1-x32b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:304261 Archived-At: On Fri, Mar 10, 2023 at 9:55=E2=80=AFPM Dmitry Gutov wro= te: > > On 10/03/2023 02:57, Ergus wrote: > > Ho Dmitry and Joao > > > > On March 6, 2023 3:09:40 PM GMT+01:00, Dmitry Gutov = wrote: > >> On 06/03/2023 01:40, John Yates wrote: > >>> For languages that do not distinguish declaration from definition, > >>> another alternative is to have both key bindings reference the same > >>> find-definition functionality. > > > > Yes please, just fall back to find-definition (or find-references) + a = warning when find-declaration or the the others are not supported? It is si= mpler and practical. > > Could you explain this usage scenario? Why not just report "unsupported" > and let the user try again with the simpler key binding (M-.)? > > It's not like people will prefer to reach for C-M-?, or will hit it by > accident. I haven't been following this discussion very closely for the last few days, but last I followed it, we were on the M-x xref-find-extra idea of Felici=C3=A1n. There -- at least as far as i understood - Dmitry's idea was to ask the xref backend what kind of syntactic constructs it supports finding, say via some xref-extra-constructs generic function. Eglot would have an answer for that, and so could other backends like etags, SLY, and any other backend presumably. Xref could then keep track of who supports what and the M-x xref-find-extra would ask those backends for those things that they support. I think this would be a pretty good idea to avoid the concept creep problem and still provide a nice user interface. So, unless we are talking about the case were absolutely 0 "extras" are supported in M-x xref-find-extra. I don't get the fallback idea nor the "unsupported" message idea. The problem would simply not exist. Jo=C3=A3o