Btw I get that behavior in emacs 23.1 too
Scott


On Fri, Oct 14, 2011 at 3:00 AM, Tassilo Horn <tassilo@member.fsf.org> wrote:
Marcelo de Moraes Serpa <celoserpa@gmail.com> writes:

Hi Marcelo,

> 4328, exactly the same amount of lines I have in the file.

Didn't you say that you have 4000 *k* lines?

Anyway, as Scott mentiones, in emacs 24 the linum packages seems to be
more clever and only creates overlays for the visible area of a buffer.
For example, when opening a file with 1000 lines and enabling
linum-mode, I only have 35 overlays, because only 35 lines are visible
at a time.

Bye,
Tassilo

> On Thu, Oct 13, 2011 at 2:07 AM, Tassilo Horn <tassilo@member.fsf.org>wrote:
>
>> Marcelo de Moraes Serpa <celoserpa@gmail.com> writes:
>>
>> > Wow.. this worked Torsten. Thank you. I wonder why this happens...
>>
>> linum-mode works with overlays to embed the numbers at the beginnig of
>> lines.  Overlays are very flexible but not too efficient, you don't want
>> to have too many of them.  Looking at linum.el, it seems it already does
>> pooling of overlays in order not to create one overlay for any line, but
>> I'm not sure.  Could you please do
>>
>>  M-: (length linum-overlays) RET
>>
>> in that large org file with linum-mode enabled and say what it returns
>> to satisfy my curiosity?
>>
>> Bye,
>> Tassilo
>>
>>
>>