help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

window-width, the terminal and linum-mode


From: Hans-Peter Deifel
Subject: window-width, the terminal and linum-mode
Date: Tue, 25 Dec 2012 11:33:33 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux)

Hi group,

I was looking in "(elisp) Window Sizes" for a function to give me the
width of the text area of a window and found `window-body-width'.
However, this function gives me different results in terminal and GUI
modes, when linum-mode is enabled.

In terminal emacs, `window-body-width' includes the width of the line
number, while in gui emacs it doesn't. In both cases, the line number
width is returned correctly by `(window-margins)'.

So the question is: How can I get the width of the text-area (meaning,
in my case, without the line-numbers). I'd also like to avoid having to
distinguish X and terminal mode explicitly.

Thanks,
HP

--
Hans-Peter Deifel
GNU Emacs 24.2.1 (x86_64-pc-linux-gnu, GTK+ Version 3.4.4)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]