From mboxrd@z Thu Jan  1 00:00:00 1970
Path: news.gmane.org!not-for-mail
From: Lennart Borgman <lennart.borgman@gmail.com>
Newsgroups: gmane.emacs.bugs
Subject: bug#7822: 24.0.50;
	`fit-window-to-buffer': take display artefacts into account
Date: Wed, 12 Jan 2011 12:33:28 +0100
Message-ID: <AANLkTinf4F3THNjvx-KooeWKWsmQ9PUFU772WkRwrXOj@mail.gmail.com>
References: <7A4D04DE08AE47B8B59F98C7D0215CAD@us.oracle.com>
	<AANLkTimLU0v8=+R-4Y-VRG9bFUQUnaQcHJ822NUQFeMV@mail.gmail.com>
	<AANLkTi=5TD9ZUkGjk9x==s-uUxcDeQfhKOvshY18SrzM@mail.gmail.com>
	<A0633CE1C20F4CE5B350F4B9CCC346DA@us.oracle.com>
	<AANLkTi=Jfu5i_Z9ME+8q81qVunn7mn0QBEjVdLW-KdYg@mail.gmail.com>
NNTP-Posting-Host: lo.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-Trace: dough.gmane.org 1294835631 14438 80.91.229.12 (12 Jan 2011 12:33:51 GMT)
X-Complaints-To: usenet@dough.gmane.org
NNTP-Posting-Date: Wed, 12 Jan 2011 12:33:51 +0000 (UTC)
Cc: 7822@debbugs.gnu.org
To: Drew Adams <drew.adams@oracle.com>
Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jan 12 13:33:46 2011
Return-path: <bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org>
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 <bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org>)
	id 1Pczta-0001xc-1L
	for geb-bug-gnu-emacs@m.gmane.org; Wed, 12 Jan 2011 13:33:46 +0100
Original-Received: from localhost ([127.0.0.1]:50650 helo=lists.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43)
	id 1PcztZ-00015W-2l
	for geb-bug-gnu-emacs@m.gmane.org; Wed, 12 Jan 2011 07:33:45 -0500
Original-Received: from [140.186.70.92] (port=57047 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1PczNA-0002ND-5X
	for bug-gnu-emacs@gnu.org; Wed, 12 Jan 2011 07:02:31 -0500
Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1PczHK-0000PE-UI
	for bug-gnu-emacs@gnu.org; Wed, 12 Jan 2011 06:54:16 -0500
Original-Received: from debbugs.gnu.org ([140.186.70.43]:58778)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1PczHK-0000P6-Mm
	for bug-gnu-emacs@gnu.org; Wed, 12 Jan 2011 06:54:14 -0500
Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>)
	id 1Pcyr0-0000gg-Ej; Wed, 12 Jan 2011 06:27:02 -0500
X-Loop: help-debbugs@gnu.org
Resent-From: Lennart Borgman <lennart.borgman@gmail.com>
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 11:27:02 +0000
Resent-Message-ID: <handler.7822.B7822.12948315862597@debbugs.gnu.org>
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.12948315862597
	(code B ref 7822); Wed, 12 Jan 2011 11:27:02 +0000
Original-Received: (at 7822) by debbugs.gnu.org; 12 Jan 2011 11:26:26 +0000
Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
	id 1PcyqQ-0000fp-7n
	for submit@debbugs.gnu.org; Wed, 12 Jan 2011 06:26:26 -0500
Original-Received: from mail-ey0-f172.google.com ([209.85.215.172])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <lennart.borgman@gmail.com>) id 1PcyqK-0000fZ-0U
	for 7822@debbugs.gnu.org; Wed, 12 Jan 2011 06:26:23 -0500
Original-Received: by eyd10 with SMTP id 10so182749eyd.3
	for <7822@debbugs.gnu.org>; Wed, 12 Jan 2011 03:33:49 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:in-reply-to:references:from:date
	:message-id:subject:to:cc:content-type:content-transfer-encoding;
	bh=GbAFjm1XD0tyJGLExPvq2u99sfkzStUX8vfAymeA1Us=;
	b=Yjybns5FzJz5agujo1b+FX3ulsyYS3E1lPwWnk1z671kbrtjB6jq5Cmg9lczz2OCJT
	Dihv+/Tn3fOxpJY8GUN3j900GPa9Xb23gnW7eHPm3mCMuofDurLQnee5Uqy/mjY9iGHu
	7Wz9V4DPUELFi6jUN0wORoD13gMFM5rEaf3rA=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:in-reply-to:references:from:date:message-id:subject:to
	:cc:content-type:content-transfer-encoding;
	b=nWUynbNWGY1HO+VjOLKV3j9/v4UMpfbKLhDgFzcQ19+lfVOQxIX9rmtbtLnuyfYQGo
	83YTTNmZ4tkVZzgVMl9AzHfDWcMoXt8pSIiYp03NH09UE8uGNlHwEoelz4YCQ5m3d3d0
	xqRb9OPYEMUTMX/+9mcNspaCI1XaA800MQfZk=
Original-Received: by 10.213.35.209 with SMTP id q17mr949094ebd.97.1294832029118; Wed,
	12 Jan 2011 03:33:49 -0800 (PST)
Original-Received: by 10.213.20.148 with HTTP; Wed, 12 Jan 2011 03:33:28 -0800 (PST)
In-Reply-To: <AANLkTi=Jfu5i_Z9ME+8q81qVunn7mn0QBEjVdLW-KdYg@mail.gmail.com>
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
Resent-Date: Wed, 12 Jan 2011 06:27:02 -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" <bug-gnu-emacs.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/bug-gnu-emacs>,
	<mailto:bug-gnu-emacs-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-gnu-emacs>
List-Post: <mailto:bug-gnu-emacs@gnu.org>
List-Help: <mailto:bug-gnu-emacs-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/bug-gnu-emacs>,
	<mailto:bug-gnu-emacs-request@gnu.org?subject=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:43290
Archived-At: <http://permalink.gmane.org/gmane.emacs.bugs/43290>

On Wed, Jan 12, 2011 at 11:40 AM, Lennart Borgman
<lennart.borgman@gmail.com> wrote:
> On Wed, Jan 12, 2011 at 4:16 AM, Drew Adams <drew.adams@oracle.com> wrote=
:
>>> Try first to adjust window below and if that is not enough window
>>> above.
>>
>> I looked only at the doc string. =C2=A0Whatever we do for `fit-window-to=
-buffer', it
>> should _not_ take any other windows into account or have any effect on a=
ny other
>> windows. =C2=A0This is only about fitting a window to its buffer as disp=
layed.
>> Whatever effects that might have on other windows are derivative, and no=
t to be
>> taken into account in this function.
>>
>> It sounds like you are doing something different from what this bug is a=
bout.
>
> Not really, but your answer makes me realize that my solution above is
> not enough.
>
> And I actually have a better solution in winsize.el, but it is quite a
> bit more elaborate and probably not what we want.

To be more clear: I was taking into account to few windows. All
windows below and above must be taken into account.

And I somehow forgot to implement this in resize-windows (which is in
winsize.el). It is a little bit complicated so I can't do it that
quickly.

> Instead I believe we want a variant of enlarge-window that is not
> allowed to delete-windows. Building on that we can make a more simple
> solution.

Perhaps that is wrong. That would only mean pushing the logic above to
the C level.