|
From: | Andrew Schwartzmeyer |
Subject: | Re: Add user customization fido-completion-styles |
Date: | Sun, 31 May 2020 21:37:23 -0700 |
Okay so re:
With just “flex” as the completion style, for some reason M-x with no input (from an emacs -q) presents the following candidates as the first: icomplete-fido-delete-char enable-theme url-setup-privacy-info dired-at-point tab-bar-select-tab I can’t see a pattern in these. If I then call a command, I’d want/expect (from experience with other completion frameworks) the next use of M-x to show it as the first candidate, but it doesn’t. Now if I use the aforementioned Orderless package and the minibuffer hook to use it as the completion style in fido, somehow it does some magic such that M-x (which is still bound to execute-extended-command) now has some history sorting! (Working for switch-to-buffer too. :) For repro: (require 'package) (add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t) (package-initialize) (package-refresh-contents) (package-install 'orderless) (add-hook 'icomplete-minibuffer-setup-hook (lambda () (setq-local completion-styles '(orderless)))) (fido-mode) So yeah, I’m off to look through Orderless to see what magic it does that sorts the candidates for M-x (without having do anything like what smex does!). Cheers, Andy |
[Prev in Thread] | Current Thread | [Next in Thread] |