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: Wed, 18 Oct 2023 23:33:38 +0000 (UTC) Message-ID: <875y33v73h.fsf@catern.com> References: <87bkd3z9bi.fsf@catern.com> <86cyxjyr1y.fsf@mail.linkov.net> <86r0lxm7um.fsf@mail.linkov.net> <87sf6dx954.fsf@catern.com> <87ttqpwea9.fsf@catern.com> <86wmvlw178.fsf@mail.linkov.net> <87bkcwx3ft.fsf@catern.com> <86y1g076vh.fsf@mail.linkov.net> <87sf68unh1.fsf@catern.com> <86zg0fu99i.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26528"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Oct 19 01:34:19 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 1qtG3N-0006bW-FR for ged-emacs-devel@m.gmane-mx.org; Thu, 19 Oct 2023 01:34:18 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qtG2w-0003Af-VE; Wed, 18 Oct 2023 19:33:52 -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 1qtG2o-00032m-6O for emacs-devel@gnu.org; Wed, 18 Oct 2023 19:33:42 -0400 Original-Received: from s.wrqvwxzv.outbound-mail.sendgrid.net ([149.72.154.232]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qtG2m-0001FK-L7 for emacs-devel@gnu.org; Wed, 18 Oct 2023 19:33:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=catern.com; h=from:subject:in-reply-to:references:mime-version:to:cc:content-type: content-transfer-encoding:cc:content-type:from:subject:to; s=s1; bh=j/sCUcoMXWTi2+/K2i+KOTYxy3Gak/uQo3xi0LNf8b0=; b=wMr77SQCqHrVyMPOdlWHrAIWAStEdC7EVN51eWKUOEldTHsezE0Uae1suuDJMvr+FQw8 rXuzT9+oOOnJLBegIpEmxTHOtYtEIxJBXaiazSrVTxOf+Ma6m6yDBynXNm1ynBeaV0wGH3 88WPucVYXSdyEVGh9BzPEul2PUWAq2VtFtdp/asuHFp92Tm+JPH2dWzVoPhqAGuI0Qs9mG eiMoDG/EWIgSR1h5QIr/qsS79KrvApRqnzCGy7uaAHkSi4dX5poJnFT54viZUYGOYuHLLk O9MI3r4MNO9fEXCuBu//COnEaH76/oAD+E9YjMzu2yz6kTdhhSYb3x+imbvIdM5w== Original-Received: by filterdrecv-d585b8d85-mjcsw with SMTP id filterdrecv-d585b8d85-mjcsw-1-65306B52-1A 2023-10-18 23:33:38.609573907 +0000 UTC m=+104019.943920125 Original-Received: from earth.catern.com (unknown) by geopod-ismtpd-26 (SG) with ESMTP id X6-FDxk-StG4PVb1up8Zgw Wed, 18 Oct 2023 23:33:38.389 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=::1; helo=localhost; envelope-from=sbaugh@catern.com; receiver=linkov.net Original-Received: from localhost (localhost [IPv6:::1]) by earth.catern.com (Postfix) with ESMTPSA id 0BDA366E83; Wed, 18 Oct 2023 19:33:38 -0400 (EDT) In-Reply-To: <86zg0fu99i.fsf@mail.linkov.net> X-SG-EID: =?us-ascii?Q?GW3oCMoYnalRiojMOuLzE6x2H5kORXvlCdz1UwQVRMVT4fbh9ODEfCogOe74cO?= =?us-ascii?Q?rI4e0V+MFZgakz9Re5a6=2FCghW86zFkpVVT06yQo?= =?us-ascii?Q?Oo9UDb=2F+90Xbh7SIosD=2F1DBGgzr4NS=2F02rNPgAe?= =?us-ascii?Q?llHHsjq71hZWgY8GQ1SLQLTyRXveFPN+0fPuxwz?= =?us-ascii?Q?MgWC40dc1UCTasc1HkyYHPAZIQ8jAaneWk3aP7P?= =?us-ascii?Q?2+18YA=2FqfpyQ15IV1THFi2XSa4=2FqE8PwILJRV3?= X-Entity-ID: d/0VcHixlS0t7iB1YKCv4Q== Received-SPF: pass client-ip=149.72.154.232; envelope-from=bounces+21787432-489d-emacs-devel=gnu.org@em8926.catern.com; helo=s.wrqvwxzv.outbound-mail.sendgrid.net X-Spam_score_int: 6 X-Spam_score: 0.6 X-Spam_bar: / X-Spam_report: (0.6 / 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_BL_SPAMCOP_NET=1.347, RCVD_IN_MSPIKE_H2=-0.001, RCVD_IN_VALIDITY_RPBL=1.31, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, UNPARSEABLE_RELAY=0.001 autolearn=no 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:311564 Archived-At: Juri Linkov writes: >>> Actually there is already a nil value in completions-sort with the tag >>> "No sorting". This works nicely for 'C-x b'. The remaining need is >>> to be able to set it only for 'C-x b', not for other completion types. >> >> I feel quite strongly that we should not extend completions-sort to be >> able to affect different completion types differently. Instead I think >> we should leave completions-sort as a blanket configuration for what to >> do if the completion metadata does not specify display-sort-function, >> and if we want to allow customizing an individual completion type, that >> completion type should specify a display-sort-function which can be >> customized. >> >> If we do extend completions-sort to affect different completion types >> differently, I expect we'll see lots of silly things, like packages with >> new completion types which automatically install changes to >> completions-sort instead of just specifying their own >> display-sort-function. > > Probably different completion types should provide separate options > such as e.g. 'read-char-by-name-sort' defines 'display-sort-function' > for 'read-char-by-name'. Agreed. > The same could be added for 'C-x b'. But unfortunately currently > it's hard-coded in 'internal-complete-buffer': > > #+begin_src c > else if (EQ (flag, Qmetadata)) > return list3 (Qmetadata, > Fcons (Qcategory, Qbuffer), > Fcons (Qcycle_sort_function, Qidentity)); > #+end_src Not hard to fix. I will post a patch to make this customizable soon.