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: Fri, 28 Jan 2022 23:23:25 +0200 Message-ID: <1b288d78-912d-b07d-3027-300b7ff10067@yandex.ru> 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; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10700"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 Cc: Daniel Mendler , Lars Ingebrigtsen , 22324@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jan 28 22:33:00 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 1nDYrc-0002bf-3t for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 28 Jan 2022 22:33:00 +0100 Original-Received: from localhost ([::1]:52292 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nDYrZ-00083e-30 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 28 Jan 2022 16:32:57 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:51572) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nDYjJ-000824-87 for bug-gnu-emacs@gnu.org; Fri, 28 Jan 2022 16:24:25 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:39486) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nDYiw-0000xT-CQ for bug-gnu-emacs@gnu.org; Fri, 28 Jan 2022 16:24:13 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nDYiw-0001JF-9k for bug-gnu-emacs@gnu.org; Fri, 28 Jan 2022 16:24: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: Fri, 28 Jan 2022 21:24: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.16434050164996 (code B ref 22324); Fri, 28 Jan 2022 21:24:02 +0000 Original-Received: (at 22324) by debbugs.gnu.org; 28 Jan 2022 21:23:36 +0000 Original-Received: from localhost ([127.0.0.1]:60622 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nDYiW-0001IV-GD for submit@debbugs.gnu.org; Fri, 28 Jan 2022 16:23:36 -0500 Original-Received: from mail-wr1-f49.google.com ([209.85.221.49]:38501) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nDYiU-0001IJ-K1 for 22324@debbugs.gnu.org; Fri, 28 Jan 2022 16:23:34 -0500 Original-Received: by mail-wr1-f49.google.com with SMTP id c23so13241462wrb.5 for <22324@debbugs.gnu.org>; Fri, 28 Jan 2022 13:23:34 -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=4DtBvW+gDVnqinQqLNXN1hIWqVz85KL8jMrsSeh+EJA=; b=qPpjLxdQ+fMUtGZXVY73TSdqgcq1PTWYXFETmdp61dlw85VCaJcXsU5nOEf52Jvg// 8HolkZiacUM/c8bm58zNr7II7ICp/J81FQyiL6CSb790AoiD+P8sWHym5R7wx0zX8YcD gqjkzOPMQ8+LorTEyN7hJ1FcVRoup43689Kgajp0mni4TVD4zzk3pj/g7aHH8lUwTfDn hvR3i8rhJFot1l0SRNqjkoGxdZuP5dLDcYVnUPkRT2DCrdQF+TLM7Lkn6uHVFIcdOtEV IreFoiDBu0OxMIEIWrsQqv+686m8V5ZNHgpJ2ZCCnQ/w3wUL5M/3cgGgEyMfLGyqiJYT MT5A== 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=4DtBvW+gDVnqinQqLNXN1hIWqVz85KL8jMrsSeh+EJA=; b=0V0UxHAtelcNLtLoFGOqrYRhLPxjLSkH4q+DK0j+IlS9PqML9a+9/6jIk6vHsEnY2y jx9J3whdQOlViYFCJxXNOoJesZ7v9NPHx6G+bv+25xjkse8/ILMqDJh08fmzROlfYJuB trKVPas3+KMDJPwOXuK/UaDEBwwf6oR9DjWK3V/EFDuzDms9Cxv805hfQnV5wA49x1uL SjYg6DQ3dS0NmZbmp/6bezGe55Dl//F1YOQkkZFKywFtZ9D4uBWfzkC6xnlUoBOtKNqQ buDLmFakD+TkdSstXpyag/t06mkxhusT0dnyhgXdLe+1TDYYyJr3Ci/7q0JIZb3RPWH1 qOfQ== X-Gm-Message-State: AOAM533CJg3YvOG8hGdlzRWSlWe+DUQ/5hUTIl2pgFiqVoFbh0xpqWhj Ldo5uRq8ahmH+TiEp4iruRr6Trl3b3o= X-Google-Smtp-Source: ABdhPJzGfwoLUtOFTVHU7MhpVA8i8+SdcYZ2BpNfrP4oiiMAbwJB8etNldX8w1OWXw9EaIZ43wgf2A== X-Received: by 2002:adf:dcc4:: with SMTP id x4mr8660839wrm.676.1643405008625; Fri, 28 Jan 2022 13:23:28 -0800 (PST) Original-Received: from [10.107.115.144] ([185.209.196.174]) by smtp.googlemail.com with ESMTPSA id s17sm5349562wrm.62.2022.01.28.13.23.27 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 28 Jan 2022 13:23:27 -0800 (PST) In-Reply-To: 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:225491 Archived-At: On 28.01.2022 18:59, Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors wrote: > Dmitry Gutov [2022-01-28 04:37:36] wrote: >> On 26.01.2022 15:36, Stefan Monnier via Bug reports for GNU Emacs, the Swiss >> army knife of text editors wrote: >>> 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. >> *If* we did end up adding such style, would the default value of >> completion-category-defaults include 'fail' at the end of its every line? > No, since the fallback was chosen specifically for > `completion-category-defaults`, we'd want to keep it for the cases that > are already present at least. Depends on how you look at it: out of 6 entries in there currently, I added two of them, and since I was unaware of the fallback mechanism, it wasn't quite intentional. Even if certain edge cases ended up using the fallback to their benefit. Knowing that now, I would probably rewrite those completion-category-defaults to include all styles that would be tried explicitly (meaning, add 'partial-completion' after 'substring').