Subject: bug#1255: 23.0.60; linum-mode: no update after text-scale-adjust

From: Stefan Monnier <[email-masked]>
Date: Mon, 27 Oct 2008 15:22:16 -0400

>>> FWIW, the problem I pointed out is not linum's, but either a
>>> limitation of the way text-scale-adjust is implemented, or a redisplay
>>> bug. Linum just happens to be a good way to show it off.
>> What makes you think so?

ELISP> (let ((ov (make-overlay (point) (point)))
>              (str "01234"))
>          (set-window-margins (selected-window) (length str))
>          (overlay-put ov 'before-string (propertize " " 'display
> `((margin left-margin) ,str)))
>          nil)
> nil
ELISP> (text-scale-increase 3)
> t

> And the "01234" text in the window margin is no longer entirely
> visible. I.e., `set-window-margins' sets the margin width in
> "character cells", and its pixel width does not vary when the
> character size is increased by `text-scale-increaase' and friends.
> This is unrelated to linum.el, AFAICS.

Oh, now I understand.  Then your problem is not a bug but a feature:
text-scale-adjust is specifically meant to change the size of the text
but nothing else.  If you want to change the size of the text and the
rest, then you want to use something else (e.g. customize the `default'
face).

So, yes, the problem lies somewhat in linum-mode which should resize the
margin accordingly, tho it's far from easy for it to do so (and it can
only do it in increments of the base default font size).

        Stefan