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: Tue, 27 Apr 2021 23:21:37 -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> <47b502ea-cb89-7aad-6519-ff6e84180929@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="11035"; 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 Wed Apr 28 05:22:16 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 1lbamG-0002lL-Lj for ged-emacs-devel@m.gmane-mx.org; Wed, 28 Apr 2021 05:22:16 +0200 Original-Received: from localhost ([::1]:38232 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lbamF-0005FA-JJ for ged-emacs-devel@m.gmane-mx.org; Tue, 27 Apr 2021 23:22:15 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50774) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lbalj-0004qZ-Lu for emacs-devel@gnu.org; Tue, 27 Apr 2021 23:21:43 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:10087) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lbalh-0000Ti-7z for emacs-devel@gnu.org; Tue, 27 Apr 2021 23:21:42 -0400 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 062CF4413F6; Tue, 27 Apr 2021 23:21:40 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 7236544137D; Tue, 27 Apr 2021 23:21:38 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1619580098; bh=2y1koiatmjJOgJIjGnYu9VfhoUCjFdU7A2YUfM4YtH8=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=C+u2lUY2JVQF+4NqKVCKBzjfil20jM5jmUm74pC7uVA6XvpEymfwMu6avERj+62DH uQNXHY/Nxnros9APpsaDmYENMiXG/COjIkqAlbssNNztSPeXar+lQFW9ikT7aN/1Lh LWRovN/a+pzYycFqyTcQIcAP6WS82DGkRmJvN9zleuM1+cMvDUPqi+Ot9x3IcGdAqg C04SbtMYYWNwC4zew5x4AOgOcSZuxKNYo1P7U+VJB/7RQsQ/RkCM0AAqXE1SRV+tu9 z6gDW7Y5oj2PIGeykL/+m3Zb8WENeL4hNfhHaRd68rbLXZmYNxe/RE84yeEYbq29Mk WOEYoRTI97Vvw== Original-Received: from alfajor (unknown [157.52.10.47]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 3D09F120232; Tue, 27 Apr 2021 23:21:38 -0400 (EDT) In-Reply-To: <47b502ea-cb89-7aad-6519-ff6e84180929@yandex.ru> (Dmitry Gutov's message of "Wed, 28 Apr 2021 03:08:46 +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:268555 Archived-At: >> 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. > > Perhaps a "selection" tweak on the *Completions* interface could look like > this: > > When completing-read is called (or selecting-read, IDK), *Completions* > buffer is popped up. The first element in the list is highlighted with some > noticeable background, thus telling the user that if they press RET right > away, that item will be selected. The user can now type some characters to > narrow down the matches, or the can move the selection along the list with, > say, arrow keys. Or C-n/C-p. Or press RET right away to choose the first > completion. Not sure if iteration with TAB is a good idea, but it could be > added as well. Yes, that's pretty much the UI behavior I imagine. > That doesn't solve the issue of hiding a "useful" window with this buffer, > but there's probably not much that can be done. Normally we should already try and make efforts not to hide "obviously useful" text when we pop up *Completions*, and as for the part that aren't obviously useful (or that we can't not hide) the user can always go and hide the *Completions* buffer manually (or do any other normal window manipulation). Stefan