From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#22324: 25.0.50; completion-category-defaults style doesn't override completion-styles (gets prepended instead) Date: Mon, 6 Dec 2021 04:16:52 +0300 Message-ID: References: <868u41rv84.fsf@yandex.ru> <83fuy8p8oq.fsf@gnu.org> <568FA9D0.2040609@yandex.ru> <83egdsp88n.fsf@gnu.org> <568FABFC.3000205@yandex.ru> <87tufr74of.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39828"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 Cc: 22324@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Dec 06 02:18:13 2021 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 1mu2dw-000A7y-3A for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 06 Dec 2021 02:18:12 +0100 Original-Received: from localhost ([::1]:33684 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mu2du-0000kE-4p for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 05 Dec 2021 20:18:10 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:58826) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mu2dm-0000jm-Ny for bug-gnu-emacs@gnu.org; Sun, 05 Dec 2021 20:18:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:48509) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mu2dm-0001OX-Fx for bug-gnu-emacs@gnu.org; Sun, 05 Dec 2021 20:18:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mu2dm-00007Z-7X for bug-gnu-emacs@gnu.org; Sun, 05 Dec 2021 20:18:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 06 Dec 2021 01:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22324 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 22324-submit@debbugs.gnu.org id=B22324.1638753455405 (code B ref 22324); Mon, 06 Dec 2021 01:18:02 +0000 Original-Received: (at 22324) by debbugs.gnu.org; 6 Dec 2021 01:17:35 +0000 Original-Received: from localhost ([127.0.0.1]:60055 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mu2dK-00006T-Ql for submit@debbugs.gnu.org; Sun, 05 Dec 2021 20:17:35 -0500 Original-Received: from mail-lf1-f46.google.com ([209.85.167.46]:45965) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mu2dI-000065-Va for 22324@debbugs.gnu.org; Sun, 05 Dec 2021 20:17:33 -0500 Original-Received: by mail-lf1-f46.google.com with SMTP id m27so21283892lfj.12 for <22324@debbugs.gnu.org>; Sun, 05 Dec 2021 17:17:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=I7VF4ihWGOkCOS6DSike2Qbo1RP4PGRaFuuhex3i0iw=; b=Hh0bYcNKBGrQI7UUJ2QqNpYP+OeWI+WRGvrBVi5cVve+aKZrN0gMmCWj9l3yIrBEGv l+YlgrZm7T/nBhZP1QDtLDayZblX13Qdg+Y//vjhSrC3C5He0qQ75LY/QLBLkclC7Al3 uTwe4AS4oc3fNz0kYLSIxOhl5xC2iK9+DmOpZfgK2HWOwVJd5U8Hxdq24at1pndS7Wt+ hW86mc249psNH5gf4KZW2U7PSk0CyW313L2G8ksTu53ldgTxjZHi+I8O/uu+ePQ/Pu3H E0/RzDvEuWz5V9U5Bmvvp2+Gk6GtZ/Pv4kB9zyYx+aRlJOEn/EWMzx2KuQDUYuPJ2+Cw X4Xg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=I7VF4ihWGOkCOS6DSike2Qbo1RP4PGRaFuuhex3i0iw=; b=Xg9BTRRiw6SJKzuUWecX5UPTwrXgIlnJW5bwcTcXYBGko42UH/xyJHy7v2elHQaico nFXsdByXGrSb41hh0a+bnDVF+ULdcAd969TVdLiCvVueHSHd2u9cZ1RUUlYZDtzyKZKH 4p8G9gbrMBRNZXm3dOl9nE2IKwzpZ702NIrKLtpax+mroGoL8vvDAfDLvyPZBM6bj0zO aPBMZjegFqhE2a3mwK9ZekkInrRd8WjLvrLg8DdiOUWVzjN+PysldUfNjjO3MMU1Qcv9 PnxOBaP4ALuu82f/u6Cqaom2ubarF0IIIllDkyeM52mk9mDArcM5wSkBBrSAW3TMNMLE T2/Q== X-Gm-Message-State: AOAM531PuqNQm2od4sIeEUQGITsYQPMWFBwtVOcE8ygzM2QrEMYkfdop /4GEZT4hmndF8/M4tE1CN+0mYuHsqiw= X-Google-Smtp-Source: ABdhPJz0ms65FX/usvEhObyxVJCR/9dOMztmCsDSroA4chsa85YmA2Uiq4mAtE22at6H0hAfsVbAWA== X-Received: by 2002:a05:6512:3a91:: with SMTP id q17mr31012117lfu.425.1638753447005; Sun, 05 Dec 2021 17:17:27 -0800 (PST) Original-Received: from [192.168.0.103] ([5.18.233.185]) by smtp.googlemail.com with ESMTPSA id i11sm1207468lfu.141.2021.12.05.17.17.26 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 05 Dec 2021 17:17:26 -0800 (PST) In-Reply-To: <87tufr74of.fsf@gnus.org> Content-Language: en-US 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" Xref: news.gmane.io gmane.emacs.bugs:221693 Archived-At: On 02.12.2021 12:10, Lars Ingebrigtsen wrote: > --- > This overrides the defaults specified in `completion-category-defaults'." > --- > > And it does indeed prepend: > > (defun completion--category-override (category tag) > (or (assq tag (cdr (assq category completion-category-overrides))) > (assq tag (cdr (assq category completion-category-defaults))))) > > But... I think saying that that "overrides" is fine? I think an "override" has a particular meaning, and that's replacing something that was there before. Not prepending to it. Why is it important? Suppose the "category defaults" entry has a "permissive" style set up for a certain completion category. As a user, I might try to override it with an entry in completion-category-overrides, to use a stricter style like 'partial-completion' or even 'basic'. But what happens when my input fails to find any completions with the style I specified? It will fall back the default one, which is both surprising, given the current documentation, and can be problematic with respect to performance ('flex' is slower than 'partial-completion') and behavior (bringing lots of probably irrelevant completions which match my input because 'flex' is quite lax). Whether one enjoys the lax behavior of 'flex', is more or less a user preference, and it seems one can't configure it entirely through completion-category-overrides. And since that variable is a defcustom and completion-category-defaults is not, it seems like we're limiting customization this way. Though, of course, a user that's motivated enough can change the value of completion-category-defaults too.