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#6385: A slightly less aggressive fit-window-to-buffer Date: Fri, 11 Jun 2010 15:21:02 +0200 Message-ID: <4C12383E.5030405@gmx.at> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1276263761 15769 80.91.229.12 (11 Jun 2010 13:42:41 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 11 Jun 2010 13:42:41 +0000 (UTC) Cc: 6385@debbugs.gnu.org To: Lennart Borgman Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jun 11 15:42:38 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 1ON4VC-0004pG-Mi for geb-bug-gnu-emacs@m.gmane.org; Fri, 11 Jun 2010 15:42:36 +0200 Original-Received: from localhost ([127.0.0.1]:53566 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ON4Hd-0000HA-CW for geb-bug-gnu-emacs@m.gmane.org; Fri, 11 Jun 2010 09:28:29 -0400 Original-Received: from [140.186.70.92] (port=46665 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ON4HU-0000FX-6K for bug-gnu-emacs@gnu.org; Fri, 11 Jun 2010 09:28:21 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1ON4HS-0001Nv-9J for bug-gnu-emacs@gnu.org; Fri, 11 Jun 2010 09:28:20 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:53093) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ON4HS-0001Nl-7y for bug-gnu-emacs@gnu.org; Fri, 11 Jun 2010 09:28:18 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1ON4BN-0007Lg-Sk; Fri, 11 Jun 2010 09:22:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics 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 13:22:01 +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.127626247728238 (code B ref 6385); Fri, 11 Jun 2010 13:22:01 +0000 Original-Received: (at 6385) by debbugs.gnu.org; 11 Jun 2010 13:21:17 +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 1ON4Af-0007LP-Gt for submit@debbugs.gnu.org; Fri, 11 Jun 2010 09:21:17 -0400 Original-Received: from mail.gmx.net ([213.165.64.20]) by debbugs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1ON4Ac-0007LI-KS for 6385@debbugs.gnu.org; Fri, 11 Jun 2010 09:21:16 -0400 Original-Received: (qmail invoked by alias); 11 Jun 2010 13:21:08 -0000 Original-Received: from 62-47-33-63.adsl.highway.telekom.at (EHLO [62.47.33.63]) [62.47.33.63] by mail.gmx.net (mp066) with SMTP; 11 Jun 2010 15:21:08 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX19r2uAX899rSmqjS9WN3XOK9yvuLNG54lFMw2/fHs b/monI1B9nobhE User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) In-Reply-To: X-Y-GMX-Trusted: 0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Fri, 11 Jun 2010 09:22:01 -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:37697 Archived-At: > 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. Worse even, you might end up doing multiple redisplays within a loop. TRT would be to handle the various line cases within `pos_visible_p'. 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"? martin