From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: Updating *Completions* as you type Date: Tue, 17 Oct 2023 21:35:07 +0300 Organization: LINKOV.NET Message-ID: <86wmvlw178.fsf@mail.linkov.net> References: <87bkd3z9bi.fsf@catern.com> <86cyxjyr1y.fsf@mail.linkov.net> <86r0lxm7um.fsf@mail.linkov.net> <87sf6dx954.fsf@catern.com> <87ttqpwea9.fsf@catern.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27928"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) Cc: emacs-devel@gnu.org To: sbaugh@catern.com Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Oct 17 20:47:15 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 1qsp62-00073G-JF for ged-emacs-devel@m.gmane-mx.org; Tue, 17 Oct 2023 20:47:14 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qsp4j-0006GK-NH; Tue, 17 Oct 2023 14:45:53 -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 1qsp4Z-0006BN-Gw for emacs-devel@gnu.org; Tue, 17 Oct 2023 14:45:43 -0400 Original-Received: from relay7-d.mail.gandi.net ([217.70.183.200]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qsp4V-0005A9-7W for emacs-devel@gnu.org; Tue, 17 Oct 2023 14:45:43 -0400 Original-Received: by mail.gandi.net (Postfix) with ESMTPSA id 6E49F2000A; Tue, 17 Oct 2023 18:45:32 +0000 (UTC) In-Reply-To: <87ttqpwea9.fsf@catern.com> (sbaugh@catern.com's message of "Tue, 17 Oct 2023 09:48:30 -0400") X-GND-Sasl: juri@linkov.net Received-SPF: pass client-ip=217.70.183.200; envelope-from=juri@linkov.net; helo=relay7-d.mail.gandi.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-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.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:311542 Archived-At: > On reflection, I think adding a new option for completions-sort is > indeed what we should do. Otherwise, we won't get historical sorting > for non-programmed completing-read, which is a pretty common kind of > completing-read. Here's a patch to do that. > We can always add display-sort-functions later for buffers and files, if > that ends up being desirable. Thanks, this is a nice first step that paves the way to later additions of display-sort-functions and keys for toggling sorting in *Completions*. > Also, tangentially, I think probably we should rework > minibuffer-complete-history and minibuffer-complete-defaults to be > persistent - as in, regular TAB afterwards continues to complete history > or defaults. And there should be some way to reset back to normal. > That would be a good complement to this completions-sort change, by > maybe giving a way to switch on-demand to alphabetical sorting. (I've > long thought this would be good and useful, but in particular it's > relevant for completions-auto-update since that will otherwise nearly > immediately reset the displayed completions back to normal.) I think we should choose a key to toggle completion type between history/default/regular completion. > Subject: [PATCH] Add a historical option to completions-sort > > This causes completion to sort based on history. This is useful for > getting, e.g., most-recently-used order from C-x b. Actually for 'C-x b' I'd prefer to sort buffers by the order of (buffer-list), not by the order buffers occur in the minibuffer history (that I'd like to use for everything else).