unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Add user customization fido-completion-styles
@ 2020-05-31 21:02 Andrew Schwartzmeyer
  2020-05-31 23:43 ` João Távora
  0 siblings, 1 reply; 23+ messages in thread
From: Andrew Schwartzmeyer @ 2020-05-31 21:02 UTC (permalink / raw)
  To: emacs-devel; +Cc: joaotavora

[-- Attachment #1: Type: text/plain, Size: 772 bytes --]

Hi,

Users of fido-mode (like me) may want to customize the completion style it uses, so add a variable to allow them to do so.

For instance, I really like using the “initials” style so “vlm” quickly completes visual-line-mode, and then falling back to flex. There are also neat packages like orderless (https://github.com/oantolin/orderless <https://github.com/oantolin/orderless>) which add a new completion-style, which folks may want to plug-in and use. Anyway, it seems like it ought to be customizable.

Thanks,

Andy

P.S. I wish “flex” were a bit faster. On my circa 2012 MacBook, M-x is noticeably slow with “flex” for commands. Also, I don’t know what “:version” to put on the defcustom, and the docs could be improved a bit.


[-- Attachment #2.1: Type: text/html, Size: 1310 bytes --]

[-- Attachment #2.2: 0001-Add-user-customization-fido-completion-styles.patch --]
[-- Type: application/octet-stream, Size: 1316 bytes --]

From 59177be2198aa9aa9d12d730f732456caf187f9e Mon Sep 17 00:00:00 2001
From: Andrew Schwartzmeyer <andrew@schwartzmeyer.com>
Date: Sun, 31 May 2020 13:55:13 -0700
Subject: [PATCH] Add user customization fido-completion-styles

Users of fido-mode may want to customize the completion style it uses,
so add a variable to allow them to do so.
---
 lisp/icomplete.el | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/lisp/icomplete.el b/lisp/icomplete.el
index c12f3901f..40626663f 100644
--- a/lisp/icomplete.el
+++ b/lisp/icomplete.el
@@ -134,6 +134,12 @@ icompletion is occurring."
   :type 'hook
   :group 'icomplete)
 
+(defcustom fido-completion-styles '(flex)
+  "Completion styles used by `fido-mode'.
+See `completion-styles'"
+  :type completion--styles-type
+  :group 'icomplete)
+
 
 ;;;_* Initialization
 
@@ -328,7 +334,7 @@ if that doesn't produce a completion match."
     (setq-local icomplete-tidy-shadowed-file-names t
                 icomplete-show-matches-on-no-input t
                 icomplete-hide-common-prefix nil
-                completion-styles '(flex)
+                completion-styles fido-completion-styles
                 completion-flex-nospace nil
                 completion-category-defaults nil)))
 
-- 
2.26.0


[-- Attachment #2.3: Type: text/html, Size: 226 bytes --]

^ permalink raw reply related	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2020-06-02 20:51 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-31 21:02 Add user customization fido-completion-styles Andrew Schwartzmeyer
2020-05-31 23:43 ` João Távora
2020-05-31 23:59   ` Dmitry Gutov
2020-06-01  0:21     ` João Távora
2020-06-01  0:37   ` Andrew Schwartzmeyer
2020-06-01  4:37     ` Andrew Schwartzmeyer
2020-06-02 11:14       ` João Távora
2020-06-02 16:14         ` Drew Adams
2020-06-02 17:51           ` João Távora
2020-06-02 18:11             ` Eli Zaretskii
2020-06-02 18:24               ` João Távora
2020-06-02 18:35                 ` Eli Zaretskii
2020-06-02 19:11                   ` João Távora
2020-06-02 19:25                     ` Eli Zaretskii
2020-06-02 20:00                       ` João Távora
2020-06-02 20:51             ` Drew Adams
2020-06-02 15:40   ` Tassilo Horn
2020-06-02 15:55     ` João Távora
2020-06-02 16:47       ` Tassilo Horn
2020-06-02 17:03         ` João Távora
2020-06-02 18:05           ` Tassilo Horn
2020-06-02 17:10         ` Tassilo Horn
2020-06-02 19:28           ` João Távora

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).