Subject: bug#13399: 24.3.50; Word-wrap can't wrap at zero-width space U-200B

From: Eli Zaretskii <[email-masked]>
Date: Fri, 11 Jan 2013 16:49:01 +0200

> Date: Fri, 11 Jan 2013 15:30:04 +0100
> From: martin rudalics <[email-masked]>
> CC: [email-masked]
> 
>  >>  Does this also mean that I can separate text properties of
>  >> adjacent words by inserting a zero-width space between them?
>  >
>  > Yes, I think so (if I understand correctly what you mean).
> 
> Never mind, it works.  What I meant was that when, for example, I have
> two adjacent parts of text with the same mouse-face property and the
> mouse hovers over one of the words, the other word gets highlighted as
> well.  Maybe it's just stickyness or whatever

No, it's because, when mouse highlight finds a character with
mouse-face, it looks forward for the first character without that
face, and highlights everything in between.

>  >> Two functions: One to get the width of some arbitrary buffer text in
>  >> pixels and one to get the full height of a buffer text line in pixels.
>  >> The former would be used for doing word-wrapping variants in Lisp, the
>  >> latter for fitting windows to their buffers.
>  >
>  > The latter already exists as window-line-height, doesn't it?
> 
> This needs an up to date display, IIUC :-(

Yes, but only because the code to do that without looking at the
current glyph matrix was never written.  We do similar things all over
the display engine.

>  > Anyway, how would you word-wrap in Lisp, except by adding display
>  > strings with newlines (which AFAIR features like longlines
>  > etc. already do)?
> 
> By adding hard newlines.

I thought that way is "deprecated" in favor of C-level word-wrap,
which is why longlines.el is in obsolete/...