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: [PATCH] `completing-read`: Add `group-function` support to completion metadata Date: Wed, 28 Apr 2021 03:08:46 +0300 Message-ID: <47b502ea-cb89-7aad-6519-ff6e84180929@yandex.ru> 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; 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="11114"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 Cc: Daniel Mendler , Gregory Heytings , "emacs-devel@gnu.org" To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Apr 28 02:09:48 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 1lbXm0-0002oV-0Y for ged-emacs-devel@m.gmane-mx.org; Wed, 28 Apr 2021 02:09:48 +0200 Original-Received: from localhost ([::1]:47824 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lbXlz-0001bP-4j for ged-emacs-devel@m.gmane-mx.org; Tue, 27 Apr 2021 20:09:47 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49568) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lbXl7-0000z9-B0 for emacs-devel@gnu.org; Tue, 27 Apr 2021 20:08:53 -0400 Original-Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]:40602) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lbXl5-0002Cm-E8 for emacs-devel@gnu.org; Tue, 27 Apr 2021 20:08:53 -0400 Original-Received: by mail-wr1-x42a.google.com with SMTP id e5so32490887wrg.7 for ; Tue, 27 Apr 2021 17:08:51 -0700 (PDT) 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=WPk0I0vR8J7wqednJaUwsrCbaqQjviEWFgFCTbIQxeg=; b=V0aDrtJc2R5CKl90IX0dLNEbunoUvSz8M9zjiua5+D9f81NsBtVinqUlNTJFCPqNEc Sdn5H2+jpBUcyVf4vds1rS4QebaTI295n7XqkfXGYW395VvkMq2dg2ttrkr/8THjnb1p XbyAgqi4Z6DcTF3ok9MZY9Ahvlw0yBWQmJH8mCUuN168kEQ1ogd6eGnglCDnnlt42tjG /pwYsYf+MJMzNbv5ahLtrLsmKdIzD18xGByZbQftU6j3zpsn8nldHQ7GM3u+YbN5R+Kw Xt27roO772hcbY0HBMcWTYqlZhe1PK5aaJ6x6+FNzHhxgyzfXt+fl/EVvGUoIO+TLiay DF4w== 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=WPk0I0vR8J7wqednJaUwsrCbaqQjviEWFgFCTbIQxeg=; b=k4viXoB2CaQUKVUxpBGRiWSt3N0MvNJuv71PFjUlkzSnAznCVpa+JM9vaoiEA64bac +FhdlhL3F9yXT7eQti7OT3cO7+dZu+C07jIOyTfzMhcoSAmcI/lnAWPZD5CGZJEnN/7H 3NH5ljS9OnvAb8MEi0iYQYtdGU5zMBVKgjNUfz/Dw9RsOBtyP1bSKddhYlNEdJ6YEeRS Vs10qDoKMAgIeAGwCXqpUB8s2AFuz0MXa/jp2orwUcPiPhpVHkyj2OLzJ0jINxWoIr7L gn3Qvma6YtmyAZZMMUrkVdyDzuSwrhiOGBIj8+72zFnZno0ZBppXB++C2h3YqyLnGEFK FD1g== X-Gm-Message-State: AOAM5302p7FGxKiMbDYjLvbTymCM4mIZHovk5RTQvGkDCs7kTdGVfP6Y mgchdqhNOVJE4HjYsohuow4= X-Google-Smtp-Source: ABdhPJy6JDRe1Vg4yIgH/4VGaVyj1xHcN9UJyKa292DktyaS9f90mveeKC+stRFnAoAS9xK+zjgZVw== X-Received: by 2002:a5d:4acf:: with SMTP id y15mr32313165wrs.245.1619568529521; Tue, 27 Apr 2021 17:08:49 -0700 (PDT) Original-Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id q20sm5302280wmq.2.2021.04.27.17.08.47 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 27 Apr 2021 17:08:48 -0700 (PDT) In-Reply-To: Content-Language: en-US Received-SPF: pass client-ip=2a00:1450:4864:20::42a; envelope-from=raaahh@gmail.com; helo=mail-wr1-x42a.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.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, 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:268552 Archived-At: On 27.04.2021 06:41, Stefan Monnier wrote: > 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. That doesn't solve the issue of hiding a "useful" window with this buffer, but there's probably not much that can be done. When necessary, the user could switch to the previous buffer from that window in some other window.