[Top][All Lists]

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

Re: Feedback on fido-mode

From: Dmitry Gutov
Subject: Re: Feedback on fido-mode
Date: Tue, 10 Mar 2020 00:43:48 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0

On 09.03.2020 19:14, João Távora wrote:

Thanks. I've now skimmed the list and many of the complaints don't
seem to have an obvious "fix" in fido-mode or even in Emacs itself,
so unless more concrete problems appear, it's unlikely that I will be
changing anything.

Defining named vars for styles config in fido-mode could make it easier to tweak, like Adam tried to do in step 5. Patch below for your consideration.

That's admittedly a half-measure since the 'substring' style is strictly less powerful than 'flex'. And we can't really use spaces for wildcards, so it still won't be as easy to use as Ivy or Helm.

Tweaking the 'flex' style to prefer consecutive matches more strongly could also improve the experience in this particular scenario, although I'm not sure it would be the best choice overall.

diff --git a/lisp/icomplete.el b/lisp/icomplete.el
index 66bc731f67..490bf31cb0 100644
--- a/lisp/icomplete.el
+++ b/lisp/icomplete.el
@@ -320,6 +320,14 @@ icomplete-fido-mode-map
   "Keymap used by `fido-mode' in the minibuffer.")

+(defcustom icomplete-fido-completion-styles '(flex)
+  "Completion styles used by `fido-mode' in the minibuffer."
+  :type 'list)
+(defcustom icomplete-fido-category-defaults nil
+  "Values to use for `completion-category-defaults' in `fido-mode'."
+  :type 'list)
 (defun icomplete--fido-mode-setup ()
   "Setup `fido-mode''s minibuffer."
   (when (and icomplete-mode (icomplete-simple-completing-p))
@@ -328,8 +336,8 @@ icomplete--fido-mode-setup
     (setq-local icomplete-tidy-shadowed-file-names t
                 icomplete-show-matches-on-no-input t
                 icomplete-hide-common-prefix nil
-                completion-styles '(flex)
-                completion-category-defaults nil)))
+                completion-styles icomplete-fido-completion-styles
+ completion-category-defaults icomplete-fido-category-defaults)))

 (define-minor-mode fido-mode

reply via email to

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