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 04:35:13 +0200 Message-ID: <2115dbe9-fc14-e21c-5a04-1a1c0c85ceef@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> <184dffab-4fa4-e265-c8ef-0c088149b1b4@daniel-mendler.de> 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="7460"; 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: Lars Ingebrigtsen , 22324@debbugs.gnu.org To: Daniel Mendler , Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jan 28 03:36:11 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 1nDH7S-0001mo-Pm for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 28 Jan 2022 03:36:10 +0100 Original-Received: from localhost ([::1]:36998 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nDH7R-0006tn-Bi for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 27 Jan 2022 21:36:09 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:59360) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nDH7K-0006tO-IY for bug-gnu-emacs@gnu.org; Thu, 27 Jan 2022 21:36:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:35910) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nDH7K-000244-3d for bug-gnu-emacs@gnu.org; Thu, 27 Jan 2022 21:36:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nDH7J-0000Zw-UJ for bug-gnu-emacs@gnu.org; Thu, 27 Jan 2022 21:36:01 -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 02:36: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.16433373262181 (code B ref 22324); Fri, 28 Jan 2022 02:36:01 +0000 Original-Received: (at 22324) by debbugs.gnu.org; 28 Jan 2022 02:35:26 +0000 Original-Received: from localhost ([127.0.0.1]:57046 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nDH6k-0000Z7-1G for submit@debbugs.gnu.org; Thu, 27 Jan 2022 21:35:26 -0500 Original-Received: from mail-wr1-f53.google.com ([209.85.221.53]:38456) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nDH6g-0000Yr-3m for 22324@debbugs.gnu.org; Thu, 27 Jan 2022 21:35:24 -0500 Original-Received: by mail-wr1-f53.google.com with SMTP id c23so8146888wrb.5 for <22324@debbugs.gnu.org>; Thu, 27 Jan 2022 18:35:22 -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=vpiUV8ip12hWhLA6lDE7Ivoyb0z+/eQ/vjG2bOX16Bw=; b=SxLPI9XiS5wwVl0FJinsFzatk6OgifdLRpiEbjt5OelCHt9WiXb9oPlFflADx+mqWR f3RoIKo8sK1O+EiuSeiOw1kr61WVmkZ3Slur9L8pawlG+06cQVhunk+CDthgQHqIEOnZ hUBoy882yTBa6poS+ydgSgHQnsfmAnp515iCDsh1tqAQh2rwnxpR/dAvlNiRaSnHR5aB Swnn4a/zUPysfc5K6o6/3jSVj779j3vqDmfJRpyHcRvho5/joyGxwwVQ+qC0q1o+2C48 1QRXThDQPHyG/Bvbf1aToaXZetn/xoZ41X+jEUoYZFDd2SjZ+3E+D/TIXkGg1TtXKGhr r1SA== 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=vpiUV8ip12hWhLA6lDE7Ivoyb0z+/eQ/vjG2bOX16Bw=; b=JMi6A/GkvK7FqdsMdgmbgXHy8vPnsyiUXj3QfhLwQOvmhXPapu1m2zpOXKZBkb/nRT Rw5d/1FsaNN2AtSCy64SYIsEP83Gc8ikMy9CBpJJtfQQRLqFSHLNhGvIOFWp+8HocyEE yo3otpKp8BoYBMfRpllOPnOaziAMWrRFWdjw2T4vgarVEAaXgHhsx1ZH1DsB9YDZ707T O4GlMSgU835QhwVg2pgEAkEWTXD4z8FB88Ry2a/5KsFM8cnh2KZJBoBhRZSD42fGe0O/ pmYwVdE6sgvMemvMa4NkuAV0JfinQSQudgMRu7B3FreNRAg4c9Qg/Y/wD4ypadsib9r3 vdEQ== X-Gm-Message-State: AOAM532iIdtJkxBzLMAXmD9EE08+TUovaVKdZSPO60x16+A1BpqHKoEa 1rbUVF08qygHwN+/boMy6y+Eb922ZKE= X-Google-Smtp-Source: ABdhPJzopIXxgAGPVh0QgzfqiJUGRrgAri6lXa4hDtL65CEFGMLj/8Q5+VAfGWg8RdVRFGtjeef4tg== X-Received: by 2002:a05:6000:1862:: with SMTP id d2mr5358555wri.382.1643337316092; Thu, 27 Jan 2022 18:35:16 -0800 (PST) Original-Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id l29sm11362611wms.1.2022.01.27.18.35.14 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 27 Jan 2022 18:35:15 -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:225413 Archived-At: On 26.01.2022 20:59, Daniel Mendler wrote: > On 1/26/22 18:19, Stefan Monnier wrote: >> 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. So maybe we shouldn't do this > and fix the problem at the root? Remove the failover mechanism? I am not > fond of introducing a hack to work around the problematic failover design. Let's remove it, I think. IMHO, backward compatibility hacks are the reason of >50% of existing CAPF's problems: you add one special case, then another, then another. Each step isn't bad by itself (just like Stefan's current suggestion sounds workable), but every one of them complicates reading the code, and writing code to it, even if by a little. If we were designing it from the ground up, we probably wouldn't add an 'ignore' style. We could have added a special value like 't' which would mean the opposite (*do* the fallback, for those users who would want their configs to be just a little bit more terse), just like in the local values of hook variables. But I'm not sure how kludgy the implementation of this will turn out either, and terseness is not the primary end goal for this part of user customization, I think.