From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lennart Borgman Newsgroups: gmane.emacs.bugs Subject: bug#6385: A slightly less aggressive fit-window-to-buffer Date: Fri, 11 Jun 2010 19:15:25 +0200 Message-ID: References: <4C12383E.5030405@gmx.at> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: dough.gmane.org 1276277314 2390 80.91.229.12 (11 Jun 2010 17:28:34 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 11 Jun 2010 17:28:34 +0000 (UTC) Cc: 6385@debbugs.gnu.org To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jun 11 19:28:31 2010 connect(): No such file or directory 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 1ON81s-00053m-Ko for geb-bug-gnu-emacs@m.gmane.org; Fri, 11 Jun 2010 19:28:29 +0200 Original-Received: from localhost ([127.0.0.1]:52850 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ON81r-0000BJ-KH for geb-bug-gnu-emacs@m.gmane.org; Fri, 11 Jun 2010 13:28:27 -0400 Original-Received: from [140.186.70.92] (port=52422 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ON81k-0000BD-Ey for bug-gnu-emacs@gnu.org; Fri, 11 Jun 2010 13:28:21 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1ON81i-00059g-V8 for bug-gnu-emacs@gnu.org; Fri, 11 Jun 2010 13:28:20 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:60795) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ON81i-00059b-T8 for bug-gnu-emacs@gnu.org; Fri, 11 Jun 2010 13:28:18 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1ON7pq-0000h1-8r; Fri, 11 Jun 2010 13:16:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lennart Borgman Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 11 Jun 2010 17:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6385 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 6385-submit@debbugs.gnu.org id=B6385.12762765542656 (code B ref 6385); Fri, 11 Jun 2010 17:16:02 +0000 Original-Received: (at 6385) by debbugs.gnu.org; 11 Jun 2010 17:15:54 +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 1ON7pi-0000gn-9g for submit@debbugs.gnu.org; Fri, 11 Jun 2010 13:15:54 -0400 Original-Received: from mail-yw0-f197.google.com ([209.85.211.197]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ON7pg-0000gi-8v for 6385@debbugs.gnu.org; Fri, 11 Jun 2010 13:15:52 -0400 Original-Received: by ywh35 with SMTP id 35so1159668ywh.29 for <6385@debbugs.gnu.org>; Fri, 11 Jun 2010 10:15:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:cc:content-type; bh=VaXEgD++jQljCHng3afkPzlA/Jx7iti4GE2Z90OKFTo=; b=UDRJx+D2TcCxV1X6LQWQ2W3iVZVj7cgz047f2YfuIfGXMni0puhY7p0FEl/ALmIFl7 l0Uf5vbawUvy/IVG4x3frfmK0QZqybD7kgyJs4URiJDmQuby4Ew+9avg5x/IoSI3uHfR 4e1GGnwyBbSpHswa+r7oZhoLEq2EQbEd8m1bA= 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; b=IbB3pBHjIUTt9PFvFxL9MT8tB7sEBC2B1z51dUboDAIDtVsEyrFgxTtkU3wV51rDyj Ceg0wYfBwMjjoQfv8OJWGNHXsne2R4J3WQzkcTc/9MlLC2kIo6LtCLAHIrTpDsCHLWru /WnbARQz+T+QEgouiRoJY3roSew3yxrITbf6o= Original-Received: by 10.101.182.2 with SMTP id j2mr1942828anp.210.1276276545137; Fri, 11 Jun 2010 10:15:45 -0700 (PDT) Original-Received: by 10.100.154.15 with HTTP; Fri, 11 Jun 2010 10:15:25 -0700 (PDT) In-Reply-To: <4C12383E.5030405@gmx.at> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Fri, 11 Jun 2010 13:16:02 -0400 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:37704 Archived-At: On Fri, Jun 11, 2010 at 3:21 PM, martin rudalics wrote: >> I believe fit-window-to-buffer has become a bit upset and unnecessary >> aggressive because of visual lines. It looks like it need a bit more >> feedback from the display system to be really sure that the buffer is >> entirely visible. >> >> The attached patch is something I have used to get around the problem. >> I am not sure it is the right thing but I am rather sure it does not >> hurt. > > IIUC your change defeats the whole point of `pos-visible-in-window-p', > namely to calculate a position without doing a redisplay. Yes, I know. I hoped someone had a better idea long term idea. Doing a redisplay is just a quick fix. What I saw was the even 2 lines high buffer made fit-window-to-buffer delete sibling windows. All the time - but... I thought I knew how to reproduce it. So I did not write any test procedures, I was just a bit irritated. A mistake. > Worse even, > you might end up doing multiple redisplays within a loop. Yes, I know. Maybe the first redisplay was all that was needed. > TRT would be to handle the various line cases within `pos_visible_p'. Thanks, I will leave this for the moment, but keep it in mind. > And obviously get rid of resizing windows within a loop. > >> Of course we need a non-killing version of fit-window-to-buffer, but >> for the moment this patch might be useful. > > What is a "non-killing version of fit-window-to-buffer"? This function killed all other siblings even if it just actually needs two lines if certain conditions are met. (Those I tried to describe.) So this was just a desperate attempt to stop that. I do not know what to do at the moment. I will try to reproduce this and look a bit closer at it later.