From: "João Távora" <joaotavora@gmail.com>
To: "João Távora" <joaotavora@gmail.com>,
"Andrew Schwartzmeyer" <andrew@schwartzmeyer.com>,
emacs-devel <emacs-devel@gnu.org>
Subject: Re: Add user customization fido-completion-styles
Date: Tue, 2 Jun 2020 16:55:45 +0100 [thread overview]
Message-ID: <CALDnm52wXq-B8LJVsMxuDdn7=RqvhLvSsbSQEHTRG9wUT=L6CQ@mail.gmail.com> (raw)
In-Reply-To: <87lfl5fpbx.fsf@gnu.org>
[-- Attachment #1: Type: text/plain, Size: 2379 bytes --]
On Tue, Jun 2, 2020 at 4:40 PM Tassilo Horn <tsdh@gnu.org> 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.
[-- Attachment #2: Type: text/html, Size: 3044 bytes --]
next prev parent reply other threads:[~2020-06-02 15:55 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CALDnm52wXq-B8LJVsMxuDdn7=RqvhLvSsbSQEHTRG9wUT=L6CQ@mail.gmail.com' \
--to=joaotavora@gmail.com \
--cc=andrew@schwartzmeyer.com \
--cc=emacs-devel@gnu.org \
/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 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).