From: Tassilo Horn <tsdh@gnu.org>
To: Samuel Wales <samologist@gmail.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: can vertico approximate this ido setup?
Date: Mon, 05 Jun 2023 09:08:03 +0200 [thread overview]
Message-ID: <87jzwijs04.fsf@gnu.org> (raw)
In-Reply-To: <CAJcAo8us7bXHLFDPNeyX6Kp8cFEoiuR8NENbHx-mkpYBNCLnrQ@mail.gmail.com>
Samuel Wales <samologist@gmail.com> writes:
> On 6/4/23, Tassilo Horn <tsdh@gnu.org> wrote:
>
>> FWIW, I see that you put the flex and orderless completion style in
>> completion-styles. You have to be aware that at least flex matches very
>> distant candidates, e.g., foo matches after-some-root. Ok, that's the
>
> ok.
>
> my sequening sounds like it could be bad.
Since you are pushing, you append very unspecific styles at the front,
yes.
> to me, above would be more desirable if f were not a single letter.
> to match above i might do ftoot not foo or foot.
>
> i think ido-clever-match got that right:
> https://github.com/Bogdanp/ido-clever-match . it is almost perfect.
You might want to play around with flex-score-match-tightness for the
flex style,
> btw i have trouble understanding the emacs manual on completion. the
> completion styles don't make sense to me whent they talk about text
> after point. idk what i am missing there.
Do emacs -Q (and probably set one completion-style at a time), enter
something and move point forward again. At least some styles seem to
ignore text after point or at least handle it differently.
> here is a big long quote from ido-clever-match exactly what it does.
> i wonder if vertico/orderless can do it similarly?
Vertico doesn't come into play here and I don't know orderless well
enough. I think it's similar to partial-completion where the order of
words doesn't matter.
>> purpose of the style but I think it's only useful if you place it at the
>> very end of completion-styles with more exact styles at the beginning,
>> e.g. (partial-completion substring flex).
>
> ok. even after orderless?
Yes, think (... orderless flex) would be most sensible but of course
that's a matter of preference.
>> Also, I have the experience that some completion styles work great for
>> one kind/category of completion but not for others, so I use
>> completion-category-overrides.
>>
>> --8<---------------cut here---------------start------------->8---
>> (setopt completion-styles '(partial-completion substring flex))
>
> ok so we are out of the territory of cl-pushnew or add-to-list i think
> now and i have to do my own setopt. like setq?
Yes, setopt is like setq but would also do what the customize machinery
would do. But it doesn't make a difference for those variables. Using
setq/setopt instead of cl-pushnew/add-to-list just ensures the order and
that you get what you want in cases the defaults might change.
>> (setopt completion-category-overrides
>> '((project-file
>> (styles partial-completion substring initials))
>
>> (file
>> (styles partial-completion substring initials))
>
> i'd want almple or alcp to match .../alpha-completion.el. not sure if
> this would do it without flex?
I think, it does. One thing to note is that with completion-styles (a b
c) is that b won't kick in as long as a delivers matches and c won't
kick in as long as b finds matches.
Bye,
Tassilo
next prev parent reply other threads:[~2023-06-05 7:08 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-04 1:40 can vertico approximate this ido setup? Samuel Wales
2023-06-04 6:41 ` Michael Albinus
2023-06-04 7:08 ` Samuel Wales
2023-06-04 8:57 ` Tassilo Horn
2023-06-05 1:07 ` Samuel Wales
2023-06-05 7:08 ` Tassilo Horn [this message]
2023-06-11 0:54 ` Samuel Wales
2023-06-11 1:05 ` Samuel Wales
2023-06-11 13:26 ` [External] : " Drew Adams
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=87jzwijs04.fsf@gnu.org \
--to=tsdh@gnu.org \
--cc=help-gnu-emacs@gnu.org \
--cc=samologist@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.