Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I've set up emacs to display line numbers (global-linum-mode 1), and it works until I start enlarging the text via text-scale-adjust

The line numbers column starts to shrink, and disappears entirely after a few increments.
When it has fully disappeared, further increments have no more effect on the left edge.

Is this a know issue? Is there a workaround?

Using GNU Emacs 23.1.1 in Ubuntu 10.04 (and I'm an emacs newb).

share|improve this question
    
When I do this in Emacs 23.1, the numbers on the left scale with the rest of the text and eventually get too big for the space they are in (making it hard to see them) but the column they are in remains the same size. Is this the same behavior you are seeing or are you seeing something else? –  Steven D Feb 16 '11 at 20:10
1  
Like Steven, what I observe is that the line numbers column stays the same width in pixels (so it becomes too small to fit the characters if you call text-scale-adjust with a positive argument). This looks like a bug in the implementation of the left-margin text property. I haven't investigated further. –  Gilles Feb 16 '11 at 22:18
    
Thanks Steven and Gilles... It seems to be the same behaviour.. My line-number col does not narrow (as I first thought. It just looked that way as the text got larger (black ln-nb-col, and charcoal "wrap-indicator" margin). The line-numbers do a tectonic disappearing act "under" the nargin and buffer proper.. (a bug it seems) –  Peter.O Feb 17 '11 at 16:06
add comment

1 Answer

up vote 2 down vote accepted

Here is a workaround. It works on my emacs 23.1.1. This same question came up again (months later), and I'd learnt a bit about elisp in the mean time, so I had a go at it. See the following link for my answer there. Font size issues with Emacs in linum-mode.

share|improve this answer
    
Could you check-mark your answer, or are you waiting for other answers? –  Stéphane Gimenez Feb 13 '12 at 18:37
    
I'd be quite happy with another answer. The method works, but is really a workaround which has a couple of issues I'd rather it didn't have: like hard coding font size steps (it should tap into something more direclt, but I don't know what that is... and the bottom section doesn't refresh properly when jumping from large font size back to normal. Pressing any key causes a refresh, but there must be a better way (and again, I don't know how).. And it really doesn't address the original issue; that of the line-number column not changing its width in sync with the zoom scale. –  Peter.O Feb 14 '12 at 4:20
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.