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: Re: Poll: Change xref-show-definitions-function's default? Date: Mon, 04 Jan 2021 15:21:31 +0100 Message-ID: <87o8i4ok9g.fsf@posteo.net> References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22793"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Jan 04 15:22:11 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 1kwQkN-0005nk-F6 for ged-emacs-devel@m.gmane-mx.org; Mon, 04 Jan 2021 15:22:11 +0100 Original-Received: from localhost ([::1]:57968 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kwQkM-0001xB-Hx for ged-emacs-devel@m.gmane-mx.org; Mon, 04 Jan 2021 09:22:10 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42146) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kwQjr-0001YQ-0V for emacs-devel@gnu.org; Mon, 04 Jan 2021 09:21:39 -0500 Original-Received: from mout01.posteo.de ([185.67.36.65]:60776) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kwQjn-0005j8-SW for emacs-devel@gnu.org; Mon, 04 Jan 2021 09:21:38 -0500 Original-Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id D65B0160062 for ; Mon, 4 Jan 2021 15:21:32 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1609770092; bh=Lug7IzkIFWcDu3fTgvB4q1QHTlXsPxv9GX6qaJ4/eio=; h=From:To:Cc:Subject:Date:From; b=iM1MMCA06vIowH2i+C0W3nJwoRJR/wIWILZ1uuoyOfB3VsRspjhffRemMTD/E8Mdr RmsclbHcYIPMjok1ufO928dw/QjO+w7Zg+CkUdtGsGq5j1Pc1oUXxDdbw1FCGCb56Z CmgKpA/dFn75+wswSqgD+Oakc/VQbWSg/ON4p0YXhZaXihqSQcQuTpTEWkCdC4suKS RtHIfs/uQL57rcm785ZYl3paafrqm9zMUPRUV2oClGd5r2bN20mFP9sXWjZm759+ne 0F6jVD1d/vvfwcDRdmak9/c5nXFbs7mPiVMeUZQe+jfncifW7xsH0OtBKgeuxdWDQR j/48saPD+D17A== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4D8d980qrFz9rxS; Mon, 4 Jan 2021 15:21:31 +0100 (CET) In-Reply-To: (message from Dmitry Gutov on Mon, 4 Jan 2021 14:22:19 +0200) Received-SPF: pass client-ip=185.67.36.65; envelope-from=philipk@posteo.net; helo=mout01.posteo.de 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_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, 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.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:262425 Archived-At: Dmitry Gutov writes: > On 04.01.2021 14:12, Philip K. wrote: >> Another idea, might be to have a "silent" option, that doesn't display >> the buffer by default, but leaves a message that there are more results. > > What happens next, then? How will the user get to any of those results? 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". I haven't looked into next-error/previous-error, so it might be that this isn't feasible, without rewriting a lot of code. It goes without saying that this should not be the default option. -- Philip K.