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#23169: 24.5; Inconsistent text reflow in man pages depending on window configuration Date: Fri, 01 Apr 2016 18:20:36 +0200 Message-ID: <56FE9FD4.3050802@gmx.at> References: <87bn5ug55o.fsf@fimbulvetr.bsc.es> <83egaqvbio.fsf@gnu.org> <87oa9t8iq4.fsf@fimbulvetr.bsc.es> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1459527692 6758 80.91.229.3 (1 Apr 2016 16:21:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 1 Apr 2016 16:21:32 +0000 (UTC) Cc: 23169@debbugs.gnu.org To: =?UTF-8?Q?Llu=C3=ADs?= , Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Apr 01 18:21:20 2016 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 1am1oq-0005tn-Kp for geb-bug-gnu-emacs@m.gmane.org; Fri, 01 Apr 2016 18:21:08 +0200 Original-Received: from localhost ([::1]:45416 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1am1op-0001qf-Vb for geb-bug-gnu-emacs@m.gmane.org; Fri, 01 Apr 2016 12:21:07 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44976) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1am1ol-0001qS-KM for bug-gnu-emacs@gnu.org; Fri, 01 Apr 2016 12:21:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1am1ok-0003oq-LI for bug-gnu-emacs@gnu.org; Fri, 01 Apr 2016 12:21:03 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:50381) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1am1ok-0003om-Hg for bug-gnu-emacs@gnu.org; Fri, 01 Apr 2016 12:21:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1am1ok-0004AO-Dm for bug-gnu-emacs@gnu.org; Fri, 01 Apr 2016 12:21:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 01 Apr 2016 16:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23169 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 23169-submit@debbugs.gnu.org id=B23169.145952765515989 (code B ref 23169); Fri, 01 Apr 2016 16:21:02 +0000 Original-Received: (at 23169) by debbugs.gnu.org; 1 Apr 2016 16:20:55 +0000 Original-Received: from localhost ([127.0.0.1]:47508 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1am1oc-00049p-Vi for submit@debbugs.gnu.org; Fri, 01 Apr 2016 12:20:55 -0400 Original-Received: from mout.gmx.net ([212.227.15.18]:51753) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1am1oc-00049c-25 for 23169@debbugs.gnu.org; Fri, 01 Apr 2016 12:20:54 -0400 Original-Received: from [192.168.1.101] ([212.95.7.57]) by mail.gmx.com (mrgmx001) with ESMTPSA (Nemesis) id 0MHH6Z-1aYZHp3uxX-00E3hC; Fri, 01 Apr 2016 18:20:47 +0200 In-Reply-To: <87oa9t8iq4.fsf@fimbulvetr.bsc.es> X-Provags-ID: V03:K0:A9/Rso9L6bUKRb0RBnVXipRPPjJKGVZw+qhfj32waH86V/5AmNt rU9SEeKvVjnAxvrbnTgdBBO+4v+lG1JLUxhdNq2tqcy+TbzRlM1tFQcaz1P40bnbYrQeIaY B3XBj/ug9iaiEW1hYx8wJnOACL1qsQoCEN5AY9cTOK11uppZSOmVxyMPo+lQUbSDTjoXGQD PCg0oK/TMHVEUTbBJ5nGg== X-UI-Out-Filterresults: notjunk:1;V01:K0:YpDV8Np8y8U=:GapW3erBsIYEY8uo4IzTpM R9yVYm0XGPA1Esoo7oqfL6qNT1fM61YGqA5gHKldPh7Aa1HVJ1fvawK9YQdZLZx28XBB8cBkp YilisHeWxWfrWKsJSBghzOt5jVUKRYB4rWJZHb3101WwV4T6nZAOmpYg1kQCAVWSmokllw1sA uPVUBYPwq7oNB3YDuWK7i4MiRefXMNVvFehzZcn2Ar6FQhIUTeW7x85zELMoB1WPFn/5zMuA8 gAssAbWly9GZ+5yqCRjqYnaughIsO0WGK1LlRdpzg8sEihveC8ODVzJnlbd8XMu4t14Bx2Qp5 sJ+y1NCp+7GboQLzxZ2QyiyJnZ4xPtKxvcOPLnlNnVgmqdbxiFnMqaedL9tXLfy32pUG4uFjI PDSZl0aTOk/9Mr8kRmSm5FL6bFeijoYqkIxasSx7s9lAZ0cP6468Zf+WLfoCvhsGdibSUFYrP 5J6cvxKwcISSRRxxP+bVq90GkXmptz+IiP6zuYajwbmudnjHSerDqYvev98BPAFgJVblDzdvH FK3Q9Rlc6pElxzB1PTqsojj5A5JPmRrOUx7fGu9v1HRUAuPzH7t/MrCa+zoeQc5IkbWz2kZ4u Q5hOB2sAxkZRGtTLpqAXe1fxXqOfhjD4WN3paaOXXE6dYAyV+soazUEYORlVlcLjaDwed2Z7Z /wyAD+JYGDWTOh/KI1C5ZYCoXm20Pkf+pfGvcF9F9eabSRpRZir6yuPGmIAd7CUZn5V0METB8 Gah0Zt3u7qoWsio6IvjLqi1RY21pkeM9E57Ca4Ynl89VzGQijU4e8YpH/p+zufK2CZT5IZDB X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.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:115845 Archived-At: > Thing is I don't know the width of the window that will be used, since= in some > cases it does not exist yet: > > +-----+ +--+--+ > | | | | | > | | -> M-x man man -> | | | > | | | | | > +-----+ +--+--+ > > The ideal without breaking the asynchronicity would be to somehow disp= lay the > new buffer on a window before populating it (display-buffer might or m= ight not > reuse a window here), calculate its window's width, set COLUMNS, async= hronously > call man to populate the buffer, and then really show the buffer on th= e previous > window. > > The only problem is that creating a temporary window just to calculate= its width > could annoy people because the contents won't be shown yet. We could add a special alist element, say =E2=80=98pretend=E2=80=99, to =E2= =80=98display-buffer=E2=80=99 that would cause the latter to return the size of the window where BUFFER-OR-NAME would be displayed _without_ creating or touching that window. This will work reliably only if the new window (1) appears on an existing frame (or we know that the window manager reliably makes new frames just as large as we want them), (2) is not created by a user-defined action (an action not predefined in window.el) that does not understand =E2=80=98pretend=E2=80=99, and (3) no window configuration or =E2=80=98display-buffer-alist=E2=80=99 rel= ated changes are performed in the period from when the size was calculated until =E2=80=98display-buffer=E2=80=99 is called without "pretending". martin