[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#23169: 24.5; Inconsistent text reflow in man pages depending on wind
bug#23169: 24.5; Inconsistent text reflow in man pages depending on window configuration
Fri, 01 Apr 2016 17:13:55 +0200
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)
Eli Zaretskii writes:
>> From: Lluís <address@hidden>
>> Date: Thu, 31 Mar 2016 15:15:15 +0200
>> Before the man process is started, "Man-start-calling" calculates the
>> envvar using "window-width" before splitting windows. The window split
>> later once the process finishes, and the buffer is shown through
>> Assuming the buffer is going to be shown on a vertical split, the text will
>> beyond the window limits if there was no other window in the frame (or if a
>> window is used), or will be reflowed with the proper width if an existing
>> is reused.
>> Manually calling "Man-update-manpage" fixes it, but it's annoying. Simply
>> 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"
>> 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
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 some
cases it does not exist yet:
| | | | |
| | -> M-x man man -> | | |
| | | | |
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
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.
- bug#23169: 24.5; Inconsistent text reflow in man pages depending on window configuration,