From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Hans-Peter Deifel Newsgroups: gmane.emacs.help Subject: window-width, the terminal and linum-mode Date: Tue, 25 Dec 2012 11:33:33 +0100 Organization: A noiseless patient Spider Message-ID: <871ueezaiq.fsf@hpdeifel.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1356431713 9490 80.91.229.3 (25 Dec 2012 10:35:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 25 Dec 2012 10:35:13 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Dec 25 11:35:29 2012 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TnRr5-00087v-P3 for geh-help-gnu-emacs@m.gmane.org; Tue, 25 Dec 2012 11:35:27 +0100 Original-Received: from localhost ([::1]:42460 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TnRqr-0001rx-Eo for geh-help-gnu-emacs@m.gmane.org; Tue, 25 Dec 2012 05:35:13 -0500 Original-Path: usenet.stanford.edu!news.glorb.com!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 21 Injection-Info: mx04.eternal-september.org; posting-host="e2f886c50fd4213239c22a1c751ac271"; logging-data="17910"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19G0WDDvGkmrZex5XceZhlZxYZjWk6+3DA=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) Cancel-Lock: sha1:BPCzWJkp2xU7EQPEHJQ/shQw9FA= sha1:8rFvuEEB2mXVueZcL64KuuLrQV0= Original-Xref: usenet.stanford.edu gnu.emacs.help:195996 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:88311 Archived-At: 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)