[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: display margins and modifying the buffer
From: |
Alloy Petrofsky |
Subject: |
Re: display margins and modifying the buffer |
Date: |
Wed, 23 Jan 2002 15:32:43 -0800 |
> From: address@hidden (Juanma Barranquero)
>
> From a two-month old discussion regarding display margins, overlays,
> text properties and line numbers:
>
> Me:
>
> > but setting the display property of the overlay to show anything
> > in the margin makes the text covered by the overlay go invisible;
>
> Stefan Monnier:
>
> > if you use overlays, it's not a big problem since you can make
> > your overlay span 0 chars.
>
> Finally I've had the time to try it and it does not work: overlays of
> length 0 do not show anything in the margin. Making the span at least
> length 1 does make the margin text appear, at the cost of making
> invisible the text covered by the overlay.
There are two solutions:
(1) Put a one-character overlay on each newline, and give this
overlay both a marginal display property and an after-string
property of "\n".
or (2) Give a zero-length overlay an after-string property of some
random string, and then put a marginal display property on the
string.
Mention of the second option was added last month to the info node
(elisp) Display Margins.
-al