From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Daniel Mendler Newsgroups: gmane.emacs.bugs Subject: bug#22324: 25.0.50; completion-category-defaults style doesn't override completion-styles (gets prepended instead) Date: Wed, 26 Jan 2022 14:49:48 +0100 Message-ID: <184dffab-4fa4-e265-c8ef-0c088149b1b4@daniel-mendler.de> 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> <87lf0yjwpw.fsf@gnus.org> <87r1aodus0.fsf@gnus.org> <66aa873d-5f5f-9024-efb6-e6110c27ab3a@yandex.ru> <87ilvy4m94.fsf@gnus.org> <87czklnqvs.fsf@gnus.org> <3045ca8b-f5d6-c85e-d170-3fe158fec64e@yandex.ru> <87ilu94gac.fsf@gnus.org> <43725c9f-1f0a-fb43-82a2-3f284791fdf5@yandex.ru> <875yq8ypmi.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2921"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Lars Ingebrigtsen , 22324@debbugs.gnu.org, Dmitry Gutov To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jan 26 15:16:02 2022 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 1nCj5e-0000X9-3q for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 26 Jan 2022 15:16:02 +0100 Original-Received: from localhost ([::1]:37592 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nCj5d-0006kc-6k for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 26 Jan 2022 09:16:01 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:35044) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nCigU-0005gM-Uy for bug-gnu-emacs@gnu.org; Wed, 26 Jan 2022 08:50:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:58418) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nCigU-0000lJ-KF for bug-gnu-emacs@gnu.org; Wed, 26 Jan 2022 08:50:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nCigU-0005nC-Fi for bug-gnu-emacs@gnu.org; Wed, 26 Jan 2022 08:50:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Daniel Mendler Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 26 Jan 2022 13:50: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.164320499822252 (code B ref 22324); Wed, 26 Jan 2022 13:50:02 +0000 Original-Received: (at 22324) by debbugs.gnu.org; 26 Jan 2022 13:49:58 +0000 Original-Received: from localhost ([127.0.0.1]:51321 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nCigQ-0005mq-Io for submit@debbugs.gnu.org; Wed, 26 Jan 2022 08:49:58 -0500 Original-Received: from server.qxqx.de ([178.63.65.180]:55727 helo=mail.qxqx.de) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nCigO-0005mZ-Ew for 22324@debbugs.gnu.org; Wed, 26 Jan 2022 08:49:57 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=qxqx.de; s=mail1392553390; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:From: References:Cc:To:Subject:MIME-Version:Date:Message-ID:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=LbeHSca0eQcNhklHT3GKksy/C8m/sTq52DTStxOkHvE=; b=t3booAxrRDAm1SDUFiFEQtwOXq nz3GJI207LHe8zL6mkaFitgJUAsUNqr1J24VykCAvnf/ECt0bEoZ4lJRFb48VBosVpOMDxXci8O+9 AB+Kj5dVISSzJIkXg5GPYACeabPKLnSJfu3aKFACSp6+Wr8np/QMLqgHHR7r3fGRD8bQ=; Content-Language: en-US In-Reply-To: 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:225264 Archived-At: > We can probably have our cake and eat it too by adding a `fail` > completion style. Such a style would always take responsibility > (i.e. would never return nil to delegate to subsequent styles), but > would always return a "useless" value that gives no completions. > > Then entries in `completion-category-override/defaults` could choose to > either be mere additions to the global default (as now) or be a full > override (which they'd get by having this `fail` style at the end). This sounds like a good idea to solve the issue and retain backward compatibility. It is like eating the cake backwards :) A `fail' completion style is pretty trivial. It boils down to adding `(fail ignore ignore "Fail with no completions")` to the `completion-styles-alist`, or did I miss something? >> Furthermore we've also got `completion-category-defaults`. It may make >> sense to distinguish them by making the override a real override and >> keep the current behavior for the defaults. > > No, the role of those two is already quite different: > `completion-category-defaults` is for packages to set, whereas > `completion-category-override` is to be set by end-users. I am aware of this distinction, but I chose to ignore it. Calling it "quite different" feels like an exaggeration, given that Emacs is supposed to be configurable throughout by the user - of course this is only my interpretation. I usually override `completion-category-defaults` since I want to control the completion precisely myself and I don't like if packages interfere with that. But this is probably a special preference of someone who wrote multiple completion UIs and likes to tweak the Orderless matching behavior... ;) As far as I know `completion-category-defaults` is not used widely. I don't have a single package installed which makes use of this functionality, but once again, this is probably not representative. Daniel