all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Dmitry Gutov <dgutov@yandex.ru>
To: "João Távora" <joaotavora@gmail.com>, "Eli Zaretskii" <eliz@gnu.org>
Cc: Adam Porter <adam@alphapapa.net>, emacs-devel <emacs-devel@gnu.org>
Subject: Re: Feedback on fido-mode
Date: Tue, 10 Mar 2020 00:43:48 +0200	[thread overview]
Message-ID: <5a2a5c65-f112-0c17-fbf7-80cf4d88d5ab@yandex.ru> (raw)
In-Reply-To: <CALDnm53tX3WM3wC5BTtG_kPsi8vtaZBQyLHaUGhoV4iovvKVaQ@mail.gmail.com>

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

  ;;;###autoload
  (define-minor-mode fido-mode



      reply	other threads:[~2020-03-09 22:43 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-07 15:16 Feedback on fido-mode Adam Porter
2020-03-09 14:34 ` jixiuf
2020-03-09 14:42 ` João Távora
2020-03-09 14:50   ` Dmitry Gutov
2020-03-09 15:03     ` João Távora
2020-03-09 15:06       ` Dmitry Gutov
2020-03-09 15:08         ` João Távora
2020-03-09 15:59     ` Drew Adams
2020-03-09 17:12   ` Eli Zaretskii
2020-03-09 17:14     ` João Távora
2020-03-09 22:43       ` Dmitry Gutov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5a2a5c65-f112-0c17-fbf7-80cf4d88d5ab@yandex.ru \
    --to=dgutov@yandex.ru \
    --cc=adam@alphapapa.net \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=joaotavora@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.