emacs-devel
[Top][All Lists]
Advanced

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

Re: setnu-mode and Emacs 21.


From: Juanma Barranquero
Subject: Re: setnu-mode and Emacs 21.
Date: Tue, 13 Nov 2001 11:22:53 +0100

On Sun, 11 Nov 2001 00:20:52 -0500, Michael Welsh Duggan <address@hidden> wrote:

> Actually, the way I think it should probably be done is to put the
> line number in the margin.  [...] Ordinary text never appears in these
> areas, but you can put things into the display margins using the
> `display' property.

I've tried that precisely with the intention of redoing setnu.el, but
it seems confusing to me (though it is posible I've missed something
about the use of `display').

I thought the cleanest way would be assigning an overlay to each line
(to just one character in each line, to be precise), but setting the
display property of the overlay to show anything in the margin makes
the text covered by the overlay go invisible; the same happens with
buffer text if you set its display property. So it seems necessary to
insert dummy text into each line (to set the margin value), but then
you have to hack around with fields or movement hooks to keep the user
from noticing there's hidden text inserted into the buffer. Not pretty.

If you could just create an overlay to cover each first char of a line
(or each newline, or whatever), assign a margin to it and still have
the char be visible, it would be relatively easy.


                                                           /L/e/k/t/u




reply via email to

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