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#18601: 24.3.94; set-fringe-mode with left fringe 0 breaks window width calculations on Mac OS Date: Fri, 03 Oct 2014 08:54:37 +0200 Message-ID: <542E482D.6040001@gmx.at> References: <542D9D0F.5020002@gmx.at> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1412319327 18171 80.91.229.3 (3 Oct 2014 06:55:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 3 Oct 2014 06:55:27 +0000 (UTC) Cc: 18601@debbugs.gnu.org To: Constantine Vetoshev Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Oct 03 08:55:20 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 1XZwls-0004HB-8i for geb-bug-gnu-emacs@m.gmane.org; Fri, 03 Oct 2014 08:55:20 +0200 Original-Received: from localhost ([::1]:38185 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XZwlr-0001Hv-UY for geb-bug-gnu-emacs@m.gmane.org; Fri, 03 Oct 2014 02:55:19 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53080) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XZwli-0001Fl-5G for bug-gnu-emacs@gnu.org; Fri, 03 Oct 2014 02:55:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XZwla-0004dX-Lc for bug-gnu-emacs@gnu.org; Fri, 03 Oct 2014 02:55:10 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:39911) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XZwla-0004c6-J2 for bug-gnu-emacs@gnu.org; Fri, 03 Oct 2014 02:55:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XZwlZ-00076y-Qw for bug-gnu-emacs@gnu.org; Fri, 03 Oct 2014 02:55:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 03 Oct 2014 06:55:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18601 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 18601-submit@debbugs.gnu.org id=B18601.141231929027314 (code B ref 18601); Fri, 03 Oct 2014 06:55:01 +0000 Original-Received: (at 18601) by debbugs.gnu.org; 3 Oct 2014 06:54:50 +0000 Original-Received: from localhost ([127.0.0.1]:59708 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XZwlO-00076U-9b for submit@debbugs.gnu.org; Fri, 03 Oct 2014 02:54:50 -0400 Original-Received: from mout.gmx.net ([212.227.17.21]:58073) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XZwlM-00076L-0t for 18601@debbugs.gnu.org; Fri, 03 Oct 2014 02:54:48 -0400 Original-Received: from [88.117.57.162] ([88.117.57.162]) by mail.gmx.com (mrgmx103) with ESMTPSA (Nemesis) id 0M3R1g-1YQoSr3FEu-00r1Cc; Fri, 03 Oct 2014 08:54:45 +0200 In-Reply-To: X-Provags-ID: V03:K0:T/7vhg/wJzuhn07luNeUXp4Ak7M0bEB8vDP2o/0sIW0rHCzNCjN IkFiVjUOWlLGqRIU8aM1/lNjsAQJEh2wIBByCHozQ4vtXw4UDYQHTu+UxkThWckmMGsUvcr L5Z/ikDVAhFz+Pv2x5WIMaac/QlCSv41U0WJF3S0mM9n7lRX723R5NGqzMy91Rj996zI1yG SfwBL+Z3Ku3EeNENjdRuQ== X-UI-Out-Filterresults: notjunk:1; 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:94080 Archived-At: > After (set-fringe-mode '(0 . 2)), executing (window--dump-frame) puts > the following contents into *window-frame-dump*: > frame pixel: 600 x 494 cols/lines: 86 x 35 units: 7 x 14 > width left fringe: 0 > width right fringe: 7 > After (set-fringe-mode '(1 . 2)), executing (window--dump-frame) puts > the following contents into *window-frame-dump*: > body pixel: 574 x 462 char: 82 x 33 > width left fringe: 3 > width right fringe: 4 Here is the old fringe compensation code at work which apaprently adds 4 or 5 pixels to the specified value in order to get the sum of the widths of the fringes equal to 7 (the frame's nominal character width). I removed that code for NS on Emacs 25 but never did so for Emacs 24-4. Even now I don't know whether it works correctly (see also bug #16856). In any case I don't see why this should have any impact on what happens in ansi-term. Apparently `term-window-width' kicks in and due to (/= (frame-parameter nil 'right-fringe) 0)) it eventually stores in `term-width' a value that is one less than if both fringes are present. Since Eli now confirmed that what you observe is a result of one of his fixes all I can suggest at the moment is to play with (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) (1- (window-body-width)))) What happens when you make it always return (window-body-width)? (defun term-window-width () (window-body-width)) martin