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: Mon, 27 Nov 2023 17:46:07 +0000 Message-ID: References: <87il697r5g.fsf@catern.com> <87r0kw8nxu.fsf@catern.com> <3fe5a8cd-b355-d7eb-10ad-8846aef3387b@gutov.dev> <869c25b8-4c99-fb35-cd8c-b1a8a6256e04@gutov.dev> <680b567e-4a2e-d2d5-a2f4-423584a60a53@gutov.dev> 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="26924"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Spencer Baugh , emacs-devel@gnu.org, Eshel Yaron , John Yates , Ergus , =?UTF-8?B?RmVsaWNpw6FuIE7DqW1ldGg=?= , Filipp Gunbin To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Nov 27 18:46:56 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 1r7fhA-0006k7-0o for ged-emacs-devel@m.gmane-mx.org; Mon, 27 Nov 2023 18:46:56 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r7fgf-0007wI-5G; Mon, 27 Nov 2023 12:46:25 -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 1r7fgd-0007w0-RX for emacs-devel@gnu.org; Mon, 27 Nov 2023 12:46:23 -0500 Original-Received: from mail-lf1-x132.google.com ([2a00:1450:4864:20::132]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r7fgc-0003NJ-0Z for emacs-devel@gnu.org; Mon, 27 Nov 2023 12:46:23 -0500 Original-Received: by mail-lf1-x132.google.com with SMTP id 2adb3069b0e04-50aab0ca90aso6508474e87.0 for ; Mon, 27 Nov 2023 09:46:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701107180; x=1701711980; darn=gnu.org; 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=Jt9xBuscrs+1rlyqLe0OO867bVwFdly6dcR5K3gbJf0=; b=lFxZKmadJwns1Y79DiZLV1Y4GV/Zdsv/zZTxLlgHXzfjNuemwZgx9hn9zkuGwT0L9f 1X0aYrYSfIjCmmYS6H9iVlh3wadLMwfEvlvVwvejeWKbv6HuDrZg4vcCnd3tKaVTNgGv gU09joq3gwUxeZCq6s4WOudpaHfqtj/FEpuePCQL1urzJRB1ELsoIYBSGDOyjbuyiDXI cya8Px8E1dCFPDk1gIk5KliL0zeJCR6jknvW/cuK1izhLCzvy17PZ0CDcqcLbNO8aD83 VPtZjh30hK6hTgc9vmQ+aziAjttI7V096yhtU3u9Y/KonOvP57jcNg/nJEKJH0CTDZo3 Z9mg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701107180; x=1701711980; 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=Jt9xBuscrs+1rlyqLe0OO867bVwFdly6dcR5K3gbJf0=; b=NbeLF+8Q3gk+89yRpvdjusikkJoj7273jyTOzKBzUlOIP6o2RGMv+9J5dH9B4ZgvB8 6VGrZ6VzwHr5/sA0byoZYI7Mff/kqxqTAyfQd3wD8nGRDQGca2DjTa7aulsmw33eOa7H pDmDnCZUnf7+biPPKTXw4U9e8FrCpYiVnsffUPS6RWI1KGHnBl33rKkDrLLLKzYwk9vQ uH9CHVzQKmxkusU1ryNNjSZBdO5oho6tL2Yfdoa6eD2x103GjKu5HkBWz9TFPqxnCu1Y gvxvg/KbCegapj3NnHuO13vlE4CX3bIC7kN4mmKF5x939SV186k2xwI+YKLw4vCUoEbH yjHA== X-Gm-Message-State: AOJu0YzR98i5Jiu22iy4OWAGW9Lu03Me0qqCCisCZf9F8TCMAqeLZllP CRB5oVLHCFrmPqVKzHNuIKKVrewQI0IKezCyc9Dz+1XFhLA= X-Google-Smtp-Source: AGHT+IFkyT+yzQgrEWGLIjDJqgCzK+Qm9juGzBa1tG8vvT+0o+A2Td5Yc/sTSeL65VU1YxWFBB4bd99j4DveuXR8L0E= X-Received: by 2002:a05:6512:3990:b0:507:a8cd:6c90 with SMTP id j16-20020a056512399000b00507a8cd6c90mr11135758lfu.51.1701107179859; Mon, 27 Nov 2023 09:46:19 -0800 (PST) In-Reply-To: <680b567e-4a2e-d2d5-a2f4-423584a60a53@gutov.dev> Received-SPF: pass client-ip=2a00:1450:4864:20::132; envelope-from=joaotavora@gmail.com; helo=mail-lf1-x132.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, T_SCC_BODY_TEXT_LINE=-0.01 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:313292 Archived-At: On Mon, Nov 27, 2023 at 5:22=E2=80=AFPM Dmitry Gutov wro= te: > > On 27/11/2023 18:27, Jo=C3=A3o T=C3=A1vora wrote: > > On Mon, Nov 27, 2023 at 4:04=E2=80=AFPM Dmitry Gutov = wrote: > > > >> Why don't you read up on the difference between > >> xref-show-definitions-function and xref-show-xrefs-function. Those are > >> not implementation details but something that affects user experience. > >> And users can customize one or the other, which correspondingly affect= s > >> dispatches which go through one or the other. > > > > First, who does that? I thought you were concerned about > > the OOtB experience for non-powerusers. > > It doesn't take a power user to use the Customize interface to set > xref-show-definitions-function to xref-show-definitions-completing-read. > > Who uses that? I do, for example. And the people who asked for it (see > https://lists.gnu.org/archive/html/emacs-devel/2020-11/msg00824.html). > There are also third-party packages which provide alternative UIs > through these options (e.g. ivy-xref and helm-xref). > > > Secondly, if something called > > "definitions" is used for things that are patently not "definitions" > > that thing is incorrectly named, period. It's not because that editor > > thing was misnamed by its creator that magically my C++ declaration is > > now a definition, too. > > It's about "set of things where I usually want to pick only one and jump > to it" versus "set of things which I usually want to see the full list > of, which stays around". > > You can say that "definition" is perhaps not an ideal term for the > former. But the distinction is useful, and if you have better naming > suggestions, go ahead. > > Until now the only built-in commands which went through that dispatcher > were the variations of xref-find-definitions, so the name wasn't a proble= m. This whole thing started because you used that misnaming of existing things as a justification for misnaming new things. > > No, not pointless at all. My main use case for this is to > > first invoke the command on a given place of interest and _then_ > > ask myself what I want to see of that symbol. "All references", > > "definitions", "declarations"? > > The combined view, as implemented in the current > xref-find-all-definitions by default, will then just show references. Not necessarily, it depends on the backend's. But yes, it might. But I presume they will be categorized by kind. > Why would you want to also be able to reach "references" through that > interface anyway? Why not? To avoid the noise of that categorization. To get to some reference type not explicitly covered in those other categories. > Like I said, they are not "extra" because they will on most cases > include the kinds already shown by xref-find-definitions. I'm open to > other names, but please keep the intended semantics in mind (see above). How bout "cross-reference", or simply xref? There's a reason why your xref= .el which you maintain inherited that name from SLIME by whoever ported the UI (Helmut it was, IIRC);-) There's a lot of wisdom in that name. xref-backend-extra-kinds -> xref-backend-xref-kinds OR xref-backend-xref-cross-reference-kinds xref-backend-extra-defs -> xref-backend-xref-defs OR xref-backend-cross-reference-defs OR xref-backend-xrefs (this method literally returns xrefs) xref-find-extra -> xref-find-all (more people suggested this, I think) xref-find xref xref-find-combined xref-find-by-kind > > What exactly is compromised by that patch? And do you not agree > > it is minimally useful? You wrote the thing! Noone forced you to. > > I voiced my doubts in the very first message that patch was attached to. > And that it's experimental. It's also like 20 lines total. Let's keep a > perspective. Yes! a simple workable patch that someone else liked, spent time on, worked on, solves real-world problems, and doesn't lock us in anything. "Doesn't come with keybindings! Blasphemy! Let's bikeshed, make it very complicated!" Jo=C3=A3o