From: Lars Ingebrigtsen <larsi@gnus.org>
To: Dmitry Gutov <dgutov@yandex.ru>
Cc: 22324@debbugs.gnu.org
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 [thread overview]
Message-ID: <87lf0yjwpw.fsf@gnus.org> (raw)
In-Reply-To: <a1f74c9e-0043-9be9-5739-e87e58dd8fa8@yandex.ru> (Dmitry Gutov's message of "Mon, 6 Dec 2021 04:16:52 +0300")
Dmitry Gutov <dgutov@yandex.ru> 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
next prev parent reply other threads:[~2021-12-06 2:25 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-07 20:27 bug#22324: 25.0.50; completion-category-defaults style doesn't override completion-styles (gets prepended instead) Dmitry Gutov
2016-01-08 12:17 ` Eli Zaretskii
2016-01-08 12:21 ` Dmitry Gutov
2016-01-08 12:26 ` Eli Zaretskii
2016-01-08 12:30 ` Dmitry Gutov
2016-01-08 15:31 ` Eli Zaretskii
2021-12-02 9:10 ` Lars Ingebrigtsen
2021-12-02 9:45 ` Eli Zaretskii
2021-12-06 1:16 ` Dmitry Gutov
2021-12-06 2:25 ` Lars Ingebrigtsen [this message]
2021-12-07 1:35 ` Dmitry Gutov
2021-12-07 20:28 ` Lars Ingebrigtsen
2021-12-07 22:46 ` Dmitry Gutov
2021-12-09 1:09 ` Lars Ingebrigtsen
2022-01-21 13:46 ` Lars Ingebrigtsen
2022-01-24 2:03 ` Dmitry Gutov
2022-01-24 9:46 ` Lars Ingebrigtsen
2022-01-25 2:27 ` Dmitry Gutov
2022-01-25 12:19 ` Lars Ingebrigtsen
2022-01-26 1:43 ` Dmitry Gutov
2022-01-26 2:31 ` Daniel Mendler
2022-01-26 13:36 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-01-26 13:49 ` Daniel Mendler
2022-01-26 17:19 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-01-26 18:59 ` Daniel Mendler
2022-01-26 22:57 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-01-26 23:32 ` Daniel Mendler
2022-01-27 6:52 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-01-28 2:35 ` Dmitry Gutov
2022-01-28 11:54 ` Daniel Mendler
2022-01-28 16:56 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-01-28 22:06 ` Dmitry Gutov
2022-01-28 23:18 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-01-29 1:57 ` Dmitry Gutov
2022-01-28 2:37 ` Dmitry Gutov
2022-01-28 16:59 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-01-28 21:23 ` Dmitry Gutov
2022-01-28 2:39 ` Dmitry Gutov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87lf0yjwpw.fsf@gnus.org \
--to=larsi@gnus.org \
--cc=22324@debbugs.gnu.org \
--cc=dgutov@yandex.ru \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).