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: Poll: Change xref-show-definitions-function's default? Date: Mon, 4 Jan 2021 18:14:49 +0200 Message-ID: References: <87o8i4ok9g.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="10023"; 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 Cc: emacs-devel@gnu.org To: "Philip K." Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Jan 04 17:16:40 2021 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 1kwSXA-0002Ui-5F for ged-emacs-devel@m.gmane-mx.org; Mon, 04 Jan 2021 17:16:40 +0100 Original-Received: from localhost ([::1]:48244 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kwSX8-0003xj-Ur for ged-emacs-devel@m.gmane-mx.org; Mon, 04 Jan 2021 11:16:38 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41674) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kwSVU-0003Hd-Ls for emacs-devel@gnu.org; Mon, 04 Jan 2021 11:14:56 -0500 Original-Received: from mail-ed1-x536.google.com ([2a00:1450:4864:20::536]:45264) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kwSVS-0001D8-QC for emacs-devel@gnu.org; Mon, 04 Jan 2021 11:14:56 -0500 Original-Received: by mail-ed1-x536.google.com with SMTP id r5so27861572eda.12 for ; Mon, 04 Jan 2021 08:14:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=EJOo3qDoUUERoIp2qyPe9rFeBfIz6I1Rkzp9QF9E3aM=; b=uO5VVKMWNYe/r0F5/Ar7LWhj4Fs/3HTayVYDKMlUABYw2wZ3XgioH2uNzj+42BizK2 X+NShuKnChbir6/rxp7qX4V08sX/mCxwcPSTdhL5mcR3c0CporREGLxkSx8V7fSmPjqh S/fAAVj3rIY0Cg1WP2XbsSylUBP36G2MzWUG4WKsY0AMeOj3Rjf4bX2E3rhZKVfwqrbg wPlb/upErpiODO8ycwBL7/HBvwehnZdOKo5NtqIdjs9+v08vhao5QXngx3o1gbrN/Ib/ gpRc44ICOq0bGZ/XZg5p5NAreAWkA9mQIJfa78s66WQre5o/RCEpStmUVsC18S5aLusa G2TQ== 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:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=EJOo3qDoUUERoIp2qyPe9rFeBfIz6I1Rkzp9QF9E3aM=; b=NQPDLJzJ30K3kkCNyaZ8ZqtI9XdAkCqzTngwDiYBOr2aR90QJSN652kqBXnk5gPpOh Hwgy2w5WKOxytxChKuQsqnp3FXWlLH/G6+KAdkHQsXecntv+eGBTB8QCdM+6XS2zoI/Y l6bT723rCm0UClrywNUCXqirtVN8BY717RaZAmUSuqClnduKDqKuizGLO32ZsTPCFFL4 +CFcn1UrT5cMY8UIYFQkGyRVSmfISqjA0O597Hma0RwVN9kfDxdMHDqFZTZJnYBRMmf+ f4cVBtCAn4KpsQjWjqd9BzINEuY/qgmag66zEmZUw42gzr0wpQBf2B1ScL7E4H60KFGN ZgeA== X-Gm-Message-State: AOAM532VcdYFlnOWXM89Ugp1I7ptw70owuusGpxQgx5v+ScPt4Zg9AuB 1XW9ebCgO8+Gy3a/SfXJGOugXpl4yX8sQA== X-Google-Smtp-Source: ABdhPJxjQ1S2WKzFKctjAZQczooSZC0wLUMTn67k6byEXY6dHmpIpH/eEnrk1sFWaNry18hEGncGiA== X-Received: by 2002:a50:ed17:: with SMTP id j23mr71432317eds.218.1609776893211; Mon, 04 Jan 2021 08:14:53 -0800 (PST) Original-Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id t16sm16654126eje.109.2021.01.04.08.14.51 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 04 Jan 2021 08:14:52 -0800 (PST) In-Reply-To: <87o8i4ok9g.fsf@posteo.net> Content-Language: en-US Received-SPF: pass client-ip=2a00:1450:4864:20::536; envelope-from=raaahh@gmail.com; helo=mail-ed1-x536.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.248, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.248, NICE_REPLY_A=-0.001, 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:262440 Archived-At: On 04.01.2021 16:21, Philip K. wrote: > The idea would be that the interaction would look something like this: > > 1. The user invokes xref-find-definitions. > 2. Instead of presenting the solutions, it jumps to the first one, and > if there are more, this is indicated in the minibuffer. > 3. Other matches can be displayed using next-error/previous-error > 4. At this point, the buffer could be opened, or one could stick to the > minibuffer and generate a message like "showing definition N out of > M". It's a good plan, but the devil is in the details. > I haven't looked into next-error/previous-error, so it might be that > this isn't feasible, without rewriting a lot of code. next-error/previous-error might be a bit unreliable when there are other next-error-capable buffers around. And especially when the user has customized next-error-find-buffer-function. Anyway, you can try and see. Also re. 4, if the buffer is not needed, you could probably use the fileloop package. It might need to be updated to behave "lazily", however. > It goes without saying that this should not be the default option. If you want to work on such patch for the optional behavior, I'd be happy to review it.