[Top][All Lists]

[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: Mon, 4 Nov 2019 18:30:47 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0

On 04.11.2019 1:30, Stefan Monnier wrote:

Indeed, part of the issue is the difference between something like
`basic` and something like `flex`: in `basic` the
completions-common-part is not terribly interesting, whereas in `flex`
it's much more so.

We could use different faces in those two cases, but I feel like it
would be better if we can find a default that works well in both cases.

I concur.

I'm more against using bold for the common part. Underline is
less aggravating.

Hmm... sadly, I find underlying the completions-common-part to be pretty
awful.  So it looks like both bold and underline are out?
Should we look for colors (background? foreground?)?

As suggested previously, a light-grey background might work. Or a dark foreground.

IOW, either

  (set-face-foreground 'completions-common-part "blue3")


  (set-face-background 'completions-common-part "white smoke")

But neither seems optimal for prefix completion still.

Some other ideas:

- No nothing, on the reasoning that 'flex' is not in 'completion-styles' by default. And many users who would add it there would probably use it exclusively, and could thus customize their completions-common-part face to be more informative, to their satisfaction. This suggestion could be in the docs somewhere, maybe in the NEWS section that introduces 'flex'.

- Define a new face that would be applied by callers of completion-all-completions to those completions where the equation "common part == the whole part of the string before the char highlighted by first-difference" doesn't hold true. So all uses of this face would be informative. Although some absences of it might stand out (where a flex match is a strict-prefix one). That face would have a distinct background or foreground.

      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.

I'm having trouble reproducing this. Should I be using icomplete-mode?

No, just `emacs -Q` and then `M-x dovi C-b C-b ?`

OK, thank you. I see it now. Normally one would press TAB, not '?', though.

reply via email to

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