From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" 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 17:57:33 -0500 Message-ID: References: <868u41rv84.fsf@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> <184dffab-4fa4-e265-c8ef-0c088149b1b4@daniel-mendler.de> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35711"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: Lars Ingebrigtsen , 22324@debbugs.gnu.org, Dmitry Gutov To: Daniel Mendler Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jan 26 23:58:14 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 1nCrEz-00094i-Vu for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 26 Jan 2022 23:58:14 +0100 Original-Received: from localhost ([::1]:48118 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nCrEy-0007e3-KG for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 26 Jan 2022 17:58:12 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:60538) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nCrEo-0007dj-3f for bug-gnu-emacs@gnu.org; Wed, 26 Jan 2022 17:58:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:60848) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nCrEn-0003nZ-Kn for bug-gnu-emacs@gnu.org; Wed, 26 Jan 2022 17:58:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nCrEn-0007Dq-JG for bug-gnu-emacs@gnu.org; Wed, 26 Jan 2022 17:58:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 26 Jan 2022 22:58: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.164323786527737 (code B ref 22324); Wed, 26 Jan 2022 22:58:01 +0000 Original-Received: (at 22324) by debbugs.gnu.org; 26 Jan 2022 22:57:45 +0000 Original-Received: from localhost ([127.0.0.1]:53751 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nCrEW-0007DI-Qo for submit@debbugs.gnu.org; Wed, 26 Jan 2022 17:57:45 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:9127) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nCrEV-0007D6-6f for 22324@debbugs.gnu.org; Wed, 26 Jan 2022 17:57:44 -0500 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 083B510018E; Wed, 26 Jan 2022 17:57:37 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id A227A100183; Wed, 26 Jan 2022 17:57:35 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1643237855; bh=8txkS2A7pBGXcyrftjrgid6+Gb5eXEqrJ0pv0tZ1FFc=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=K2LOWKCRRZRknlJw358Tx+j6fs0zj5ENclsJsETt70pBuVUaspb/tzUKDpLxjWkM6 m5Lab2ILxtB95XNFo4/LLNYDqwc6WaSASCjYS6dAvlyl9Tnd8UjvstbV5Tt2/HZVf3 XyVR8pD49Bm2hnLo2EAmB59LWOtm4u2x/Qmi9U/n3C2NDxBZ6te7+5iEB/UQoGMSeo YYV1HrI1TNgx96Xa+vqlQXeOVNMR007ztwSFXVcHAc5Hp3iMKSAbI9G3J8GkFPULAS kdda8jOKOI59QJJ0JS4fPS4TdFQIwKV13+W13M49T45VW2cqD1aE3EqU6xkT66anxt dImQP25j6fq4g== Original-Received: from alfajor (lechon.iro.umontreal.ca [132.204.27.242]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 7CD1012089E; Wed, 26 Jan 2022 17:57:35 -0500 (EST) In-Reply-To: (Daniel Mendler's message of "Wed, 26 Jan 2022 19:59:49 +0100") 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:225314 Archived-At: >> No, because `ignore` will return nil and so we'll just keep going to the >> next style. We need try/all-completion functions for this style to >> return a non-nil value but that is like "no completion". >> >> I suspect it can't be done quite right without changing `minibuffer.el`, >> but we can probably get close enough to be tolerable with older Emacsen. >> >> E.g. for the try-completion case, I think we can return (STRING . POINT) >> and for all-completions maybe returning `0` will do the trick. > > Okay, right. This makes the proposal a bit less appealing to be honest, > since we end up with a hack, where the result is something like a > non-nil invalid completion result. Hmm. I think it should be easy enough to make the various UIs handle it (in the worst case, add an advice to `completion-try-completion` and `completion-all-completions`). Of course it's a hack, but only one needed during the transition. Like my gym coach used to say when we had an injury: you won't remember it in 10 years. > So maybe we shouldn't do this and fix the problem at the root? > Remove the failover mechanism? Not sure how that'll help with Emacs<29 ;-) > My cheap proposal would be the removal of `completion-category-defaults` > and the removal of the failover mechanism of > `completion-category-overrides`. Then the user can adjust the > `completion-styles` entirely in their configuration. The purpose of `completion-category-defaults` is to improve the OOTB behavior for those who don't customize very much. Those who do customize heavily can easily set it to nil or override it with `completion-category-overrides`. Stefan