From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?Q?Daniel_Mart=C3=ADn?= Newsgroups: gmane.emacs.devel Subject: Re: Consistency for xref-show-{xrefs,definitions}-function Date: Thu, 14 Jan 2021 22:04:38 +0100 Message-ID: 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="29706"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (darwin) Cc: emacs-devel@gnu.org To: Gabriel do Nascimento Ribeiro Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Jan 14 22:06:03 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 1l09oh-0007d0-Jd for ged-emacs-devel@m.gmane-mx.org; Thu, 14 Jan 2021 22:06:03 +0100 Original-Received: from localhost ([::1]:35502 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l09og-0001qz-KP for ged-emacs-devel@m.gmane-mx.org; Thu, 14 Jan 2021 16:06:02 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38900) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l09nW-00019I-Iv for emacs-devel@gnu.org; Thu, 14 Jan 2021 16:04:51 -0500 Original-Received: from sonic314-20.consmr.mail.ir2.yahoo.com ([77.238.177.146]:34695) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l09nS-0003fe-02 for emacs-devel@gnu.org; Thu, 14 Jan 2021 16:04:50 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.es; s=s2048; t=1610658281; bh=+1brlX9zTkzBpACZdvKOmZ6lI+ctkoZakH6XpyMxAgQ=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From:Subject:Reply-To; b=UarUG+dSQtm/1qp5UszgFSxiiBZ+zVozTmWNKxjl61emTVfAb5wxk3gmXC6mjFXSBNexuv3mU3xwqX8aG6iRZvwCjP3LbeMHM5EqauOi+w1hB1I5lgFP8KGOUnmDrUZku4+ng7KzUBQ5XWz0+ks419IRtjVodQRV3sToql6Ic5FnaztZ+ezeAGhC0+qD7bYkRa6GvTszsKhV0jL0dAuCrcnzXCzYcF2D4Lw6G5O/nKD3EWlRu+9UAvwfBnOlQUDQKst3FWBpAwnEiK2IygyrKaY0LqLK4+I/AfbbTaOro2JuFBsp4nOajdWSitTPVNgR7+5mjnFvPqmxp0M+oKh2rQ== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1610658281; bh=52YWssKTyfLJdP86FjSNoMJrvjPv6/R0/VhbYDNbA3v=; h=From:To:Subject:Date:From:Subject:Reply-To; b=mmn5ypPgB/F6XM7McJYbGB7ZJZiDUBEjFed8tyP3a5JL8Oi2q5AlOQyASNVPSWlgy7MEIW5ySHNxtt9rVgk5m9tiucfd3fBoKWqGL9JY3puny3YWZS6uHLmtINI2Y6kv2OPWgGGEXf7vZ76PRvSRFZTDKHej01nCMOPzizmVg5+0HDVk1aMwX/N7keSrh7PLf8Eo/sljOHAtsuVVlGQLKmFG+fw8irksfffjXL2xZPxePmnu5/lQI0WGTwBnY1iIIW55k26s0uzIy4t2uZsZ6NW4GMqh59mxgn0vM9Nk9Cv5cv9wjQ50j2qkuLXpytpOAr7+gtTVk7Qe4tIOQZI/CQ== X-YMail-OSG: AWALCRoVM1mmik_0qu3tNz1gFwMxqM2vqGTjfnU3VYuTG0Imto1D6KdrfsXo7Om ZGrwrZI3DHjIiUvoVjd9wt.PbXAAeOxd20PXUJJWtiagMJP8mASo9Pifj0Q_KVnSBMn69DJ_La3g K4.JdPikGhL4feJl5Feab4JSURInu98KiHu1UYG5JXAm7lv0Spw71oZ26fLTWHBNi_UetRdRgp7h AKpXVexWEfqVCAXaloPTvm0xgFJ4ujZfMY2xtUzJ5CYqL6rLBj_ZHCVBLBFoJ7Er5P9QJkpGnxkt yDc0xWuPIQqt8ayic2EVMJB7ZVHD97KSVQkQJsdbSs6cTWjO99LEZhrn6FUREx_CFQ7vQtDRFRs0 U8jGSdCJvDRPWLGcrysR7DAf0eXlXCOGvJ5mIyEaK3aworcalh5ld5tRbrIvcHaWmZGz6rDVacrq cjqwvAr.7zfodEqTt_wWwVnBvBzhcxNg7vI.RloZCHyqbAi.xegn1QJyHOU2RMCZ8q_QJEoYHCj3 36rmuy4P0RMlneTLYIXpBddvisgq1QO5HnQIL6Fb1R3q0tkAdfPZPIP8.CDGo8HdeeOKG0dxmP50 3tJI3EX1ixG97t9RwyjTv3i.ioT4mewLFTS.vTCTPA_FOFGJ_PiNPhShZC_WbW6bl0If9l.OF3vt W6OecqcbI2HjjaHUegt3.F8d0kOXKoo5PgzWMKRhaxjPOlAJCwrKsMp9v2TIQVZ2VcF5MwkHSNfm Upf9hnVn4ujK4ZQqWBiPY6Si0uhxBqRe2zHaeRsreB6c3sn3DozUZnDC.xmZqH0v_d436TtEn_.o bZ1mlgGf8SEwXni_qQ6qDWRSTza6JBiZ.cmC0OdZaG Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic314.consmr.mail.ir2.yahoo.com with HTTP; Thu, 14 Jan 2021 21:04:41 +0000 Original-Received: by smtp408.mail.ir2.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID 177f6d17fe5680d3399ac210d1238ee9; Thu, 14 Jan 2021 21:04:39 +0000 (UTC) In-Reply-To: (Gabriel do Nascimento Ribeiro's message of "Thu, 14 Jan 2021 17:27:27 -0300") X-Mailer: WebService/1.1.17501 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Apache-HttpAsyncClient/4.1.4 (Java/11.0.8) Received-SPF: pass client-ip=77.238.177.146; envelope-from=mardani29@yahoo.es; helo=sonic314-20.consmr.mail.ir2.yahoo.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 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_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-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:263058 Archived-At: Gabriel do Nascimento Ribeiro writes: > I noticed that the options 'xref-show-xrefs-function' and > 'xref-show-definitions-function' are not symmetrical. > > The defcustom for 'xref-show-xrefs-function' does not have type choices > as 'xref-show-definitions-function' has. Furthermore, it's quite strange > to configure it as follow: > > (setq xref-show-xrefs-function > 'xref-show-definitions-completing-read) > > I suggest to create similar functions for 'xref-show-xrefs-function', > which at this moment can be just aliases but can be independent > functions in the future, if necessary: > - xref-show-xrefs-buffer > - xref-show-xrefs-buffer-at-bottom > - xref-show-xrefs-completing-read > I agree with your viewpoint, but do we need that much complexity? IIUC, those functions mainly receive a list of xrefs and present them in a certain way. I'm not sure why we should have xref-show-xrefs-* and xref-show-definitions-* (even if they are aliases). I feel this duplication won't scale well (imagine if we add support for any other code relationship to xref). Could we have a single implementation for each presentation style? That would reduce confusion, and xref-show-xrefs-function and xref-show-definitions-function may have different defaults to provide the best possible UX for each operation.