emacs-devel
[Top][All Lists]
Advanced

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

Re: face vs. mouse-face text property


From: Eli Zaretskii
Subject: Re: face vs. mouse-face text property
Date: Sat, 21 Jan 2012 12:09:46 +0200

> From: Michael Heerdegen <address@hidden>
> Cc: address@hidden
> Date: Fri, 20 Jan 2012 21:18:47 +0100
> 
> Eli Zaretskii <address@hidden> writes:
> 
> > Could you please describe your scenario in more detail?  Empty lines
> > have no text, so it's unclear how can you talk about "clickable text"
> > in that case.
> 
> I'm talking about completion candidates that can be selected with the
> mouse.  I stumbled over this problem in Icicles, but it also appears in
> vanilla Emacs.  Try this:
> 
> (completing-read "foo: " '(("aaaa") ("bbbb") ("\n") ("cccc")))
> 
> The "\n" candidate gets no visible mouse-face when you move the mouse
> over it in *Completions*, so the user doesn't see where to click to
> select it.

Thanks.  But that's not what I meant.  You gave a test case, but
didn't explain how come "\n" winded up in the list of completion
candidates.

But let's take this particular example: How would you like the newline
to be displayed for the user to understand there's a selectable
newline there?  If we replace the "\n" with a "_", the *Completions*
display is like this:

  Possible completions are:
  _                  aaaa
  bbbb               cccc

What would you say the display should look like with \n instead of _,
and which part(s) of the corresponding screen line would need to be
highlighted when the mouse hovers over the newline?  Most importantly,
given the display you want to see, how would the user understand she
is suggested a selectable newline?

> Such completion candidates are a bit exotic, right, but they _do_ appear
> in some situations.

Well, I asked for those _situations_ leading to these lists of
candidates to be described.  TIA.

Also, are completion candidates the only situations where these
problems arise?  The original issue you raised was much more general,
AFAIU.

Btw, in Emacs 23, you couldn't even select such a newline, neither
with a mouse click nor with a RET: you'd get "\naaaa" instead of a
lone "\n".  In Emacs 24, at least you can select the newline alone.



reply via email to

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