[Top][All Lists]

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

Re: BIKESHED: completion faces

From: Eli Zaretskii
Subject: Re: BIKESHED: completion faces
Date: Fri, 08 Nov 2019 17:33:55 +0200

> From: João Távora <address@hidden>
> Date: Fri, 8 Nov 2019 15:09:31 +0000
> Cc: Ergus <address@hidden>, emacs-devel <address@hidden>, 
>       Stefan Monnier <address@hidden>, Dmitry Gutov <address@hidden>
> > > >>   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'.

'b' comes from what you originally wrote.

I admit I don't understand why 'b' won't be highlighted: wouldn't
typing "fobo" narrow the list of candidates shown by "foo"?  If so,
'b' should be highlighted like 'a' and 'r', no?

> > 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
> important.

I don't think that names that obfuscate the use of the face is a good
idea.  I understood the reason for renaming to be that "first
difference" and "common part" don't necessarily make sense for flex
and other similar styles, but the solution should be to make the names
more general, not obfuscated.  "First" and "second" or "primary" and
"secondary" are too opaque to be useful, IMO.

> > 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.
> https://lists.gnu.org/archive/html/emacs-devel/2019-11/msg00176.html

Yes, I've changed my mind after understanding better what you propose.

reply via email to

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