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#17065: 24.3.50; Revise line 5944 of window.el to use `window-width`, instead of `window-total-width`. Date: Sat, 22 Mar 2014 10:41:00 +0100 Message-ID: <532D5AAC.7020608@gmx.at> References: 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 1395481341 19760 80.91.229.3 (22 Mar 2014 09:42:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 22 Mar 2014 09:42:21 +0000 (UTC) To: 17065@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Mar 22 10:42:27 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 1WRIRd-0003Ca-FR for geb-bug-gnu-emacs@m.gmane.org; Sat, 22 Mar 2014 10:42:25 +0100 Original-Received: from localhost ([::1]:56281 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WRIRd-0002Gk-4u for geb-bug-gnu-emacs@m.gmane.org; Sat, 22 Mar 2014 05:42:25 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49003) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WRIRQ-0002GV-B7 for bug-gnu-emacs@gnu.org; Sat, 22 Mar 2014 05:42:21 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WRIRG-0001hd-UK for bug-gnu-emacs@gnu.org; Sat, 22 Mar 2014 05:42:12 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:42998) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WRIRG-0001hM-G8 for bug-gnu-emacs@gnu.org; Sat, 22 Mar 2014 05:42:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WRIRF-0006F6-U9 for bug-gnu-emacs@gnu.org; Sat, 22 Mar 2014 05:42:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 22 Mar 2014 09:42:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17065 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.139548129723954 (code B ref -1); Sat, 22 Mar 2014 09:42:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 22 Mar 2014 09:41:37 +0000 Original-Received: from localhost ([127.0.0.1]:44180 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WRIQq-0006EH-7Q for submit@debbugs.gnu.org; Sat, 22 Mar 2014 05:41:36 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:46740) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WRIQn-0006E5-RV for submit@debbugs.gnu.org; Sat, 22 Mar 2014 05:41:34 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WRIQd-0001E4-U0 for submit@debbugs.gnu.org; Sat, 22 Mar 2014 05:41:33 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:34415) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WRIQd-0001Dv-QP for submit@debbugs.gnu.org; Sat, 22 Mar 2014 05:41:23 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48073) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WRIQW-0001Mz-7q for bug-gnu-emacs@gnu.org; Sat, 22 Mar 2014 05:41:23 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WRIQO-00011s-Pd for bug-gnu-emacs@gnu.org; Sat, 22 Mar 2014 05:41:16 -0400 Original-Received: from mout.gmx.net ([212.227.15.19]:62659) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WRIQO-00010P-Fq for bug-gnu-emacs@gnu.org; Sat, 22 Mar 2014 05:41:08 -0400 Original-Received: from [188.22.111.104] ([188.22.111.104]) by mail.gmx.com (mrgmx102) with ESMTPSA (Nemesis) id 0LjuR3-1Wy9Gt0MTh-00bpd9 for ; Sat, 22 Mar 2014 10:41:06 +0100 In-Reply-To: X-Provags-ID: V03:K0:HLzGENVSBj9H/Txgg9PCNNMTo95PzEbEQtlunlmHU2uaSdnplC0 Be9mQibhwGCHGWht17nGtOePWwOFLtNfIOOJa7Tq0+Ue7PyoPsy/LiXtimb+bmMbYBATAD6 E5xy1WPgfoyZFi1YPT2w63YDkQqTaNYcvuHcOjCOuJaCmM4wx1IT+jp4DK/F9uztguPA5Ea vKzLFNecUJs5MfWK+/Dog== X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). 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:87142 Archived-At: > (defun broken-example () > (interactive) > (window--display-buffer > ;; buffer > (get-buffer-create "*test*") > ;; window > (split-window (selected-window) nil 'right) > ;; type > 'window > ;; alist > '((window-width . 82)) > ;; dedicated > t) > (message "Window Width: %s" (window-width (get-buffer-window "*test*"))) ) Conceptually, the `window-width' alist entry specifies the new total width of the window, including fringes, scrollbars and vertical dividers. You mean that specifiying the number of text columns is more intuitive? I might agree, but unfortunately _all_ window resizing functions intepret "width" in terms of the total width of a window. Making an exception for this special case would only increase the confusion. The confusion has historical reasons and was not considered important, likely so, because side-by-side windows are in use more frequently only over the past years. If, with emacs -Q, I do (let ((window (split-window (selected-window) -20 'right))) (window-body-width window)) I get 16 text columns for the new window which is likely not what I expected as someone using this function for the first time with an explicit SIZE argument. In any case, I will have to adjust some doc-strings and the Elisp manual. So far the only hint is the doc-string of `split-window-right' which says Here, SIZE includes the width of the window's scroll bar; if there are no scroll bars, it includes the width of the divider column to the window's right, if any. but I'm struggling with this issue ever since. martin