emacs-devel
[Top][All Lists]
Advanced

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

Re: set-frame-size should respect line-spacing!?


From: martin rudalics
Subject: Re: set-frame-size should respect line-spacing!?
Date: Sat, 12 Oct 2019 10:25:13 +0200

> Are you saying `set-frame-size' is supposed to ignore line-spacing?  In
> that case, what is the correct way to set the frame-size in the
> pixel-exact way?

By using the PIXELWISE argument of 'set-frame-size'.  But note that
this sets the text size of the frame, see also the 'text-pixels' type
specification (section 29.4.3.3 Size Parameters of the Elisp manual).
I am working on 'inner-pixels', 'outer-pixels' and 'native-pixels' but
all these are so intrinsically platform dependent that I've hardly
made any progresss in the past years.

I earlier explained why we cannot make 'set-frame-size' obey the line
spacing of a specific buffer: A buffer might not be alone on a frame
and even if it is, switching to a buffer previously displayed in that
window might become inconvenient.

So we have a number of options which all will take considerable time
to implement:

(1) Change the semantics of the PIXELWISE argument for a number of
    user functions.  For 'set-frame-size' we could say that if its
    value is 'linewise', then use the 'window-default-line-height'
    value of the frame's selected window.

(2) Add, as also mentioned earlier, a frame parameter that controls
    the behavior in some way.

(3) Add some global option to control the behavior.  I suppose that
    this might be too strong.

And then we have to establish the set of commands we want to affect.
From Bug#14825 we know that 'split-window-below' is one candidate and
probably most of the 'window-resize' type functions.  Then we probably
want to have size reporting functions handle line spaces as well.  If
you search for the occurrence of the term 'pixelwise' in the code of
window.el you will understand how much of change that would mean.

martin



reply via email to

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