From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Philip Kaludercic Newsgroups: gmane.emacs.devel Subject: Re: Stepping Back: A Wealth Of Completion systems Re: [ELPA] New package: vertico Date: Wed, 07 Apr 2021 21:13:22 +0200 Message-ID: <87o8eplxgt.fsf@posteo.net> References: <9c9af088-580f-9fb1-4d79-237a74ce605c@inventati.org> <874kgkxxs0.fsf@posteo.net> <3ec7e2e58a100426a22e@heytings.org> <877dleb2px.fsf@posteo.net> <87blaq5amw.fsf@posteo.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17792"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) Cc: emacs-devel@gnu.org To: Daniel Mendler Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Apr 07 21:14:30 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 1lUDdG-0004Vz-90 for ged-emacs-devel@m.gmane-mx.org; Wed, 07 Apr 2021 21:14:30 +0200 Original-Received: from localhost ([::1]:58032 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lUDdF-0004n0-AC for ged-emacs-devel@m.gmane-mx.org; Wed, 07 Apr 2021 15:14:29 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41688) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lUDcH-0004LF-3m for emacs-devel@gnu.org; Wed, 07 Apr 2021 15:13:29 -0400 Original-Received: from mout02.posteo.de ([185.67.36.66]:37109) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lUDcE-0003dN-Af for emacs-devel@gnu.org; Wed, 07 Apr 2021 15:13:28 -0400 Original-Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id D28FD2400FD for ; Wed, 7 Apr 2021 21:13:23 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1617822803; bh=4klBrJVJB+ksHkesng7aQBZ0DnhEdYvHvp8FIGKuIVA=; h=From:To:Cc:Subject:Date:From; b=Le/OrvCkNfFcOqEoM6KCo2AwKuuLLhx1icI6xB7wKxtYKSShXd3BsuwTbSNP649rT Tqbr3uBDDAs6iIE+jZYHJjXL701h+NhRCjQximQtVYt3YnBNJ+eF6rqW8WZfXXXAuv FuWiITv6LVMfn6XBIZ8lkeJhzRjuWs/BWJ8sRS4XhEhqQPXWIX1GRDTce8uhf5+YOs Ezl5lkr2IkldqrAR3mrD/jTdql4RUWGGYouGN9eYWErhsbV9UyyAy/coQRIHOgiqJX +k7NwHv6FGPUaC5hSkiQ7EKjHdFIpR6daQf2k/AOS0W66vZpBxVTiI1madHZrM+2eV kNHGWiPdYVzuQ== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4FFvDz0JlSz6tm6; Wed, 7 Apr 2021 21:13:23 +0200 (CEST) In-Reply-To: (Daniel Mendler's message of "Wed, 7 Apr 2021 18:57:02 +0200") Received-SPF: pass client-ip=185.67.36.66; envelope-from=philipk@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, 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:267562 Archived-At: Daniel Mendler writes: > On 4/7/21 6:20 PM, Philip Kaludercic wrote: >> Well that is because imenu presents the options in the minibuffer, and >> you have to go through the menu step-by-step. What I'm talking about is >> a direct hierarchical visualisation, that should be navigable with the >> intuitiveness of org-mode. > > This is a bit vague. If we have a tree structure one can have some > tree-like visualization (like the sidebar tree browsers) or have an > outline like in org-mode. But how would you actually navigate quickly? > Using Avy-like keys? What if the structure does not fit on the screen > easily, what if there are cycles, ...? I'm still thinking about all of this, and have to find the time to implement a prototype. It might make sense to have a similar approach to completing-read, where a variable like completing-read-function can change everything. A tree-like visualisation would probably make more sense, as long as it can be manipulated using the keyboard. I mentioned org-mode thinking of the org-cycle command, and how it allows you to hide and show subtrees. > In the case of `completing-read` the current solutions are all pretty > simple. If we ignore the special cases of dynamic completion tables, > you just hand it this big flat list and filter until the data set > becomes manageable. While some use cases seem to be a bit pressed into > that framework (like if you have a hammer...), I think it works > surprisingly well in many scenarios with a large number of > unstructured candidates. I use the default completion system, so for me it is not about filtering a data set but expanding a string. Just to reiterate, this is exactly the point I am bringing this up. > To me it seems much harder to imagine something general which caters > for all selection needs using an outline-like visualization. It might be that it is too far fetched, but I have a (vague) idea how selecting-read might look like and behave. A proper analysis of the current situation and (imo) misuse of completing-read would probably be necessary before actually building anything. >> I don't think that selecting-read should replace completing-read. Rather >> there are cases where completing-read is used like selecting-read, that >> would profit from actually being selected by everyone, and not just >> those who use completion frameworks that interpret completion as >> selection. >> I think there is more value in keeping completing-read simple, and focus >> it on actual text expansion. > > Agree. Regarding "interpreting completion as selection" and "text > expansion", I am unsure if there is a big difference. You always start > with a set of possible completions and only for very few styles a > prefix completion is possible. This has been mentioned before in this > thread, I think. I don't start with any set, I start with an (usually) empty prompt and type a few letter, tab to check and then press enter. I try to avoid unnecessary UI movement, which is why I have set completion-cycle-threshold to t, so that I have to manually request a "*Completions*" buffer. But even so, there are situations where selection would be preferable. Usually when I don't know what my options are. >> In some sense the abundance of solutions around completion show that the >> community wants something else than what completing-read provides by >> default. I get why, as a lot of packages use completing-read. But it >> might be better to start from the position we want to achieve, instead >> of hacking our way towards that end. > > I am actually quite satisfied with the status quo given the many > package options, where everyone seems to find a good fit. But maybe > the name `completing-read` does not reflect anymore what it is since > it is often used for something else than simple prefix expansion. The > prefix/basic completion is baked pretty deeply in the completion APIs, > e.g., `all-completions` and this got relaxed afterwards. Well FWIW I'm not. I used Ivy for a long while, but ultimately gave it up. There has been a lot of talk about {Selectrum,Embark,Orderless,...} recently but I am not convinced that the approach these packages take are on the right level. The only way to find out is to try something else on the level I suspect there might be more potential for a better solution. > Daniel > -- Philip K.