From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: bug#16470: 24.3.50; term mode and newlines with some window configurations Date: Sat, 18 Jan 2014 18:24:31 +0100 Message-ID: <52DAB8CF.5040505@gmx.at> References: <4B69E121-3153-45CF-9903-D1294FDE4B8B@gmail.com> <52D8E0EC.9030701@gmx.at> <61C48CA0-CBBC-4A10-9868-EF5324D2EC8D@gmail.com> <52D97F22.6060403@gmx.at> <52DA6E67.4040507@gmx.at> <61D14675-A7B6-47A7-8028-FD8D09F33E30@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1390065919 6015 80.91.229.3 (18 Jan 2014 17:25:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 18 Jan 2014 17:25:19 +0000 (UTC) Cc: 16470@debbugs.gnu.org To: Constantine Vetoshev Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jan 18 18:25:25 2014 Return-path: Envelope-to: geb-bug-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 1W4Ze6-0006TK-Ps for geb-bug-gnu-emacs@m.gmane.org; Sat, 18 Jan 2014 18:25:22 +0100 Original-Received: from localhost ([::1]:43804 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W4Ze6-0002Zt-6X for geb-bug-gnu-emacs@m.gmane.org; Sat, 18 Jan 2014 12:25:22 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54998) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W4Zdv-0002WI-PT for bug-gnu-emacs@gnu.org; Sat, 18 Jan 2014 12:25:19 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W4Zdn-0004Kl-6y for bug-gnu-emacs@gnu.org; Sat, 18 Jan 2014 12:25:11 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:42301) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W4Zdn-0004Jc-4Q for bug-gnu-emacs@gnu.org; Sat, 18 Jan 2014 12:25:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1W4Zdm-00058j-D2 for bug-gnu-emacs@gnu.org; Sat, 18 Jan 2014 12:25:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 18 Jan 2014 17:25:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16470 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 16470-submit@debbugs.gnu.org id=B16470.139006588119719 (code B ref 16470); Sat, 18 Jan 2014 17:25:02 +0000 Original-Received: (at 16470) by debbugs.gnu.org; 18 Jan 2014 17:24:41 +0000 Original-Received: from localhost ([127.0.0.1]:56320 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W4ZdQ-00057x-9l for submit@debbugs.gnu.org; Sat, 18 Jan 2014 12:24:40 -0500 Original-Received: from mout.gmx.net ([212.227.17.22]:55445) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W4ZdN-00057o-5u for 16470@debbugs.gnu.org; Sat, 18 Jan 2014 12:24:38 -0500 Original-Received: from [62.47.42.24] ([62.47.42.24]) by mail.gmx.com (mrgmx002) with ESMTPSA (Nemesis) id 0MUI8w-1VvGE53Nfm-00R4rg for <16470@debbugs.gnu.org>; Sat, 18 Jan 2014 18:24:36 +0100 In-Reply-To: <61D14675-A7B6-47A7-8028-FD8D09F33E30@gmail.com> X-Provags-ID: V03:K0:chweAJDFiyrQpOjUvaOoLDckKmrM2fRIRH9aLWOvXKPgx9lQ6j1 vh9hdlDReJwSJmi3BqcHMNhbI4IxrAhv2iv3s7w4H3EkmlGyFXV9NsdQxzz0oOgjpZDpPaE EWXOoZvSEdq5FigobnAYdRbIDYXqPLcwVo8vbUSSuiKL5L0iLEhrpdvGJ3vlVvJWPRxW5g6 5vBYL6Q004xwj4reRpQTA== X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:83685 Archived-At: > Results attached. From these results we see the following: The root window is 1597 pixels wide which results in 228 columns. (* 7 228) is 1596 pixels so the rounding of the root window is OK with one pixel left. Now lets look into the sums of the live windows before and after balancing: Pixels are (+ 400 399 798) before and (+ 533 532 532) after balancing both yielding 1697. Columns are (+ 57 57 114) before and (+ 76 76 76) after balancing both yielding 228. Now (* 7 76) is 532 so the sizes of the two right windows are precise while the left-most window has one pixel left. All these are total sizes including scrollbars, fringes etc. But we can't draw text into scrollbars so we have to look at the body widths instead. For the body widths subtract 15 pixel for the scrollbar and 21 for the fringes giving (- 533 36) that is 497 pixels for the first window yielding 71 columns. Next we have (- 532 36) that is 496 pixels rounded _up_ to 71 for the other two windows. So it seems that the problem is with rounding up the body width: `window-width' says that the window has 71 columns while it has 70 columns plus 6 pixels, that is one pixel less. Apparently this one missing pixel causes the problem: The characters don't fit into the line and some wrapping occurs. Now `term-window-width' does the following: (defun term-window-width () (if (and (not (featurep 'xemacs)) (display-graphic-p) overflow-newline-into-fringe (/= (frame-parameter nil 'right-fringe) 0)) (window-width) (1- (window-width)))) returning (window-width) IIUC. Now try to use (defun term-window-width () (if (and (not (featurep 'xemacs)) (display-graphic-p) overflow-newline-into-fringe (/= (frame-parameter nil 'right-fringe) 0)) (/ (window-body-width nil t) (frame-char-width)) (1- (window-width)))) instead. If this works I shall make the change in window_body_width. Thanks, martin