Subject: bug#18541: 24.3; ruler-mode: margins are reset when doing next-buffer/previous-buffer

From: Lars Ingebrigtsen <[email-masked]>
Date: Thu, 19 Aug 2021 17:34:33 +0200

Stefan Monnier <[email-masked]> writes:

> Mostly, should the margin set by the user be considered as a property of
> the buffer (applied wherever the buffer gets displayed), or is it
> a property that applies to this buffer but only in this particular window?
>
> E.g. if I have the buffer in window 1 and then display it in window 2,
> should window 2 get the same margins as well?  What if window 2 has
> a completely different width than window 1?

Those are all very good questions.

Perhaps it only makes sense to restore window margins if we're popping
the same buffer back into the same window?

But that's such an unlikely thing to happen that I'm not sure it's much
of a user interface.  Perhaps restoring it if jumping back to the buffer
in the same frame?

How would we implement this?  Perhaps via a hook in
`window--display-buffer' that `ruler-mode' could set?

Or...  we could just leave it alone, because I suspect that whatever we
do here, it's going to be pretty confusing.  Anybody got an opinion here?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no