From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.bugs Subject: bug#7822: 24.0.50; `fit-window-to-buffer': take display artefacts into account Date: Wed, 12 Jan 2011 10:24:21 -0800 Message-ID: <5B662D61FFDD4245AB78878FE8993AB5@us.oracle.com> References: <7A4D04DE08AE47B8B59F98C7D0215CAD@us.oracle.com> <476E17C645D142EEB115E2021ACAD92F@us.oracle.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1294858474 8162 80.91.229.12 (12 Jan 2011 18:54:34 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 12 Jan 2011 18:54:34 +0000 (UTC) Cc: 7822@debbugs.gnu.org To: "'Lennart Borgman'" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jan 12 19:54:29 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Pd5q1-0006Aq-9f for geb-bug-gnu-emacs@m.gmane.org; Wed, 12 Jan 2011 19:54:29 +0100 Original-Received: from localhost ([127.0.0.1]:51880 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pd5q0-0000AG-AR for geb-bug-gnu-emacs@m.gmane.org; Wed, 12 Jan 2011 13:54:28 -0500 Original-Received: from [140.186.70.92] (port=37308 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pd5pp-00008C-VN for bug-gnu-emacs@gnu.org; Wed, 12 Jan 2011 13:54:19 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pd5po-000306-EB for bug-gnu-emacs@gnu.org; Wed, 12 Jan 2011 13:54:17 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:58370) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pd5po-000302-CN for bug-gnu-emacs@gnu.org; Wed, 12 Jan 2011 13:54:16 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1Pd5Hh-0002o1-PK; Wed, 12 Jan 2011 13:19:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: "Drew Adams" Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 12 Jan 2011 18:19:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 7822 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 7822-submit@debbugs.gnu.org id=B7822.129485631010744 (code B ref 7822); Wed, 12 Jan 2011 18:19:01 +0000 Original-Received: (at 7822) by debbugs.gnu.org; 12 Jan 2011 18:18:30 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Pd5HB-0002nE-VK for submit@debbugs.gnu.org; Wed, 12 Jan 2011 13:18:30 -0500 Original-Received: from rcsinet10.oracle.com ([148.87.113.121]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Pd5H8-0002n1-W3 for 7822@debbugs.gnu.org; Wed, 12 Jan 2011 13:18:27 -0500 Original-Received: from acsinet15.oracle.com (acsinet15.oracle.com [141.146.126.227]) by rcsinet10.oracle.com (Switch-3.4.2/Switch-3.4.2) with ESMTP id p0CIPsJv014293 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 12 Jan 2011 18:25:56 GMT Original-Received: from acsmt354.oracle.com (acsmt354.oracle.com [141.146.40.154]) by acsinet15.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id p0CGkYa3011815; Wed, 12 Jan 2011 18:25:53 GMT Original-Received: from abhmt017.oracle.com by acsmt355.oracle.com with ESMTP id 954222181294856663; Wed, 12 Jan 2011 10:24:23 -0800 Original-Received: from dradamslap1 (/130.35.178.194) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 12 Jan 2011 10:24:22 -0800 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: Thread-Index: Acuygf3fT2Qkc9r+Qci+dEZfvBccrgAAyFkw X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5994 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Wed, 12 Jan 2011 13:19:01 -0500 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:43307 Archived-At: > > I don't see why _any_ windows should be taken into account.=20 > >=A0The window for the buffer should be resized to fit the > > displayed buffer, period. =A0If that is not possible for some > > reason, then we decide what to do. >=20 > Hm. Just because you have to actually do the resizing and that affects > other windows and a decision has to be made how? Yes, but that's the last part of what I wrote: "then we decide what to = do". And, a priori at least, that decision is the same anytime a window is = resized. IOW, a priori there is nothing special in that regard about fitting a = window to a buffer. > > For that decision, I would imagine that we decide the same=20 > > way we decide now when you try to resize a window to size > > S and that is not possible. =A0Why is this > > case any different from other resizing cases? >=20 > Do we really have good ways to easily solve this?=20 I don't know, but that question is a general one and independent of = _this_ bug/feature, which is fitting a window to its displayed buffer. You are bringing in extraneous stuff. Interesting stuff no doubt, but = not specific to fitting a window to its buffer. > Maybe I am missing something? Perhaps you have some > specific suggestion for how to do > this? Which functions do you think supply the needed features? No I don't. No doubt window experts such as Martin have some ideas and = have already considered the question. My point is that it is outside the = scope of this thread. _Any_ time a window is resized the questions you raise are pertinent - they have nothing in particular to do with _this_ resizing = of a window. > > AFAICT, all that's involved here is to determine the=20 > > desired window size. Beyond that, there should be nothing new. >=20 > One little detail of course: It should not delete other windows. (If > you allow it do delete other windows there are much simpler > implementations than the one I am suggesting. Much simpler.) I repeat. I don't see why this resizing is any different from any other = window resizing.