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#17831: 24.4.50; bad default value for `Man-width' Date: Tue, 24 Jun 2014 09:13:54 +0200 Message-ID: <53A92532.9040901@gmx.at> References: <87tx7buryg.fsf@mail.jurta.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1403594131 19424 80.91.229.3 (24 Jun 2014 07:15:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 24 Jun 2014 07:15:31 +0000 (UTC) Cc: 17831@debbugs.gnu.org, Leo Liu To: Juri Linkov , Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jun 24 09:15:23 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WzKws-0005UC-E7 for geb-bug-gnu-emacs@m.gmane.org; Tue, 24 Jun 2014 09:15:22 +0200 Original-Received: from localhost ([::1]:57896 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WzKwr-00006F-TD for geb-bug-gnu-emacs@m.gmane.org; Tue, 24 Jun 2014 03:15:21 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38000) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WzKwh-0008Vl-67 for bug-gnu-emacs@gnu.org; Tue, 24 Jun 2014 03:15:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WzKwZ-0003Wv-K1 for bug-gnu-emacs@gnu.org; Tue, 24 Jun 2014 03:15:11 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:39436) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WzKwZ-0003WR-Fr for bug-gnu-emacs@gnu.org; Tue, 24 Jun 2014 03:15:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WzKwY-0004i4-UX for bug-gnu-emacs@gnu.org; Tue, 24 Jun 2014 03:15:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 24 Jun 2014 07:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17831 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 17831-submit@debbugs.gnu.org id=B17831.140359405618011 (code B ref 17831); Tue, 24 Jun 2014 07:15:02 +0000 Original-Received: (at 17831) by debbugs.gnu.org; 24 Jun 2014 07:14:16 +0000 Original-Received: from localhost ([127.0.0.1]:58819 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WzKvm-0004gQ-Uc for submit@debbugs.gnu.org; Tue, 24 Jun 2014 03:14:16 -0400 Original-Received: from mout.gmx.net ([212.227.15.15]:57430) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WzKvg-0004g0-8c for 17831@debbugs.gnu.org; Tue, 24 Jun 2014 03:14:13 -0400 Original-Received: from [88.117.80.157] ([88.117.80.157]) by mail.gmx.com (mrgmx001) with ESMTPSA (Nemesis) id 0Lz3nU-1WdWm00AiW-014GWL; Tue, 24 Jun 2014 09:14:00 +0200 In-Reply-To: <87tx7buryg.fsf@mail.jurta.org> X-Provags-ID: V03:K0:DnbItBbXFd7XCecTkq7pH/tPq7TmOIUs+rbdhd0zac27YhpNAen w2d1cE8jv6+wBiftFoAblEKkxHdHDi2UiEiBiObFKQaJ9ePz0iBkHcd/E+AlTpJ3plHtQjZ PZw2qSWpJ0VF8Jk5ttbw5+gIPVtFZ7ZjUzqkvZ9QCCRHSv/mEKdXIPe+IF3hbznoaj03crW yxGrYrNjvVbIf05Vb629Q== X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 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: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:90725 Archived-At: > As a general solution for such cases it seems the proper order is > to display an empty buffer first, and then fill it with the contents. Obviously there are two way to tackle this: Fill the buffer in some way and try to display it in a window with suitable size. That's what we've done so far and it fails typically because it looks at the width of the selected window in order to do the filling but displays the buffer in a window with different width. The first to report this problem was Lennart when filing bug#6000 more than four years ago. To fix this we could either use some sort of maximimum width (for me more than 80 columns are not very readable anyway) and propose an adequate display buffer action or implement simple heuristics to detect how large the window used by `display-buffer' would be and fill the buffer in some adequate manner. Alternatively, we could display the buffer first, look at what size we get, fill the buffer, and possibly resize the window afterwards. For `with-temp-buffer-window' this means that we would have to fill the buffer either via `temp-buffer-window-show-hook' or in QUIT-FUNCTION. martin