all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* window-width, the terminal and linum-mode
@ 2012-12-25 10:33 Hans-Peter Deifel
  2012-12-25 11:12 ` Constantin Kulikov
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Hans-Peter Deifel @ 2012-12-25 10:33 UTC (permalink / raw)
  To: help-gnu-emacs

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)


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-12-27 16:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-25 10:33 window-width, the terminal and linum-mode Hans-Peter Deifel
2012-12-25 11:12 ` Constantin Kulikov
2012-12-25 17:39 ` Eli Zaretskii
     [not found] ` <mailman.16102.1356457168.855.help-gnu-emacs@gnu.org>
2012-12-27 16:22   ` Hans-Peter Deifel

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.