GNU bug report logs - #15886
24.3.50; Incorrect window-text-height with non-zero line-spacing

Previous Next

Package: emacs;

Reported by: Robert Dallas Gray <mail <at> robertdallasgray.com>

Date: Wed, 13 Nov 2013 19:24:02 UTC

Severity: minor

Found in version 24.3.50

Done: Stefan Kangas <stefan <at> marxist.se>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Robert Dallas Gray <mail <at> robertdallasgray.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 15886 <at> debbugs.gnu.org
Subject: bug#15886: 24.3.50; Incorrect window-text-height with non-zero line-spacing
Date: Wed, 13 Nov 2013 20:55:20 +0000
On 13 Nov 2013, at 20:44, Eli Zaretskii <eliz <at> gnu.org> wrote:

>> From: Robert Dallas Gray <mail <at> robertdallasgray.com>
>> Date: Wed, 13 Nov 2013 20:36:14 +0000
>> Cc: 15886 <at> debbugs.gnu.org
>> 
>> 
>> On 13 Nov 2013, at 20:32, Eli Zaretskii <eliz <at> gnu.org> wrote:
>> 
>>>> From: Robert Dallas Gray <mail <at> robertdallasgray.com>
>>>> Date: Wed, 13 Nov 2013 19:23:19 +0000
>>>> 
>>>> On a graphical display, when `line-spacing' is non-zero,
>>>> `window-text-height' reports an incorrect number; equally,
>>>> `set-window-text-height' can't be used properly. This impacts on
>>>> libraries which use `set-window-text-height' e.g. to attempt to size a
>>>> window accurately.
>>> 
>>> Those libraries should use 'window-screen-lines' instead.
>>> 
>>> I think 'window-text-height' should continue doing what it does, as
>>> many packages, and Emacs itself, depend on its current behavior.
>> 
>> OK, but is there a parallel setter method, or some way to set the height of a window in pixels, so that a window could be correctly sized taking into account line-spacing?
> 
> I don't understand: if you need to get a window's height and then use
> it to change the height, then why isn't 'window-text-height' and
> set-window-text-height' what you want?  They are consistent with one
> another.
> 
> Perhaps it would help if you explain more about what you want to
> accomplish, and why.

Well, it's not my library, but the reason it fails (in my setup, where I have line-spacing set to 2), is that it tries to set the height of the minibuffer using 'set-window-text-height' -- which, in my setup, sets the height incorrectly (the bottom of the minibuffer is obscured). I note that 'set-window-text-height' uses 'window-text-height' 

If there's a setter equivalent of 'window-screen-lines' (which there doesn't seem to be), then I can raise that with the maintainer. Otherwise, is there a way to set window height in pixels (which can be easily worked out from the number of lines of text)? If not, then there's no way (that I can see) to accomplish the intended function of 'set-window-text-height' in gui Emacs.





This bug report was last modified 4 years and 204 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.