From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#22324: 25.0.50; completion-category-defaults style doesn't override completion-styles (gets prepended instead) Date: Mon, 06 Dec 2021 03:25:31 +0100 Message-ID: <87lf0yjwpw.fsf@gnus.org> 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 Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34576"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: 22324@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Dec 06 03:26:11 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 1mu3hi-0008qi-Mu for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 06 Dec 2021 03:26:10 +0100 Original-Received: from localhost ([::1]:55748 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mu3hh-0002H5-Ai for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 05 Dec 2021 21:26:09 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:40014) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mu3ha-0002Gv-0y for bug-gnu-emacs@gnu.org; Sun, 05 Dec 2021 21:26:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:48613) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mu3hZ-0002wA-Oh for bug-gnu-emacs@gnu.org; Sun, 05 Dec 2021 21:26:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mu3hZ-0000x9-LK for bug-gnu-emacs@gnu.org; Sun, 05 Dec 2021 21:26:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 06 Dec 2021 02:26:01 +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.16387575443639 (code B ref 22324); Mon, 06 Dec 2021 02:26:01 +0000 Original-Received: (at 22324) by debbugs.gnu.org; 6 Dec 2021 02:25:44 +0000 Original-Received: from localhost ([127.0.0.1]:60159 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mu3hI-0000wd-6k for submit@debbugs.gnu.org; Sun, 05 Dec 2021 21:25:44 -0500 Original-Received: from quimby.gnus.org ([95.216.78.240]:58994) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mu3hG-0000wQ-Fr for 22324@debbugs.gnu.org; Sun, 05 Dec 2021 21:25:43 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: 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=ay1xLX4WvnjZqtgDhE7CYMJIAhHtHUxP4c/VbsveTU0=; b=kmTC1d7FcMxCj+1dlaLI2oDao0 F1wIs+tn4ajcrH/OKMrF3MNqsxD0MCJ0o5Sdq6Dt1Y6TLRR/iMEewaUN+S87NmNcrng0aCrax+tNi 3poeN5jTHv4TWkPR2F90SlEvzWawc03xAvVs9lCSobbqfUP/gx441XCU+ufmHrNpu+cM=; Original-Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mu3h7-0005Ht-87; Mon, 06 Dec 2021 03:25:36 +0100 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAElBMVEUhGRMkGxNaOi2+ nJurWkn///+df6DXAAAAAWJLR0QF+G/pxwAAAAd0SU1FB+UMBgESD4NPlTkAAAG+SURBVDjLZZOL udsgDIUh6QASvQMYXQ3QGga4wdp/ph7JroNj5Yvj8KOjF6R0s8xueCG8ZeLMOdZEWKqDLG5VZnOA D8Hjppb4NNdxWQ7FVCqHb3v23tsflsIMXUol5Cutj9X+rpRLFd9J/6VI5KV1LBkRfY0S0a5v46Vs yzuBw+Nx5HkDzxa2TiA6kB/te/tefy9zNQhC/GuzTdbnDPbiEGNo/Vqu5UcvseXaluS9pdhB6VOJ jy03EFu95hu4yp/gM+7sATFkfA+OzETNhD4BpYcB2GsCmCYOSlUTgDF7RHEQArsCz4gBRoELzYBQ M2G7g3fP9jKyg/ohlSMD24NMUtWPAvHYgyyXOghnOrQUwI8z7QC/OYK8SJY4ymflFYF0QwSmdE4h +sSlatv6EoAi4aNXZVhrfSGfsGcZAAeeijj4EZ983IQA4l/z5j5wqnEBUDGehzkYhXcF+PjaEFEA NDLuhlsJ4H99fmLv+5mq6JASUg7GDKyLqm0R5PTxEW3dsHHDqo3DwwQxvBcBoNaHZ6A6NFkY/rcu pi08hoqDhlHAq3X1E1S5jB14BB9R6wPJNfdGBgdAd12KGc9D+R9mcWmmh4psdgAAACV0RVh0ZGF0 ZTpjcmVhdGUAMjAyMS0xMi0wNlQwMToxODoxNSswMDowMMirP+kAAAAldEVYdGRhdGU6bW9kaWZ5 ADIwMjEtMTItMDZUMDE6MTg6MTUrMDA6MDC59odVAAAAAElFTkSuQmCC X-Now-Playing: Neil Young & Crazy Horse's _Live Rust_: "Hey Hey, My My (Into The Black)" In-Reply-To: (Dmitry Gutov's message of "Mon, 6 Dec 2021 04:16:52 +0300") 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:221705 Archived-At: Dmitry Gutov writes: >> (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'. Well, it overrides the specific tag/category -- but completion-category-overrides doesn't (by being non-nil) override the entirety of completion-category-defaults. So it's two types of overrides. > 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). Yes, it doesn't seem to allow dropping any of them out completely. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no