emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Better handling of window margins


From: Stefan Monnier
Subject: Re: Better handling of window margins
Date: Fri, 04 Dec 2015 12:30:21 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

>> That's the point of having SIZING-DESCRIPTOR be a function: it receives
>> a description of the margin chosen by "all other users" and adjusts it
>> according to its own needs.
> Then that function is not specific to any particular user of the margin,

To me it's obvious that it is specific.  So I think I lost you.

>> If SIZING-DESCRIPTOR just returns the sum (or the max) of the provided
>> size and its own use, ordering doesn't matter, for example.
>> And for the remaining cases we could rely on add-function's `depth' to
>> impose a particular ordering.
> IIUC what you mean by "ordering", it cannot be controlled anyway, not
> without non-trivial changes in the display engine.

Yep, I definitely lost you, because the way I see it the display engine
has nothing to do with this.

Here's the scenario I have in mind:

Basically, package A uses the margin to place a few things in it.  So it
needs a left margin that at least X pixels wide so its goodies
are visible (i.e. its function will return the max between X and
whatever else is decided).

Then comes package B which uses that same margin for other things of
size Y.  Since its other things are placed elsewhere, it requests that
the margin be the max of Y and whatever else is decided.

Then comes package C which adds something of size Z to every line in
that same margin.  So it requests (with "depth") to be placed
last, and its function returns the sum of Z and whatever else
is decided.


        Stefan


PS: Clearly, this is related to the issue of how to share the margin
itself (rather than how to cooperate in setting the margin's width).
Currently, this is done arbitrarily by the display engine, but we should
instead provide new functions which perform this combination in Elisp
and then place a single `display' property for the margin.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]