emacs-devel
[Top][All Lists]
Advanced

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

Re: BIKESHED: completion faces


From: Dmitry Gutov
Subject: Re: BIKESHED: completion faces
Date: Wed, 6 Nov 2019 00:01:33 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0

On 05.11.2019 17:44, Stefan Monnier wrote:
I've tried to implement my idea, but somehow the added highlighting gets
eaten before the buffer is displayed. But the attached patch should
illustrate it anyway.

Regardless of how we implement this, the question remains: do we want to
highlight the common-part of the prefix/basic completion differently
from the other cases?

We might. But I'd rather do that per-completion rather per completion style, hence the proposed patch.


         Stefan


PS: I think the approach used in your patch will lead to undesirable
behavior when some matches (but not all) have all chars before
first-diff highlighted with common-part.  E.g.

     src/emacs -Q --eval '(setq completion-styles (quote (partial-completion)))'
     M-x re-b ?

where `re-builder` would be highlighted with a "trivial common part"
                     ^ won't be                   ^nontrivial

whereas `rename-buffer` would be highlighted differently.

Indeed. That's the whole idea. "re" and "-b" in "rename-buffer" would indeed be highlighted since the match is nontrivial.

You might consider it as a feature, of course.

Yes. That's the idea.

As for how it would work in practice, we'll have to see once the patch is functioning.



reply via email to

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