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.bugs Subject: bug#68214: Completion sorting customization by category Date: Sun, 07 Jan 2024 20:05:27 +0200 Organization: LINKOV.NET Message-ID: <86wmslhvdk.fsf@mail.linkov.net> References: <86a5pnzst1.fsf@mail.linkov.net> <868r5630ft.fsf@mail.linkov.net> <8ebc33fb-d01f-4426-a716-69a11f6dfad1@daniel-mendler.de> <86le95m2ue.fsf@mail.linkov.net> <86sf3cjj6o.fsf@mail.linkov.net> <871qawrxh0.fsf@daniel-mendler.de> <86r0iuxu4f.fsf@mail.linkov.net> <87plye9wbz.fsf@daniel-mendler.de> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8879"; 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: 68214@debbugs.gnu.org To: Daniel Mendler Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jan 07 19:08:19 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1rMXZL-00029w-AS for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 07 Jan 2024 19:08:19 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rMXZ0-0001Jm-SP; Sun, 07 Jan 2024 13:07:58 -0500 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 1rMXYz-0001JC-Al for bug-gnu-emacs@gnu.org; Sun, 07 Jan 2024 13:07:57 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rMXYz-0008Uc-2t for bug-gnu-emacs@gnu.org; Sun, 07 Jan 2024 13:07:57 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rMXZ4-0007Vz-FL for bug-gnu-emacs@gnu.org; Sun, 07 Jan 2024 13:08:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 07 Jan 2024 18:08:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 68214 X-GNU-PR-Package: emacs Original-Received: via spool by 68214-submit@debbugs.gnu.org id=B68214.170465084328825 (code B ref 68214); Sun, 07 Jan 2024 18:08:02 +0000 Original-Received: (at 68214) by debbugs.gnu.org; 7 Jan 2024 18:07:23 +0000 Original-Received: from localhost ([127.0.0.1]:33762 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rMXYQ-0007Uq-PT for submit@debbugs.gnu.org; Sun, 07 Jan 2024 13:07:23 -0500 Original-Received: from relay2-d.mail.gandi.net ([217.70.183.194]:58377) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rMXYO-0007Uc-Jx for 68214@debbugs.gnu.org; Sun, 07 Jan 2024 13:07:21 -0500 Original-Received: by mail.gandi.net (Postfix) with ESMTPSA id 9F03840004; Sun, 7 Jan 2024 18:07:07 +0000 (UTC) In-Reply-To: <87plye9wbz.fsf@daniel-mendler.de> (Daniel Mendler's message of "Sat, 06 Jan 2024 18:59:44 +0100") X-GND-Sasl: juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:277520 Archived-At: >> This is what I already considered but hesitated to make this change >> since it modifies the default behavior. OTOH, probably there is >> no possible harm from this change. So I'll give this a try. > > Thanks. Seems better to take that route, instead of changing all > `completion-metadata-get' calls to `completion-metadata-override-get' > and leaving `completion-metadata-get' mostly unused. As long as we don't > modify `completion-category-defaults' or `completion-category-overrides' > there won't be a change in behavior. Thanks for the suggestion. Now pushed in commit 18de131222e, so all metadata properties are supported now in `completion-category-overrides'. What do you think about doing the same for `completion-extra-properties'? This basically means moving `plist-get completion-extra-properties' to `completion-metadata-get' that will replace this: (ann-fun (or (completion-metadata-get all-md 'annotation-function) (plist-get completion-extra-properties :annotation-function))) (aff-fun (or (completion-metadata-get all-md 'affixation-function) (plist-get completion-extra-properties :affixation-function))) with just: (ann-fun (completion-metadata-get all-md 'annotation-function)) (aff-fun (completion-metadata-get all-md 'affixation-function))