GNU bug report logs - #13399
24.3.50; Word-wrap can't wrap at zero-width space U-200B

Previous Next

Package: emacs;

Reported by: martin rudalics <rudalics <at> gmx.at>

Date: Thu, 10 Jan 2013 08:31:02 UTC

Severity: wishlist

Found in version 24.3.50

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: martin rudalics <rudalics <at> gmx.at>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 13399 <at> debbugs.gnu.org
Subject: bug#13399: 24.3.50; Word-wrap can't wrap at zero-width space U-200B
Date: Fri, 11 Jan 2013 11:08:02 -0500
> 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, but till now I hadn't
> found a method to turn this off.  Not recommended for normal buffers
> because `forward-char' appears to hang, but that's a different story.

Text properties apply to characters, so they don't have a natural notion
of "extent" and "boundaries", but Emacs usually invents those notions
when needed by treating any run of characters whose text-property value
is `eq' as one extent.
In the case of the mouse-face property that means you can use (list 'my-face)
on the chunk you want to make sure it's not `eq' to an adjacent chunk.

>> The latter already exists as window-line-height, doesn't it?
> This needs an up to date display, IIUC :-(

W.r.t. functions that return the pixel width/height of a string, I guess
you'd presume that the string would be displayed at the leftmost
position on a line, since the width/height of a string will depend on
where it's displayed in the window (which affects the width of TAB
chars, and the placement of line wraps).

>> 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.  All I care about is to (1) show the entire
> buffer text in a fixed-width window and (2) make that window as small as
> possible.

How 'bout starting my making the window as high as you can, then call
(posn-at-point (point-max)), then shrink the window accordingly?


        Stefan




This bug report was last modified 4 years and 244 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.