From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Dmitry Gutov <dgutov@yandex.ru>
Cc: emacs-devel@gnu.org
Subject: Re: BIKESHED: completion faces
Date: Tue, 29 Oct 2019 21:49:15 -0400 [thread overview]
Message-ID: <jwva79jyqrp.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <b7e361ee-6fc4-b52e-3bd2-1f6862bbcf23@yandex.ru> (Dmitry Gutov's message of "Wed, 30 Oct 2019 01:11:52 +0200")
> I wonder if it's *that* important, to be able to see the matching chars.
It has an explanatory value which makes the completion-style more
understandable (e.g. I'm pretty sure there are still users who don't
know about the `partial-completion` style that's enabled by default:
they just occasionally see completion lists which they don't understand
and shrug it off).
But no, I don't know how important it is (I do find it useful when
implementing/debugging the code to make sure it worked right ;-)
This said, it seems that highlighting the common part is the "standard"
behavior is all other completion systems whereas highlighting the "first
difference" seems to be specific to Emacs.
>> For this reason, it is common in other completion systems to
>> highlight the "common" part somehow (e.g. underline, bold, ...).
> Personally, I'm not a big fan of underline, italic and even bold (unless
> it's used sparingly, like it is now). With that said...
FWIW, I'm no big fan of underline (maybe it's the LaTeX influence speaking).
But I found it tolerable for first-difference after trying it out.
Stefan
> The -first-difference face shows actionable info: the next character
> to type, to narrow down the completions list as much as possible while
> ensuring that a given completion is still in.
[...]
> Furthermore, the position of -first-difference also hints at what
> characters were matched (definitely ones before it).
[...]
> The "first difference" character is simply the one after the last
> segment of the common part, isn't it?
Agreed.
This is largely irrelevant for the choice of bikeshed color, but
I figure it's as a good a time as any to clarify that the above, while
largely true is not quite right either:
It's a bit more subtle than that (and the "first-difference" name is
a misnomer, due to history): when I revamped the default completion
system for Emacs-24, adding partial-completion (as well as `basic` which
is a bit more sophisticated than just "prefix completion", in reality),
I had to decide what to do with "first-difference" since it doesn't have
as clear a meaning as for the plain old prefix completion. So the way
I adapted it to the new reality is that "first difference" now really
means "first char after point". If you do
M-x dovi C-b C-b ?
you'll see that `completions-first-difference` is applied to the "c"
of the "doc-view..." commands because that's the first character after
the position in the candidate that corresponds to the position of
point in the pattern.
So strictly speaking:
- No, there can also be common-part characters after first-difference
- Also, it's not always the case that the "first-difference" character
is "the next character to type, to narrow down the completions list
as much as possible while ensuring that a given completion is still
in". Two reasons for that:
1- the "first-difference" character may already be part of the
"common part". E.g. `M-x revert C-b ?` will show the `t` with
both `completions-first-difference` and `completion-common-part`
and typing `t` will actually end up with a pattern that doesn't
match anything.
2- depending on the completion style, there might be further
character that still keep the desired completion while
eliminating more of the others.
For example let's say you want to run
`doc-view-fit-height-to-window`; after you do `M-x doc-view- ?`
you'll see that the `f` is highlighted as first-difference
but if hit `f` you still have 5 remaining choices, whereas if you
hit `h` your choice is the only remaining one.
But by and large, these are exceptions. Point (2) above is a bit more
true for `flex`, but I don't think it matters very much anyway.
next prev parent reply other threads:[~2019-10-30 1:49 UTC|newest]
Thread overview: 169+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-27 1:58 BIKESHED: completion faces Stefan Monnier
2019-10-27 11:34 ` João Távora
2019-10-27 21:45 ` Juri Linkov
2019-10-28 0:43 ` João Távora
2019-10-28 22:29 ` Juri Linkov
2019-10-28 23:31 ` João Távora
2019-10-29 21:53 ` Juri Linkov
2019-10-29 22:09 ` Dmitry Gutov
2019-10-29 22:57 ` João Távora
2019-10-29 1:12 ` Stefan Monnier
2019-10-29 21:58 ` Juri Linkov
2019-10-29 22:59 ` João Távora
2019-10-29 23:11 ` Dmitry Gutov
2019-10-30 1:49 ` Stefan Monnier [this message]
2019-11-03 21:53 ` Dmitry Gutov
2019-11-03 23:30 ` Stefan Monnier
2019-11-04 16:30 ` Dmitry Gutov
2019-11-04 18:31 ` Stefan Monnier
2019-11-04 22:52 ` João Távora
2019-11-04 23:25 ` Dmitry Gutov
2019-11-05 11:10 ` João Távora
2019-11-05 14:57 ` Dmitry Gutov
2019-11-05 15:44 ` Stefan Monnier
2019-11-05 16:30 ` João Távora
2019-11-05 21:27 ` Juri Linkov
2019-11-05 23:06 ` Stefan Monnier
2019-11-05 22:01 ` Dmitry Gutov
2019-11-06 0:18 ` Stefan Monnier
2019-11-06 8:24 ` Dmitry Gutov
2019-11-06 13:42 ` VOTE: Changing completions-common-part face's default Stefan Monnier
2019-11-06 17:16 ` João Távora
2019-11-06 17:26 ` Dmitry Gutov
2019-11-06 18:10 ` João Távora
2019-11-06 22:20 ` Dmitry Gutov
2019-11-06 22:42 ` João Távora
2019-11-06 22:57 ` Dmitry Gutov
2019-11-06 23:14 ` Stefan Monnier
2019-11-07 8:09 ` Dmitry Gutov
2019-11-07 10:27 ` João Távora
2019-11-07 13:27 ` Yuri Khan
2019-11-07 13:52 ` João Távora
2019-11-07 14:41 ` Yuri Khan
2019-11-07 14:57 ` João Távora
2019-11-07 16:04 ` Stefan Monnier
2019-11-07 16:09 ` João Távora
2019-11-07 14:43 ` Dmitry Gutov
2019-11-07 14:54 ` João Távora
2019-11-07 14:33 ` Dmitry Gutov
2019-11-07 14:44 ` João Távora
2019-11-07 14:58 ` Dmitry Gutov
2019-11-07 15:54 ` João Távora
2019-11-07 16:57 ` Drew Adams
2019-11-08 23:38 ` Dmitry Gutov
2019-11-09 0:24 ` João Távora
2019-11-09 1:53 ` Drew Adams
2019-11-09 21:57 ` Juri Linkov
2019-11-09 22:17 ` João Távora
2019-11-09 7:30 ` Eli Zaretskii
2019-11-09 11:42 ` João Távora
2019-11-09 12:04 ` Eli Zaretskii
2019-11-09 13:22 ` João Távora
2019-11-09 16:44 ` Drew Adams
2019-11-07 15:08 ` Stefan Monnier
2019-11-08 10:15 ` Dmitry Gutov
2019-11-08 19:19 ` Stefan Monnier
2019-11-08 19:43 ` Eli Zaretskii
2019-11-08 21:42 ` Stefan Monnier
2019-11-09 6:52 ` Eli Zaretskii
2019-11-09 15:25 ` Stefan Monnier
2019-11-09 15:52 ` Eli Zaretskii
2019-11-09 16:17 ` Stefan Monnier
2019-11-08 20:11 ` Dmitry Gutov
2019-11-08 22:57 ` João Távora
2019-11-06 23:12 ` Stefan Monnier
2019-11-05 16:31 ` BIKESHED: completion faces João Távora
2019-11-05 22:22 ` Dmitry Gutov
2019-11-05 23:11 ` João Távora
2019-11-06 8:18 ` Dmitry Gutov
2019-11-06 8:53 ` João Távora
2019-11-06 15:16 ` Dmitry Gutov
2019-11-06 15:56 ` João Távora
2019-11-06 10:25 ` João Távora
2019-11-06 15:11 ` Dmitry Gutov
2019-11-06 15:31 ` João Távora
2019-11-06 15:43 ` Dmitry Gutov
2019-11-06 15:48 ` João Távora
2019-11-06 16:01 ` Dmitry Gutov
2019-11-06 16:20 ` Eli Zaretskii
2019-11-06 21:36 ` Juri Linkov
2019-11-07 14:25 ` Eli Zaretskii
2019-11-07 22:40 ` Juri Linkov
2019-11-08 6:43 ` Eli Zaretskii
2019-11-06 16:12 ` Eli Zaretskii
2019-11-06 16:14 ` João Távora
2019-11-06 0:24 ` Stefan Monnier
2019-11-05 18:36 ` Stefan Monnier
2019-11-05 18:51 ` Eli Zaretskii
2019-11-05 19:16 ` João Távora
2019-11-05 19:23 ` Eli Zaretskii
2019-11-05 21:43 ` João Távora
2019-11-06 16:03 ` Eli Zaretskii
2019-11-06 16:26 ` João Távora
2019-11-06 18:07 ` Eli Zaretskii
2019-11-06 18:14 ` João Távora
2019-11-06 18:29 ` Eli Zaretskii
2019-11-06 18:48 ` João Távora
2019-11-06 20:51 ` Ergus
2019-11-07 14:08 ` Eli Zaretskii
2019-11-07 14:28 ` João Távora
2019-11-07 14:47 ` Eli Zaretskii
2019-11-07 15:00 ` João Távora
2019-11-07 15:40 ` Eli Zaretskii
2019-11-07 16:00 ` João Távora
2019-11-07 17:39 ` Eli Zaretskii
2019-11-07 17:53 ` João Távora
2019-11-07 18:16 ` Eli Zaretskii
2019-11-07 18:37 ` João Távora
2019-11-07 21:07 ` Eli Zaretskii
2019-11-07 21:43 ` João Távora
2019-11-08 6:35 ` Eli Zaretskii
2019-11-08 10:15 ` João Távora
2019-11-08 14:02 ` Eli Zaretskii
2019-11-08 15:09 ` João Távora
2019-11-08 15:33 ` Eli Zaretskii
2019-11-08 16:01 ` João Távora
2019-11-08 16:16 ` Eli Zaretskii
2019-11-08 16:27 ` João Távora
2019-11-08 17:05 ` Eli Zaretskii
2019-11-08 17:21 ` João Távora
2019-11-08 19:06 ` Eli Zaretskii
2019-11-08 22:49 ` João Távora
2019-11-09 6:57 ` Eli Zaretskii
2019-11-09 11:20 ` João Távora
2019-11-09 11:51 ` Eli Zaretskii
2019-11-09 12:14 ` João Távora
2019-11-09 12:19 ` Eli Zaretskii
2019-11-09 13:29 ` João Távora
2019-11-09 13:52 ` João Távora
2019-11-09 15:31 ` Eli Zaretskii
2019-11-09 18:51 ` João Távora
2019-11-10 9:18 ` Dmitry Gutov
2019-11-14 9:45 ` Eli Zaretskii
2019-11-14 10:40 ` Dmitry Gutov
2019-11-14 14:16 ` Eli Zaretskii
2019-11-14 14:19 ` João Távora
2019-11-14 14:42 ` Eli Zaretskii
2019-11-14 14:49 ` João Távora
2019-11-16 20:10 ` Juri Linkov
2019-11-16 23:40 ` João Távora
2019-11-17 17:27 ` Eli Zaretskii
2019-11-17 17:47 ` João Távora
2019-11-08 12:58 ` Stefan Monnier
2019-11-08 13:08 ` João Távora
2019-11-08 14:07 ` Eli Zaretskii
2019-11-06 20:34 ` Drew Adams
2019-11-06 20:42 ` Eli Zaretskii
2019-11-05 21:40 ` Dmitry Gutov
2019-11-05 23:02 ` Stefan Monnier
2019-11-05 18:54 ` João Távora
2019-11-05 19:07 ` Stefan Monnier
2019-11-05 21:39 ` Dmitry Gutov
2019-11-05 21:54 ` João Távora
2019-11-05 21:55 ` Dmitry Gutov
2019-11-05 21:54 ` Dmitry Gutov
2019-11-05 21:58 ` João Távora
2019-11-05 22:03 ` Dmitry Gutov
2019-11-05 22:07 ` João Távora
[not found] <<jwvwocr7yt6.fsf-monnier+emacs@gnu.org>
[not found] ` <<b7e361ee-6fc4-b52e-3bd2-1f6862bbcf23@yandex.ru>
[not found] ` <<jwva79jyqrp.fsf-monnier+emacs@gnu.org>
[not found] ` <<4c5631d4-9dfd-04c6-c573-b83c67fcc2fa@yandex.ru>
[not found] ` <<jwvd0e8k0gi.fsf-monnier+emacs@gnu.org>
[not found] ` <<c6718807-b3fc-5bed-6a4b-b1ccc52649de@yandex.ru>
[not found] ` <<87pni7p83l.fsf@gmail.com>
[not found] ` <<fdec6d86-e1b9-19cb-18aa-ef835972f315@yandex.ru>
[not found] ` <<jwv8soub2u5.fsf-monnier+emacs@gnu.org>
[not found] ` <<83h83ignrz.fsf@gnu.org>
[not found] ` <<CALDnm50SjOOKOiZVmdNJc8zVsfZXbPQcBOYoeJe9MbO62Lartw@mail.gmail.com>
[not found] ` <<83ftj2gma8.fsf@gnu.org>
[not found] ` <<87zhhaxalt.fsf@gmail.com>
[not found] ` <<83bltpgffr.fsf@gnu.org>
[not found] ` <<CALDnm50YW0cjdN1Z7eJs6K-dXpfwp1VOe3NPi6WH+iF1oU1HmA@mail.gmail.com>
[not found] ` <<83tv7gg9oz.fsf@gnu.org>
[not found] ` <<7916c845-1ce2-4abd-937f-09036cd60bec@default>
[not found] ` <<83pni4g2iq.fsf@gnu.org>
2019-11-06 21:40 ` Drew Adams
2019-11-07 14:19 ` Eli Zaretskii
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=jwva79jyqrp.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=dgutov@yandex.ru \
--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 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.