Subject: bug#10960: linum-mode does not work properly when changing font size

From: Stefan Monnier <[email-masked]>
Date: Sun, 11 Mar 2012 10:37:45 -0400

>> > It all boils down to calculating the size of the margins in pixels.
>> > The key to that is window_box_width, which uses
>> > WINDOW_FRAME_COLUMN_WIDTH to convert columns into pixels, and
>> > WINDOW_FRAME_COLUMN_WIDTH returns the "canonical" width of a column,
>> > which is an average width of the default face's font.
>> > So all it takes is to make that calculation aware of face remapping,
>> > images displayed in the margin, etc.
>> OK, so rather than special casing text-scale-* you suggest to special
>> case frame-remapping
> Where and how did you manage to read something like that into what I
> said?

I guess I did not understand what you suggest, then.
Could you explain some more?
The way I see it, set-window-margins can only set the margin's size
either to "no margin" or to a fixed size given as an integer.  So you'd
have to let the Elisp code somehow figure out the *display* size of the
margin's text (either in pixels or in char-cell-equivalent), and I don't
know of any way Elisp can do that currently.

        Stefan