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: Eli Zaretskii
Subject: Re: Better handling of window margins
Date: Thu, 03 Dec 2015 08:49:20 +0200

> Date: Wed, 02 Dec 2015 19:11:13 +0100
> From: martin rudalics <address@hidden>
> CC: address@hidden, address@hidden
> 
>  >>   > For example, linum-mode
>  >>   > will specify a margin width of N columns, and display width of the
>  >>   > same N columns in pixels.
>  >>
>  >> How would this work with scaled text?
>  >
>  > Not sure what problem bothers you.
> 
> You say that linum-mode will specify a "display width of the same N
> columns in pixels".  How would it react to an increase of the width of
> the default face?

How is it covered today?

> IIUC this is not covered by any special hook so it has to be done
> via ‘post-command-hook’.  No great deal but it shows that
> ‘post-command-hook’ is indispensable for such modes.

Even if this conclusion is correct, is it really relevant to the
concrete issue being discussed?  If the only problems we could think
about, after my suggested solution is implemented, are the ones that
don't have any good solution now, it means the main problem -- how to
allow several features request display margins without stomping on
each other's toes -- is most probably solved.  Then the other problems
should be considered and solutions for them sought.

IOW, what I suggested wasn't supposed to solve any problem except one:
how can several features display simultaneously on the same display
margin.  It wasn't supposed magically solve other related or unrelated
problems.

>  >>   >   . for splitting the window with "C-x 2" and "C-x 3", the mode could
>  >>   >     simply invoke the correct splitting function itself
>  >>
>  >> When two modes simultaneously use the margins, which splitting function
>  >> would be chosen?
>  >
>  > It's up to the mode that wants to support splitting in any non-trivial
>  > manner.  The mode knows exactly what are its needs, so it is free of
>  > the guesswork.
> 
> So you mean there's no need for any new infrastructure here - the
> ‘split-window’ window parameter can take care of this.

I simply don't believe there could be a generic solution that doesn't
involve active participation of the modes that are affected by this.

>  > In any case, the same problem exists if this is somehow guessed.  The
>  > infrastructure cannot know enough about the modes to make a decision.
>  >
>  >>   >   . for splitting the window as result of some command calling
>  >>   >     display-buffer, we could expect the modes to customize the
>  >>   >     display-buffer-* variables to control how the window is split (if
>  >>   >     there are currently no features/variables to that effect, we 
> should
>  >>   >     add them)
>  >>
>  >> When two modes simultaneously use the margins, which buffer display
>  >> function would be chosen?
>  >
>  > The same problem exists with the proposed solution, doesn't it?
> 
> Is there one?

Of course: imagine that the effects of 2 or more elements of the list
contradict each other.  Which one to choose?




reply via email to

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