emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Add user customization fido-completion-styles


From: João Távora
Subject: Re: Add user customization fido-completion-styles
Date: Tue, 02 Jun 2020 18:03:41 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.91 (gnu/linux)

Tassilo Horn <tsdh@gnu.org> writes:

>> You can try icomplete-mode directly if you don't like fido-mode's.
>> fido-mode is a small customization layer on top of it that makes some
>> choices for you.
>
> Yes, I know.  And except for the change in completion-styles, I like it.
> Not so much for plain icomplete-mode where the fido keybindings are
> missing.

You can grab all the bindings of fido-mode in one swoop like this, I
think you can put this:

  (use-local-map (make-composed-keymap icomplete-fido-mode-map
                                       (current-local-map)))

Somewhere in your icomplete-minibuffer-setup-hook.

> I don't know when this happens, but it might be that it is before
> `icomplete-minibuffer-setup-hook' is called and then setting
> `completion-category-overrides' wouldn't have an effect.  I'll test...

If it helps, here is a list of the variables that fido-mode sets for
you.

    (setq-local icomplete-tidy-shadowed-file-names t
                icomplete-show-matches-on-no-input t
                icomplete-hide-common-prefix nil
                completion-styles '(flex)
                completion-flex-nospace nil
                completion-category-defaults nil)

It seems to leave `completion-category-overrides' alone, so you should
be able to use to have the last word.  If completion-category-overrides
were to allow `t` entries, or some kind of catch-all, then it would be
the "ultimate" last word.

This would make sense to me, and fido-mode would commit to not touching
that variable explicitly.  I think this would make an(other) elegant
solution for this question, don't you think?

João



reply via email to

[Prev in Thread] Current Thread [Next in Thread]