Subject: Re: bug#32536: displayed width of man pages

From: Juri Linkov <[email-masked]>
Date: Wed, 28 Nov 2018 01:58:05 +0200

> It should also include the following idiosyncrasy: Suppose a user
> saves away a window in a configuration in some register, kills it and
> revives the window from that register a few hours later.  How should
> running size change functions handle that case?  The window has
> neither changed buffer nor size since the last time it was shown.  I
> currently just run the buffer-local hook (since the window was not
> there the last time the functions were run) but without further
> notice.  If someone thinks that the application should get notified in
> some sense about this fact, then please tell me how.

Hard to tell, we need to see its consequences in practice.

>>> So essentially you would have to rerun occur whenever the Man buffer
>>> is reformatted.
>>
>> It's too ad-hoc to find all Occur buffers created from the Man buffer,
>> and revert all of them.
>
> Is it reverting Man buffers only that causes problems?

This problem is not only in Man buffers, but also in Occur buffers.

Maybe Occur should save points in addition to markers, so if after the
original buffer is reverted, and marker-position value becomes 1, then
use remembered point's value as a number, not invalidated marker.

This is called "graceful degradation".

Currently this is what is used in 'Man-update-manpage'.  You can see
how it saves 'old-pos' from (point), not from (point-marker).

> Why is it that we care so much about Man buffers and live with the
> fact that, for example, our *info* buffers have rigid width?

*Info* buffers are complied, but dynamically generated Man buffers
give us flexibility.