From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: window-width, the terminal and linum-mode Date: Tue, 25 Dec 2012 19:39:15 +0200 Message-ID: <83licmni9o.fsf@gnu.org> References: <871ueezaiq.fsf@hpdeifel.de> NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1356457171 1069 80.91.229.3 (25 Dec 2012 17:39:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 25 Dec 2012 17:39:31 +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 18:39:47 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 1TnYTi-0001Lg-GN for geh-help-gnu-emacs@m.gmane.org; Tue, 25 Dec 2012 18:39:46 +0100 Original-Received: from localhost ([::1]:54789 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TnYTU-0004gG-BN for geh-help-gnu-emacs@m.gmane.org; Tue, 25 Dec 2012 12:39:32 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:54228) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TnYTL-0004g7-RY for help-gnu-emacs@gnu.org; Tue, 25 Dec 2012 12:39:27 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TnYTH-0000Y0-Aj for help-gnu-emacs@gnu.org; Tue, 25 Dec 2012 12:39:23 -0500 Original-Received: from mtaout20.012.net.il ([80.179.55.166]:58111) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TnYTH-0000Xl-39 for help-gnu-emacs@gnu.org; Tue, 25 Dec 2012 12:39:19 -0500 Original-Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0MFL00500KZ3XG00@a-mtaout20.012.net.il> for help-gnu-emacs@gnu.org; Tue, 25 Dec 2012 19:39:17 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MFL0053ML1GKWC0@a-mtaout20.012.net.il> for help-gnu-emacs@gnu.org; Tue, 25 Dec 2012 19:39:17 +0200 (IST) In-reply-to: <871ueezaiq.fsf@hpdeifel.de> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 80.179.55.166 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:88317 Archived-At: > From: Hans-Peter Deifel > Date: Tue, 25 Dec 2012 11:33:33 +0100 > > 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)'. It's a bug in window-body-width, now fixed in the development sources, thanks to your report. It should exclude the display margins from the width calculation on TTYs as well.