From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Spencer Baugh Newsgroups: gmane.emacs.devel Subject: Re: Updating *Completions* as you type Date: Fri, 13 Oct 2023 15:04:50 -0400 Message-ID: References: <87bkd3z9bi.fsf@catern.com> <86cyxjyr1y.fsf@mail.linkov.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="10923"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) To: emacs-devel@gnu.org Cancel-Lock: sha1:nTWlCw4DsuLsvFxwtsbe0zFjx1k= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Oct 14 08:07:07 2023 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 1qrXnn-0002bc-Ez for ged-emacs-devel@m.gmane-mx.org; Sat, 14 Oct 2023 08:07:07 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qrXmk-0000hV-RB; Sat, 14 Oct 2023 02:06:02 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qrNT6-0005ef-Ku for emacs-devel@gnu.org; Fri, 13 Oct 2023 15:05:04 -0400 Original-Received: from ciao.gmane.io ([116.202.254.214]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qrNT4-0000az-6G for emacs-devel@gnu.org; Fri, 13 Oct 2023 15:05:04 -0400 Original-Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1qrNT0-0007MF-Jx for emacs-devel@gnu.org; Fri, 13 Oct 2023 21:04:58 +0200 X-Injected-Via-Gmane: http://gmane.org/ Received-SPF: pass client-ip=116.202.254.214; envelope-from=ged-emacs-devel@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: -15 X-Spam_score: -1.6 X-Spam_bar: - X-Spam_report: (-1.6 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.25, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Sat, 14 Oct 2023 02:06:01 -0400 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:311440 Archived-At: Juri Linkov writes: >> It would be nice if there was a built-in customization which caused >> *Completions* to update as you type, as long as that buffer is visible. >> I imagine such a request has been made before, so what is the obstacle >> to adding it? > > I don't remember what was the obstacle, but here is the previous patch > that implements the behavior of zsh and is based on icomplete-mode. Nice! Although again this is more features than I want - I just want *Completions* to automatically update after it opens. >> I would like to figure out a solution which everyone is happy with, and >> then I would be happy to implement it. It seems to me that it's just a >> matter of, after each keystroke, triggering (for minibuffer completion) >> minibuffer-completion-help or (for buffer completion) some new function >> to populate *Completions* with all-completions output. > > There is one difference between icomplete-mode and zcomplete-mode: > the former uses completion-all-sorted-completions where the > recently used items are at the top of the completion list. > Whereas the latter uses the same alphabetical sorting as TAB > shows in the *Completions* buffer. Maybe a new function > should allow any sorting order? This is orthogonal to my original topic, which is just updating *Completions* as I type, without changing how it gets populated. That being said, yes this may be nice. But minibuffer-completion-help already does sort the completions using display-sort-function, just like completion-all-sorted-completions, so what's causing the difference in behavior? Honestly the main place I find myself wanting different sorting of completions is for buffer completion - I'd prefer buffers to be sorted by most-recently-used. Maybe we can just add such an option?