[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: BIKESHED: completion faces

From: João Távora
Subject: Re: BIKESHED: completion faces
Date: Fri, 8 Nov 2019 15:09:31 +0000

On Fri, Nov 8, 2019 at 2:02 PM Eli Zaretskii <address@hidden> wrote:
> > From: João Távora <address@hidden>
> > Cc: address@hidden,  address@hidden,  address@hidden,
> >   address@hidden
> > Date: Fri, 08 Nov 2019 10:15:02 +0000
> >
> > It's pretty simple.  In that mail I made three statements, you objected
> > to the second, which lead me to think that you agree with the other
> > two.
> I'm sorry for causing you to misunderstand what I was saying.
> > 1. Alias 'completions-first-difference' to 'completion-emphasis'
> > 2. Alias 'completions-common-part' to 'completion-secondary-emphasis'
> > 3. Make 'flex' use only completion-emphasis to highlight the
> >    pattern in the candidates.
> We are miscommunicating.  These faces aren't flex-specific, and I was
> talking about their names in the context of any completion style,
> including, but not limited to flex.

I know that. Therefore I chose the names to work in any context, so
they aren't specific to 'flex', nor specific to 'basic' or 'p-c-m' or
any other style.

> In any case, I consider both completion-emphasis and
> completion-secondary-emphasis to be sub-optimal names, because they
> say nothing at all regarding what is being emphasized.

Because, in my opinion, if they are to be useful across different styles,
their names shouldn't make the commitment to say exactly the thing
they highlight. Their names should rather state "I am the face for
whatever the completion style believes is visually relevant"  and "I am the
face for whatever ... is visually relevant at a secondary level".

> > >>   fabrobazor
> > >>   ^   ^   ^
> > >>   `---`---`----- I want these bold by default in the future
> > >>
> > >> no change to the 'basic/prefix' completion.
> > >
> > > I understand that you want to highlight both f, o, o, and r, but the
> > > latter with a different face.  If my understanding is incorrect,
> >
> > It is incorrect indeed: 'r' is should have the same face as 'a' or 'b'.
> Did I say that _only_ r will be highlighted with that face?

I don' think so. I think you can read what you said above.

I confirmed your sentence "if my understanding is incorrect". Because
I _don't_ intend flex to  "highlight" r at all, or 'a' or any other character
except 'f', 'o' and ' o'.  So these characters ('a','b','r' and 'z' in this
example) should, for now, have the same face, 'default'. We can think
about the value of highlighting other neighboring characters later.

> I'm okay with highlighting a and b as well in this example, provided
> that typing "faoo" will include "fabrobazor" in the results.

It will indeed include that in the results.  But in that your
example only 4 characters should be highlighted: f,
a (the first one),o, and o .  So no 'b'.

> However, please note that r is somewhat different from a and b,
> because to type r I don't need to move point, I need just to type the
> letter, whereas the other two require me to use cursor motion commands
> first.  Not sure if this difference is significant enough to justify
> yet another face (and another round of bikeshedding).

Exactly, I don't think so. Not at this moment. But your concern
could be addressed.

> > > then what will the other face be used for?
> >
> > Nothing.  I don't (yet) see 'flex' as needing secondary kinds of
> > emphasis.
> What about styles other than flex?

They keep using it for whatever they think is secondary.  'basic', for
one, will keep using it for the prefix substring in each candidate.

> That would mean this face is used inconsistently: in basic and other
> similar styles it highlights the character(s) that narrow(s) the
> selection of candidates, while in flex they will highlight the
> characters already typed by the user.  Is that correct?

Yes it is, but "this face" would now be called "completion-emphasis"
, not "completion-narrower" or "completion-already-typed" or
"completion-first-difference".   That's why the renames are

> If so, I object to this inconsistency.

OK. It's good to finally clear that up. But when I talked about this topic
ealier in the thread you replied this.


JT> However some people have made a point that there should be
JT> some kind of consistency at this level between completion styles, that
JT> the thing emphasized in 'prefix/basic' should have some semantic
JT>relation to the thing emphasized thing for 'flex' and 'substring' too.

EZ > Sorry, but I see no reason for any kind of "consistency" here.  We
EZ> need to highlight to help the user specify the right completion
EZ> candidate, all the rest is secondary IMO.

Maybe you weren't understanding my proposal completely back then,
but in any case your "then-reply" is exactly, verbatim, word for word, what
I would say to you in this situation.

Take care,

reply via email to

[Prev in Thread] Current Thread [Next in Thread]