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#1488: 23.0.60; dired-pop-to-buffer: use fit-window-to-buffer Date: Fri, 05 Dec 2008 15:25:04 +0100 Message-ID: <493939C0.7010507@gmx.at> References: <87fxl446mr.fsf@escher.local.home> Reply-To: martin rudalics , 1488@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------050806030106040005070208" X-Trace: ger.gmane.org 1228488651 30645 80.91.229.12 (5 Dec 2008 14:50:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 5 Dec 2008 14:50:51 +0000 (UTC) Cc: 1488@emacsbugs.donarmstrong.com To: Stephen Berman Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Dec 05 15:51:54 2008 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.50) id 1L8c26-0000zv-Ez for geb-bug-gnu-emacs@m.gmane.org; Fri, 05 Dec 2008 15:51:54 +0100 Original-Received: from localhost ([127.0.0.1]:44777 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L8c0v-0005gf-Sf for geb-bug-gnu-emacs@m.gmane.org; Fri, 05 Dec 2008 09:50:41 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L8c0e-0005YC-Tm for bug-gnu-emacs@gnu.org; Fri, 05 Dec 2008 09:50:24 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L8c0b-0005T6-4I for bug-gnu-emacs@gnu.org; Fri, 05 Dec 2008 09:50:24 -0500 Original-Received: from [199.232.76.173] (port=41907 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L8c0b-0005Sz-1N for bug-gnu-emacs@gnu.org; Fri, 05 Dec 2008 09:50:21 -0500 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:36990) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1L8c0a-0006g8-76 for bug-gnu-emacs@gnu.org; Fri, 05 Dec 2008 09:50:20 -0500 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mB5EoDf5020046; Fri, 5 Dec 2008 06:50:13 -0800 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id mB5EZ3bP015604; Fri, 5 Dec 2008 06:35:03 -0800 X-Loop: don@donarmstrong.com Resent-From: martin rudalics Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Fri, 05 Dec 2008 14:35:03 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 1488 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 1488-submit@emacsbugs.donarmstrong.com id=B1488.122848731214281 (code B ref 1488); Fri, 05 Dec 2008 14:35:03 +0000 Original-Received: (at 1488) by emacsbugs.donarmstrong.com; 5 Dec 2008 14:28:32 +0000 Original-Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with SMTP id mB5ESSaS014275 for <1488@emacsbugs.donarmstrong.com>; Fri, 5 Dec 2008 06:28:30 -0800 Original-Received: (qmail invoked by alias); 05 Dec 2008 14:28:22 -0000 Original-Received: from 62-47-49-168.adsl.highway.telekom.at (EHLO [62.47.49.168]) [62.47.49.168] by mail.gmx.net (mp059) with SMTP; 05 Dec 2008 15:28:22 +0100 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX1/iVmltnfDiBnkiMqs+s/R/eCo4lUda/RFthE/bn4 M7MEhuRljIwlk3 User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) In-Reply-To: <87fxl446mr.fsf@escher.local.home> X-Y-GMX-Trusted: 0 X-FuHaFi: 0.8,0.62 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Fri, 05 Dec 2008 09:50:24 -0500 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list 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:22978 Archived-At: This is a multi-part message in MIME format. --------------050806030106040005070208 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Stephen, `fit-window-to-buffer' seems broken in a number of regards. I'll eventually put condition-cases around the `enlarge-window' calls. Could you, so far, try whether the attached patch improves things. Thanks, martin. --------------050806030106040005070208 Content-Type: text/plain; name="window.el.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="window.el.diff" *** window.el.~1.169.~ 2008-11-27 11:14:14.671875000 +0100 --- window.el 2008-12-05 15:22:20.281250000 +0100 *************** *** 1307,1313 **** (when (null window) (setq window (selected-window))) (when (null max-height) ! (setq max-height (frame-height (window-frame window)))) (let* ((buf ;; Buffer that is displayed in WINDOW --- 1307,1313 ---- (when (null window) (setq window (selected-window))) (when (null max-height) ! (setq max-height (- (frame-height (window-frame window)) 1))) (let* ((buf ;; Buffer that is displayed in WINDOW *************** *** 1334,1341 **** (delta ;; Calculate how much the window height has to change to show ;; desired-height lines, constrained by MIN-HEIGHT and MAX-HEIGHT. ! (- (max (min desired-height max-height) ! (or min-height window-min-height)) window-height))) ;; Don't try to redisplay with the cursor at the end --- 1334,1341 ---- (delta ;; Calculate how much the window height has to change to show ;; desired-height lines, constrained by MIN-HEIGHT and MAX-HEIGHT. ! (- (min max-height ! (max desired-height (or min-height window-min-height))) window-height))) ;; Don't try to redisplay with the cursor at the end --------------050806030106040005070208--