On Tue, Jun 2, 2020 at 4:40 PM Tassilo Horn wrote: > > (add-hook 'icomplete-minibuffer-setup-hook 'my-flex-styles) > > (defun my-flex-styles () (setq-local completion-styles '(initials flex))) > > > > Or just use a lambda, which is even shorter. I'd like to avoid a > > duplicate version of completion-styles customization vars. > > I guess fido-mode sets `completion-styles' locally in order to achieve > ido-like defaults, right? Yes, exactly. fido-mode is broadly "choose these nice icomplete-mode settings that make it fake ido-mode". > But as a user with customized > `completion-styles' and `completion-category-overrides', I wish there > was a simple way to just use them with fido, too. 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. > Especially, I can't > see how I could figure out the right category override. Is the > completion metadata accessible in icomplete-minibuffer-setup-hook? I don't know what you mean. Exactly what are you trying do to? Anyway, I'm reasonably confident you can set completion-category-overrides there. > I would like to use fido (more than icomplete) because the keybindings > suite my intuition but I'd like to keep my completion styles and > overrides as I have them. If (some of the keybindings) are the only thing that interest you, you can bind them to icomplete-minibuffer-map. The only thing you can't do this way is this bit of behaviour hidden in `icomplete--sorted-completions' ((and fido-mode (not minibuffer-default) (eq (icomplete--category) 'file)) ;; `fido-mode' has some extra file-sorting ;; semantics even if there isn't a default, ;; which is to bubble "./" to the top if it ;; exists. This makes M-x dired RET RET go to ;; the directory of current file, which is ;; what vanilla Emacs and `ido-mode' both do. `(,(lambda (comp) (string= "./" comp)))) But _that_ could be controlled by an icomplete variable or some other category technique. Also, you can argue for some of the defaults in icomplete to be changed, slowly.