From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] `completing-read`: Add `group-function` support to completion metadata Date: Mon, 26 Apr 2021 23:41:36 -0400 Message-ID: References: <39c93100-a352-538d-717a-663bcc5de296@yandex.ru> <23ebdd80-3ca2-4166-beab-e2535b6cc646@yandex.ru> <3a8d8d52-4b35-4a5a-aefc-db3e11d110e1@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33818"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Daniel Mendler , Gregory Heytings , "emacs-devel@gnu.org" To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Apr 27 05:49:14 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 1lbEio-0008gv-JZ for ged-emacs-devel@m.gmane-mx.org; Tue, 27 Apr 2021 05:49:14 +0200 Original-Received: from localhost ([::1]:59772 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lbEin-0007qG-Lk for ged-emacs-devel@m.gmane-mx.org; Mon, 26 Apr 2021 23:49:13 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47396) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lbEbZ-0006sa-Nt for emacs-devel@gnu.org; Mon, 26 Apr 2021 23:41:46 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:24974) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lbEbU-0006kx-Uy for emacs-devel@gnu.org; Mon, 26 Apr 2021 23:41:45 -0400 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 5328380342; Mon, 26 Apr 2021 23:41:39 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 9F5C580263; Mon, 26 Apr 2021 23:41:37 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1619494897; bh=0UoHLa6+NlYsq/rhDKO1xIAlmbziJlcpXertaG7JDcg=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=IOmJzdQ6lbw/Za2eiG0S0s1a1ocnQlUbC8ZpABzWtLO09a2b4z6S2lo+DBtBj2PKm pmqi2kza5uQUPsSR9BIxoOc/6frJW7EYFC7I+NL8rDONeqisPlzZGu6eI64T1I/t4v XmaKiG4ZqzuvAh4eqH0iBPtDT6kF3pJZgcBnqxAhFzcQC1NHX1al6wjSU3txf43B+1 6yoCe2vftXOILMuNGKj4sq8FtVz5qEYIj5M581rACEEFNYxaltSu4SRct6bToSsz87 SzpqZSLm4h6ZFfxDmyvQ7NFPQvRWNDmVv/8yTArkW15sEK2crlLis2IbIAb/QX3yyb VaOr9N0vVU2vw== Original-Received: from alfajor (unknown [157.52.10.47]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 6085312034D; Mon, 26 Apr 2021 23:41:37 -0400 (EDT) In-Reply-To: <3a8d8d52-4b35-4a5a-aefc-db3e11d110e1@yandex.ru> (Dmitry Gutov's message of "Tue, 27 Apr 2021 04:46:34 +0300") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, 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:268514 Archived-At: >>> So it's better if at least icomplete-mode is enabled, preferably with an >>> option which shows the completions right away with no input. And the >>> vertical style should be even better. >> Maybe we could accommodate this in the default UI by adding an option to >> eagerly popup the *Completions* buffer (and keep it updated as long as >> it's displayed) and to keep it disabled by default but make it possible >> to enable it via completion-category-(overrides|defaults). > I don't know if it's enough. And I have my doubts (expressed previously > already) about a *Completions* buffer that is impossible to dismiss: it > might hide a window showing a buffer you care about. I haven't looked at it closely, but I assume it shouldn't be too hard to tweak the current code such that we can refrain from popping down the *Completions* automatically, while still allowing the user to pop it down. > Ultimately, it can be a good change/feature, but it should be championed by > somebody actually willing to use the resulting UI on a regular basis. Of course. > My ideal UI would probably be more like this: > https://emacs-lsp.github.io/lsp-ui/images/lsp-xref.gif (though perhaps with > a slightly different layout). Meaning, a posframe popup showing the list of > all locations, vertically, and a preview popup by its side or below it, > displaying the current selected location. I was thinking only of tweaking the existing UI to better support the case of "selection" compared to "completion". What you suggest here is nice and it goes much further but I don't think the two are competing. If anything they work together: the idea behind my tweak would be to let more callers of `completing-read` presume a "selection" kind of UI (without having to impose a non-default UI), which in turn will make it more often useful/beneficial to use a UI like the one you propose. Stefan