GNU bug report logs - #10960
linum-mode does not work properly when changing font size

Previous Next

Package: emacs;

Reported by: Le Wang <l26wang <at> gmail.com>

Date: Tue, 6 Mar 2012 16:29:01 UTC

Severity: normal

Merged with 1255, 8379

Fixed in version 25.1

Done: Alan J Third <alan <at> idiocy.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: lekktu <at> gmail.com, 10960 <at> debbugs.gnu.org, l26wang <at> gmail.com
Subject: bug#10960: linum-mode does not work properly when changing font size
Date: Sat, 10 Mar 2012 20:36:29 -0500
>> You mean, that text-scale-* makes the problem more common significant?
>> Maybe so, yes.  But I don't think that just special-handling
>> text-scale-* would be a good solution.
> Special-casing it was not what I had in mind.

Actually, what you propose does just that.

>> We need some more general way to adjust the size of the margin to
>> the size of the images&text displayed there, so as to handle
>> non-default faces, proportional text, ...

> 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: same problem.  It still won't account for
non-default faces, proportional fonts, and other display features,


        Stefan




This bug report was last modified 9 years and 129 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.