GNU bug report logs - #23169
24.5; Inconsistent text reflow in man pages depending on window configuration

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Severity: minor; Reported by: Lluís <xscript@HIDDEN>; dated Thu, 31 Mar 2016 13:16:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 23169 <at> debbugs.gnu.org:


Received: (at 23169) by debbugs.gnu.org; 2 Apr 2016 11:30:49 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Apr 02 07:30:49 2016
Received: from localhost ([127.0.0.1]:47824 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1amJlR-0001WW-Cx
	for submit <at> debbugs.gnu.org; Sat, 02 Apr 2016 07:30:49 -0400
Received: from mout.gmx.net ([212.227.15.19]:55516)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <xscript@HIDDEN>) id 1amJlP-0001QX-K4
 for 23169 <at> debbugs.gnu.org; Sat, 02 Apr 2016 07:30:48 -0400
Received: from localhost ([84.88.51.85]) by mail.gmx.com (mrgmx003) with
 ESMTPSA (Nemesis) id 0Ltr89-1ZlEqS0vbB-011F1C; Sat, 02 Apr 2016 13:30:41
 +0200
From: =?utf-8?Q?Llu=C3=ADs?= <xscript@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#23169: 24.5;
 Inconsistent text reflow in man pages depending on window
 configuration
References: <87bn5ug55o.fsf@HIDDEN> <83egaqvbio.fsf@HIDDEN>
 <87oa9t8iq4.fsf@HIDDEN> <8337r5teg7.fsf@HIDDEN>
Date: Sat, 02 Apr 2016 13:30:38 +0200
In-Reply-To: <8337r5teg7.fsf@HIDDEN> (Eli Zaretskii's message of "Fri, 01 Apr
 2016 20:40:40 +0300")
Message-ID: <8737r46ye9.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Provags-ID: V03:K0:e6mDoXdtaAqH8EVore1V+nKBy9KXXpEqoDHMO+9dI2+PxxEptx8
 kaLyrFdeRKD+pqSrHs+J9Yr/1h9cmGsa78dAZzzS9B0SBIhfftOexiotve3aq1uht923wxD
 woeBaaMtm5L3lp0zDS8ibCYaRnWPmibNjqUyLjcytKoRlCrunYZhoSY4TQyJUTKSSmZBzFu
 M3/hC1aXdKPzxSOwQBHog==
X-UI-Out-Filterresults: notjunk:1;V01:K0:VOGbAGePrH0=:c3ta4/Hv0Fr83yQ2tP3zpt
 LzCrmyZyqYOhg+52IAj/3h5x24MMk+nUbm9+Rvxf/z157imTPySdw0qZEMDYYTiyjNQvojfxI
 P/jnyZttZjbXrDHxZVMfibboXoQE2fpulWnULqpWs0p08jNn1mbWF63RFZXDhufRP9d7AW3TB
 5fmni875CUoB77wkZf96J9713jSblnYmZUALOtFS3qneUb16LIeGGjPHZazpTY3ojLMP7qG39
 yqohEMeu5FY6GF7JmeMVpPuqVA/fIzhtonnd1XhuB24zAfbQVtC4nZEVSKqQEZKMrt8dmggqE
 xy3fB2HURBqI+wZYjY/LAWCEb4MNRTp6DksaHEFb8sVzcv/K10VJm+qmnV9F2btD9Dld5O64c
 cIGKZAdOw5cARm7d2ztkFbm/qwoEFNbFOK1KBL5LXadbNjkRifMfLs4dleYYC8IdaRd48gDuz
 thrfuqUMBJCBY7zEtg6f+uxQ/608jeV6igcI/2KxB+Je48a8S9afysHNe/s+w1ByIt7xOyS8I
 q8kUO3i3Fh5hEO05S5eQVplBZ4IUTZcjNue4JAc303jmjFbnV57GmlY4ejQY+X2VyQTyVenTb
 /HrPUWPci1ktrdI+WC23uYX910H25F9W85k4xj99fdy9y1sNXt8oF5+DtyPTrd+kimBXGof5h
 z1+tgH2D5vhyH+OaE0jh7orxI0HpTKKKcWcBZCh2Qg0WtHWX4FAXVr/C8aoQDwrWrsdKZgeze
 ie3XwTCH7YBT2jmpXoXfmFwwrtKcG/h27LtxQiq1cTcJuHu4v6/6rW36rG2CYIA530mNT1UjD
 e4o+ZV3
X-Spam-Score: -1.7 (-)
X-Debbugs-Envelope-To: 23169
Cc: 23169 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

--=-=-=
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

Eli Zaretskii writes:

>> From: Llu=C3=ADs <xscript@HIDDEN>
>> Cc: 23169 <at> debbugs.gnu.org
>> Date: Fri, 01 Apr 2016 17:13:55 +0200
>>=20
>> > The usual way to fix these problems is to set Man-width to a non-nil
>> > value, as appropriate for your frame/window dimensions.  Would that
>> > solve the problem for you?
>>=20
>> Thing is I don't know the width of the window that will be used, since i=
n some
>> cases it does not exist yet:
>>=20
>> +-----+                   +--+--+
>> |     |                   |  |  |
>> |     | -> M-x man man -> |  |  |
>> |     |                   |  |  |
>> +-----+                   +--+--+

> Isn't the window that man will use half of the window before the
> command?  Then you know the width in advance, because you are familiar
> with your window and frame configurations

That's only one case. Maybe display-buffer ends up creating a smaller window
(depending on its configuration hooks), or maybe it ends up reusing some ot=
her
window.


>> The ideal without breaking the asynchronicity would be to somehow displa=
y the
>> new buffer on a window before populating it (display-buffer might or mig=
ht not
>> reuse a window here), calculate its window's width, set COLUMNS, asynchr=
onously
>> call man to populate the buffer, and then really show the buffer on the =
previous
>> window.
>>=20
>> The only problem is that creating a temporary window just to calculate i=
ts width
>> could annoy people because the contents won't be shown yet.

> Yes, that's the problem.

Martin's "pretend" argument to display-buffer could be a way out of this
conundrum. Also, here's a patch for an alternative fix.


Thanks,
  Lluis


--=-=-=
Content-Type: text/x-diff
Content-Disposition: inline; filename=man.el.patch

--- /tmp/old/man.el	2016-04-02 13:09:14.588221106 +0200
+++ /tmp/man.el	2016-04-02 13:28:07.580237516 +0200
@@ -1001,7 +1001,16 @@
       (error "No item under point")
     (man man-args)))
 
-(defmacro Man-start-calling (&rest body)
+(defun Man-buffer-or-window-width (buffer-or-window)
+  "Get width of window used after BUFFER-OR-WINDOW is displayed."
+  (if (windowp buffer-or-window)
+      (window-width buffer-or-window)
+    (save-window-excursion
+      (window-width (display-buffer buffer-or-window
+                                    ;; As used by `Man-notify-when-ready'.
+                                    'not-this-window)))))
+
+(defmacro Man-start-calling (buffer-or-window &rest body)
   "Start the man command in `body' after setting up the environment"
   `(let ((process-environment (copy-sequence process-environment))
 	;; The following is so Awk script gets \n intact
@@ -1040,7 +1049,7 @@
 			  ((and (integerp Man-width) (> Man-width 0))
 			   Man-width)
 			  (Man-width (frame-width))
-			  ((window-width))))))
+			  ((Man-buffer-or-window-width ,buffer-or-window))))))
     ;; Since man-db 2.4.3-1, man writes plain text with no escape
     ;; sequences when stdout is not a tty.	In 2.5.0, the following
     ;; env-var was added to allow control of this (see Debian Bug#340673).
@@ -1062,7 +1071,7 @@
 	(setq buffer-undo-list t)
 	(setq Man-original-frame (selected-frame))
 	(setq Man-arguments man-args))
-      (Man-start-calling
+      (Man-start-calling buffer
        (if (fboundp 'start-process)
 	    (set-process-sentinel
 	     (start-process manual-program buffer
@@ -1099,7 +1108,7 @@
 	(inhibit-read-only t)
 	(buffer-read-only nil))
      (erase-buffer)
-     (Man-start-calling
+     (Man-start-calling (frame-selected-window)
       (call-process shell-file-name nil (list (current-buffer) nil) nil
 		    shell-command-switch
 		    (format (Man-build-man-command) Man-arguments)))

--=-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#23169; Package emacs. Full text available.

Message received at 23169 <at> debbugs.gnu.org:


Received: (at 23169) by debbugs.gnu.org; 1 Apr 2016 19:52:30 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Apr 01 15:52:30 2016
Received: from localhost ([127.0.0.1]:47581 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1am57N-0002Li-S2
	for submit <at> debbugs.gnu.org; Fri, 01 Apr 2016 15:52:30 -0400
Received: from sub3.mail.dreamhost.com ([69.163.253.7]:51607
 helo=homiemail-a76.g.dreamhost.com)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1am57M-0002LU-VF
 for 23169 <at> debbugs.gnu.org; Fri, 01 Apr 2016 15:52:29 -0400
Received: from homiemail-a76.g.dreamhost.com (localhost [127.0.0.1])
 by homiemail-a76.g.dreamhost.com (Postfix) with ESMTP id 6EA4045807C;
 Fri,  1 Apr 2016 12:52:28 -0700 (PDT)
Received: from localhost.linkov.net (82.131.90.203.cable.starman.ee
 [82.131.90.203]) (Authenticated sender: jurta@HIDDEN)
 by homiemail-a76.g.dreamhost.com (Postfix) with ESMTPA id 7084445807B;
 Fri,  1 Apr 2016 12:52:27 -0700 (PDT)
From: Juri Linkov <juri@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#23169: 24.5;
 Inconsistent text reflow in man pages depending on window
 configuration
Organization: LINKOV.NET
References: <87bn5ug55o.fsf@HIDDEN> <83egaqvbio.fsf@HIDDEN>
 <87oa9t8iq4.fsf@HIDDEN> <8337r5teg7.fsf@HIDDEN>
Date: Fri, 01 Apr 2016 22:51:30 +0300
In-Reply-To: <8337r5teg7.fsf@HIDDEN> (Eli Zaretskii's message of "Fri, 01 Apr
 2016 20:40:40 +0300")
Message-ID: <87r3ep5cql.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.92 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 1.5 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview: >> > The usual way to fix these problems is to set Man-width
 to a non-nil >> > value, as appropriate for your frame/window dimensions.
 Would that >> > solve the problem for you? >> >> 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 -> |
 | | >> | | | | | >> +-----+ +--+--+ > > Isn't the window that man will use
 half of the window before the > command? Then you know the width in advance,
 because you are familiar > with your window and frame configurations > >>
 The ideal without breaking the asynchronicity would be to somehow display
 the >> new buffer on a window before populating it (display-buffer might
 or might not >> reuse a window here), calculate its window's width, set COLUMNS,
 asynchronously >> call man to populate the buffer, and then really show the
 buffer on the 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. > > Yes, that's the problem. [...] 
 Content analysis details:   (1.5 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 2.2 RCVD_IN_MSPIKE_L3      RBL: Low reputation (-3)
 [69.163.253.7 listed in bl.mailspike.net]
 -0.7 RCVD_IN_DNSWL_LOW      RBL: Sender listed at http://www.dnswl.org/, low
 trust [69.163.253.7 listed in list.dnswl.org]
 0.0 RCVD_IN_MSPIKE_BL      Mailspike blacklisted
X-Debbugs-Envelope-To: 23169
Cc: 23169 <at> debbugs.gnu.org, =?iso-8859-1?Q?Llu=EDs?= <xscript@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.5 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  >> > The usual way to fix these problems is to set Man-width
    to a non-nil >> > value, as appropriate for your frame/window dimensions.
    Would that >> > solve the problem for you? >> >> 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 -> |
   | | >> | | | | | >> +-----+ +--+--+ > > Isn't the window that man will use
    half of the window before the > command? Then you know the width in advance,
    because you are familiar > with your window and frame configurations > >>
    The ideal without breaking the asynchronicity would be to somehow display
    the >> new buffer on a window before populating it (display-buffer might
   or might not >> reuse a window here), calculate its window's width, set COLUMNS,
    asynchronously >> call man to populate the buffer, and then really show the
    buffer on the 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. > > Yes, that's the problem. [...] 
 
 Content analysis details:   (1.5 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
  2.2 RCVD_IN_MSPIKE_L3      RBL: Low reputation (-3)
                             [69.163.253.7 listed in bl.mailspike.net]
 -0.7 RCVD_IN_DNSWL_LOW      RBL: Sender listed at http://www.dnswl.org/, low
                             trust
                             [69.163.253.7 listed in list.dnswl.org]
  0.0 RCVD_IN_MSPIKE_BL      Mailspike blacklisted

>> > The usual way to fix these problems is to set Man-width to a non-nil
>> > value, as appropriate for your frame/window dimensions.  Would that
>> > solve the problem for you?
>>
>> 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 -> |  |  |
>>   |     |                   |  |  |
>>   +-----+                   +--+--+
>
> Isn't the window that man will use half of the window before the
> command?  Then you know the width in advance, because you are familiar
> with your window and frame configurations
>
>> The ideal without breaking the asynchronicity would be to somehow display the
>> new buffer on a window before populating it (display-buffer might or might not
>> reuse a window here), calculate its window's width, set COLUMNS, asynchronously
>> call man to populate the buffer, and then really show the buffer on the 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.
>
> Yes, that's the problem.

That was the problem in 24.5 indeed, but fortunately it's fixed in 25.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#23169; Package emacs. Full text available.

Message received at 23169 <at> debbugs.gnu.org:


Received: (at 23169) by debbugs.gnu.org; 1 Apr 2016 17:41:20 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Apr 01 13:41:19 2016
Received: from localhost ([127.0.0.1]:47531 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1am34R-00065C-Md
	for submit <at> debbugs.gnu.org; Fri, 01 Apr 2016 13:41:19 -0400
Received: from eggs.gnu.org ([208.118.235.92]:42629)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1am34P-000650-V0
 for 23169 <at> debbugs.gnu.org; Fri, 01 Apr 2016 13:41:18 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <eliz@HIDDEN>) id 1am34F-0004Xn-NC
 for 23169 <at> debbugs.gnu.org; Fri, 01 Apr 2016 13:41:12 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-0.2 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD
 autolearn=disabled version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:48053)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1am34F-0004Xj-JX; Fri, 01 Apr 2016 13:41:07 -0400
Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3073
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1am34E-0001Yu-Bh; Fri, 01 Apr 2016 13:41:07 -0400
Date: Fri, 01 Apr 2016 20:40:40 +0300
Message-Id: <8337r5teg7.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: =?utf-8?Q?Llu=C3=ADs?= <xscript@HIDDEN>
In-reply-to: <87oa9t8iq4.fsf@HIDDEN> (message from =?utf-8?Q?Ll?=
 =?utf-8?Q?u=C3=ADs?= on Fri, 01 Apr 2016 17:13:55 +0200)
Subject: Re: bug#23169: 24.5;
 Inconsistent text reflow in man pages depending on window
 configuration
References: <87bn5ug55o.fsf@HIDDEN> <83egaqvbio.fsf@HIDDEN>
 <87oa9t8iq4.fsf@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 2001:4830:134:3::e
X-Spam-Score: -6.0 (------)
X-Debbugs-Envelope-To: 23169
Cc: 23169 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Reply-To: Eli Zaretskii <eliz@HIDDEN>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -6.0 (------)

> From: Lluís <xscript@HIDDEN>
> Cc: 23169 <at> debbugs.gnu.org
> Date: Fri, 01 Apr 2016 17:13:55 +0200
> 
> > The usual way to fix these problems is to set Man-width to a non-nil
> > value, as appropriate for your frame/window dimensions.  Would that
> > solve the problem for you?
> 
> 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 -> |  |  |
>   |     |                   |  |  |
>   +-----+                   +--+--+

Isn't the window that man will use half of the window before the
command?  Then you know the width in advance, because you are familiar
with your window and frame configurations

> The ideal without breaking the asynchronicity would be to somehow display the
> new buffer on a window before populating it (display-buffer might or might not
> reuse a window here), calculate its window's width, set COLUMNS, asynchronously
> call man to populate the buffer, and then really show the buffer on the 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.

Yes, that's the problem.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#23169; Package emacs. Full text available.

Message received at 23169 <at> debbugs.gnu.org:


Received: (at 23169) by debbugs.gnu.org; 1 Apr 2016 16:20:55 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Apr 01 12:20:55 2016
Received: from localhost ([127.0.0.1]:47508 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1am1oc-00049p-Vi
	for submit <at> debbugs.gnu.org; Fri, 01 Apr 2016 12:20:55 -0400
Received: from mout.gmx.net ([212.227.15.18]:51753)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1am1oc-00049c-25
 for 23169 <at> debbugs.gnu.org; Fri, 01 Apr 2016 12:20:54 -0400
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
Message-ID: <56FE9FD4.3050802@HIDDEN>
Date: Fri, 01 Apr 2016 18:20:36 +0200
From: martin rudalics <rudalics@HIDDEN>
MIME-Version: 1.0
To: =?UTF-8?B?TGx1w61z?= <xscript@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#23169: 24.5; Inconsistent text reflow in man pages depending
 on window configuration
References: <87bn5ug55o.fsf@HIDDEN> <83egaqvbio.fsf@HIDDEN>
 <87oa9t8iq4.fsf@HIDDEN>
In-Reply-To: <87oa9t8iq4.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: quoted-printable
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+zufK2CZT5IZDBk
 cI8z0cbAKjgzXFPsH9WWRJ+prH6IA==
X-Spam-Score: -0.1 (/)
X-Debbugs-Envelope-To: 23169
Cc: 23169 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.1 (/)

 > 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





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#23169; Package emacs. Full text available.

Message received at 23169 <at> debbugs.gnu.org:


Received: (at 23169) by debbugs.gnu.org; 1 Apr 2016 15:14:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Apr 01 11:14:09 2016
Received: from localhost ([127.0.0.1]:47488 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1am0m1-0002d4-79
	for submit <at> debbugs.gnu.org; Fri, 01 Apr 2016 11:14:09 -0400
Received: from mout.gmx.net ([212.227.17.22]:54555)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <xscript@HIDDEN>) id 1am0ly-0002cT-QP
 for 23169 <at> debbugs.gnu.org; Fri, 01 Apr 2016 11:14:07 -0400
Received: from localhost ([84.88.51.85]) by mail.gmx.com (mrgmx103) with
 ESMTPSA (Nemesis) id 0MYfJW-1aGkez1FoY-00VSKp; Fri, 01 Apr 2016 17:13:59
 +0200
From: =?utf-8?Q?Llu=C3=ADs?= <xscript@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#23169: 24.5;
 Inconsistent text reflow in man pages depending on window
 configuration
References: <87bn5ug55o.fsf@HIDDEN> <83egaqvbio.fsf@HIDDEN>
Date: Fri, 01 Apr 2016 17:13:55 +0200
Message-ID: <87oa9t8iq4.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Provags-ID: V03:K0:V2c36TIFzrVmbfUGgy3vnU2p5fF+PglV8lDAf4vSGiccG8Sbjxz
 JL1kHdmk89j5515VSCb57HIyIcp+I25WICpawKBv/kgNGiuYSrP3oRrBetr3SZdJCRnFRhN
 lPqapXACebwjajdsfQfZp0UREDXu8RZBT71k5nMFzaNXrc3d4kU+LLjwFjcLWuM0RhdZc0b
 JjSo5ARwK3pFf0wR5BH/g==
X-UI-Out-Filterresults: notjunk:1;V01:K0:CAitabLxyWk=:4BVRpUixhctRU1/eRn0Cgs
 bAgNX2OcMhZJQzJ4i5obO19IL2d7CTxgPOUikB+wd0V0+zcHVuszU4em5jUv8Hqfla33BD+RK
 nx7NIPgKP5YJXO+w8g+9vB25oIKRwa2ZS0gHLEGHmXytpTjmzbIQhQWB3QG57w7+by2LTHKyV
 Zn+OGskU3BGBSxBDPgemdwGwEN0DRjuVi+MrqouyonSADwyLImGRGKONKniu9kItzaH/TNyDP
 BFc7E2OkX44UMZc+T9yOIegqPja+0v1nFWHvrnJV6dOsGUfsr1lV/WZU8OIkVH43PZfuNc+ZB
 EF5N5uRUCKs0aiW0S+fKhVCSoWQwbFD7Yet+MvWnfo48J7LIGv9H0EAdi6mfg2voyoSLceb6N
 q3Vq4J32rTbrrX4m8A2fSZT26SdOs4muMuf04S2XC3U3IYiL06oQqeSwxQro+ZD6ihNxr5iLv
 LkFKa39N69cYQycY+JwC/LxF+hTIM8IOxb7pU5M9wjqu20kLlM6bKAu9cSScISq8zzxy9f/y4
 E3Ss0d1XdUo1zYK3KEARz7SiqpcUx85VrYHc5CPjLqqZSUel9StGDX2p/+QbPvgtWrrEmHiMs
 MVmFUenF9XE2HxPqRXHAeEiQRfhz4s8ypvG7N9JPPwYprUQ87kNA1Ise0QGK9Bx/OmGx2eQVQ
 CLzwwrA4bfNmzy5/4GhyE553YWWI0RmdCJcE6zqw/HEEXxK9quNcF2Gnz7lJDYaUroDhmId/a
 5IXa0Njw90gb4UHZNfWRnopOW9gn457eRtSRnFswpLE2HTz9E1S65qAbEro8fxNnrkVRE1u9a
 oZk4BKn
X-Spam-Score: -1.7 (-)
X-Debbugs-Envelope-To: 23169
Cc: 23169 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Eli Zaretskii writes:

>> From: Llu=C3=ADs <xscript@HIDDEN>
>> Date: Thu, 31 Mar 2016 15:15:15 +0200
>>=20
>> Before the man process is started, "Man-start-calling" calculates the "C=
OLUMNS"
>> envvar using "window-width" before splitting windows. The window split h=
appens
>> later once the process finishes, and the buffer is shown through
>> "Man-notify-when-ready".
>>=20
>> Assuming the buffer is going to be shown on a vertical split, the text w=
ill go
>> beyond the window limits if there was no other window in the frame (or i=
f a new
>> window is used), or will be reflowed with the proper width if an existin=
g window
>> is reused.
>>=20
>> Manually calling "Man-update-manpage" fixes it, but it's annoying. Simpl=
y adding
>> a call to "Man-update-manpage" in "Man-notify-when-ready" would fix it
>> ("(with-current-buffer man-buffer (Man-update-manpage))" in the "friendl=
y" case
>> for me).
>>=20
>> As a bonus, this fix also reflows the text when an existing buffer is re=
used.

> Maybe I'm missing something, but won't your suggestion effectively
> replace the background rendering of man pages with fully synchronous
> one?

Oh, that's true.


> The usual way to fix these problems is to set Man-width to a non-nil
> value, as appropriate for your frame/window dimensions.  Would that
> solve the problem for you?

Thing is I don't know the width of the window that will be used, since in s=
ome
cases it does not exist yet:

  +-----+                   +--+--+
  |     |                   |  |  |
  |     | -> M-x man man -> |  |  |
  |     |                   |  |  |
  +-----+                   +--+--+

The ideal without breaking the asynchronicity would be to somehow display t=
he
new buffer on a window before populating it (display-buffer might or might =
not
reuse a window here), calculate its window's width, set COLUMNS, asynchrono=
usly
call man to populate the buffer, and then really show the buffer on the pre=
vious
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.


Cheers,
  Lluis




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#23169; Package emacs. Full text available.

Message received at 23169 <at> debbugs.gnu.org:


Received: (at 23169) by debbugs.gnu.org; 31 Mar 2016 16:49:10 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Mar 31 12:49:10 2016
Received: from localhost ([127.0.0.1]:46445 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1alfmP-0004pj-Ql
	for submit <at> debbugs.gnu.org; Thu, 31 Mar 2016 12:49:09 -0400
Received: from eggs.gnu.org ([208.118.235.92]:42395)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1alfmO-0004pU-9R
 for 23169 <at> debbugs.gnu.org; Thu, 31 Mar 2016 12:49:08 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <eliz@HIDDEN>) id 1alfmF-0004FS-Bg
 for 23169 <at> debbugs.gnu.org; Thu, 31 Mar 2016 12:49:03 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-0.2 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD
 autolearn=disabled version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:38251)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1alfmF-0004FO-86; Thu, 31 Mar 2016 12:48:59 -0400
Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1869
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1alfmE-0007HB-J3; Thu, 31 Mar 2016 12:48:59 -0400
Date: Thu, 31 Mar 2016 19:48:47 +0300
Message-Id: <83egaqvbio.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: =?iso-8859-1?Q?Llu=EDs?= <xscript@HIDDEN>
In-reply-to: <87bn5ug55o.fsf@HIDDEN> (message from
 =?iso-8859-1?Q?Llu=EDs?= on Thu, 31 Mar 2016 15:15:15 +0200)
Subject: Re: bug#23169: 24.5;
 Inconsistent text reflow in man pages depending on window
 configuration
References: <87bn5ug55o.fsf@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 2001:4830:134:3::e
X-Spam-Score: -6.0 (------)
X-Debbugs-Envelope-To: 23169
Cc: 23169 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Reply-To: Eli Zaretskii <eliz@HIDDEN>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -6.0 (------)

> From: Llus <xscript@HIDDEN>
> Date: Thu, 31 Mar 2016 15:15:15 +0200
> 
> Before the man process is started, "Man-start-calling" calculates the "COLUMNS"
> envvar using "window-width" before splitting windows. The window split happens
> later once the process finishes, and the buffer is shown through
> "Man-notify-when-ready".
> 
> Assuming the buffer is going to be shown on a vertical split, the text will go
> beyond the window limits if there was no other window in the frame (or if a new
> window is used), or will be reflowed with the proper width if an existing window
> is reused.
> 
> Manually calling "Man-update-manpage" fixes it, but it's annoying. Simply adding
> a call to "Man-update-manpage" in "Man-notify-when-ready" would fix it
> ("(with-current-buffer man-buffer (Man-update-manpage))" in the "friendly" case
> for me).
> 
> As a bonus, this fix also reflows the text when an existing buffer is reused.

Maybe I'm missing something, but won't your suggestion effectively
replace the background rendering of man pages with fully synchronous
one?

The usual way to fix these problems is to set Man-width to a non-nil
value, as appropriate for your frame/window dimensions.  Would that
solve the problem for you?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#23169; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 31 Mar 2016 13:15:38 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Mar 31 09:15:38 2016
Received: from localhost ([127.0.0.1]:45907 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1alcRm-00082I-DW
	for submit <at> debbugs.gnu.org; Thu, 31 Mar 2016 09:15:38 -0400
Received: from eggs.gnu.org ([208.118.235.92]:40928)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <xscript@HIDDEN>) id 1alcRk-000823-OF
 for submit <at> debbugs.gnu.org; Thu, 31 Mar 2016 09:15:36 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <xscript@HIDDEN>) id 1alcRb-0002CN-Ob
 for submit <at> debbugs.gnu.org; Thu, 31 Mar 2016 09:15:31 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM
 autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:53863)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <xscript@HIDDEN>) id 1alcRb-0002CH-LB
 for submit <at> debbugs.gnu.org; Thu, 31 Mar 2016 09:15:27 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:60105)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <xscript@HIDDEN>) id 1alcRW-0001Uo-1U
 for bug-gnu-emacs@HIDDEN; Thu, 31 Mar 2016 09:15:27 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <xscript@HIDDEN>) id 1alcRS-0002B1-83
 for bug-gnu-emacs@HIDDEN; Thu, 31 Mar 2016 09:15:21 -0400
Received: from mout.gmx.net ([212.227.15.19]:63971)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <xscript@HIDDEN>) id 1alcRR-0002Ao-UN
 for bug-gnu-emacs@HIDDEN; Thu, 31 Mar 2016 09:15:18 -0400
Received: from localhost ([84.88.51.85]) by mail.gmx.com (mrgmx002) with
 ESMTPSA (Nemesis) id 0LmbVT-1aCpeh1FQ3-00aBMd for <bug-gnu-emacs@HIDDEN>;
 Thu, 31 Mar 2016 15:15:16 +0200
From: =?utf-8?Q?Llu=C3=ADs?= <xscript@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 24.5; Inconsistent text reflow in man pages depending on window
 configuration
Date: Thu, 31 Mar 2016 15:15:15 +0200
Message-ID: <87bn5ug55o.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K0:p5TAXegnye/SquTl0xvLESQC6WXIGYkLmp9GfCT4mnxzcfw3vaH
 0Fuh9oSOBVCdshdzYE4gJtUkMbh3kDu5Zv9uLjaMSRb3tiZWRGSP6hB0ocjXk5DAYdblOcV
 KKA0/vTFpTIxJBraiGezWckrw1Z5h9rBaO2rL73mIgqudXXkliMI/V2HBI7kt0+np/aJm5F
 SaoYT/pkN2RRT9Ubkb2jg==
X-UI-Out-Filterresults: notjunk:1;V01:K0:9o0+m4/YWYo=:W6OQuIQZPyaWWDxg1UiTn8
 /zuh1FwRM4tCe2/dHrKFpM95oSGPIGoy3w6vjzEWUh9KMJn75TSnpsQsKsdJla7lkLmXCZqrM
 UgkNqzFuhI6gHPtaWR9ewlvM5d8XQcDESXVPbeLQrit1zBETd2tGZ48k/pSilhAapxGNyhpYG
 +mcBRv/vstVT+SsiVkzqgRWVxczSjR4OkwfVP9jqdIr1SsQiqzXEfatDSEBzum+6Ly4nw1OCI
 f4Dm4v5YMrHASVamaxO6Xu6H9FG0z4rg1OkMHqEZ5DCrLHHUujaYJ5sgMhqgp9jXBKtwIYoiD
 H+wjPWBIOJmWfM1f5lH0XiJzK/Q2YYeKHjMzzgociwGaEqKavPdv2CbHNiHd1f1p3JSqa2mOk
 mWwFcHKvDaxm+T+ej/N1I+zIk+KxAXZMWN4PgEjD6CidoKphUqz1LwMp/UZJV9agStDKHOSSE
 N8agv6e352bPcshU4gusuv169TGW0K1R0CR8k2p1rlQajXDLrJ/D3Ub9hjNu7xXloMldTufxD
 w6vhSUPq5HU3bnz8C9yON3FbgIOES2ZzFtgyxl3oWuvkoFeVJFEQiz8q1ks3arAtqboZes/R0
 CdGK0V0h5epz/YRX6Ey1bMAyHfqidfkpLet3ICt3b21ByOgFEE9WTes+y7Sdz7Q1tQRL+8XLl
 rZqZvsJMZZvwmOVcOmjJi6iP9PZP811UwS1sRxeJMfIsF1wnysFiKZb17tu5rWTCyrBsr+TeZ
 jCHaMU7H1EuIiQHM1n3kBE95jb4M/zTOeR7vhPjZ/3PNLB88FmV0vCkRi0e1Oa+AQlzVEPLwE
 f8wIZEC
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -4.1 (----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -4.1 (----)

Before the man process is started, "Man-start-calling" calculates the "COLUMNS"
envvar using "window-width" before splitting windows. The window split happens
later once the process finishes, and the buffer is shown through
"Man-notify-when-ready".

Assuming the buffer is going to be shown on a vertical split, the text will go
beyond the window limits if there was no other window in the frame (or if a new
window is used), or will be reflowed with the proper width if an existing window
is reused.

Manually calling "Man-update-manpage" fixes it, but it's annoying. Simply adding
a call to "Man-update-manpage" in "Man-notify-when-ready" would fix it
("(with-current-buffer man-buffer (Man-update-manpage))" in the "friendly" case
for me).

As a bonus, this fix also reflows the text when an existing buffer is reused.


Thanks,
  Lluis




Acknowledgement sent to Lluís <xscript@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#23169; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sat, 2 Apr 2016 11:30:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.