From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#43506: 26.1; line-height sometimes has no effect on the line height Date: Sat, 19 Sep 2020 11:45:06 +0300 Message-ID: <83r1qy2m0d.fsf@gnu.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8628"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 43506@debbugs.gnu.org To: Markus Triska Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Sep 19 10:46:28 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kJYVo-0002Cm-PZ for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 19 Sep 2020 10:46:28 +0200 Original-Received: from localhost ([::1]:38110 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kJYVn-0007cZ-Rk for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 19 Sep 2020 04:46:27 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36758) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kJYVO-0007cE-SN for bug-gnu-emacs@gnu.org; Sat, 19 Sep 2020 04:46:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:34080) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kJYVO-0007hi-8f for bug-gnu-emacs@gnu.org; Sat, 19 Sep 2020 04:46:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kJYVO-00083F-77 for bug-gnu-emacs@gnu.org; Sat, 19 Sep 2020 04:46:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 19 Sep 2020 08:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43506 X-GNU-PR-Package: emacs Original-Received: via spool by 43506-submit@debbugs.gnu.org id=B43506.160050510427350 (code B ref 43506); Sat, 19 Sep 2020 08:46:02 +0000 Original-Received: (at 43506) by debbugs.gnu.org; 19 Sep 2020 08:45:04 +0000 Original-Received: from localhost ([127.0.0.1]:45626 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kJYUR-00076c-Aw for submit@debbugs.gnu.org; Sat, 19 Sep 2020 04:45:03 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:57914) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kJYUP-00074v-1q; Sat, 19 Sep 2020 04:45:01 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:41797) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kJYUJ-0007Nm-77; Sat, 19 Sep 2020 04:44:55 -0400 Original-Received: from [176.228.60.248] (port=3202 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kJYUF-0007Dc-D4; Sat, 19 Sep 2020 04:44:51 -0400 In-Reply-To: (message from Markus Triska on Sat, 19 Sep 2020 09:21:38 +0200) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:188370 Archived-At: tags 43506 notabug thanks > From: Markus Triska > Date: Sat, 19 Sep 2020 09:21:38 +0200 > > (progn > (goto-char (point-max)) > (insert "\n") > (insert (propertize "\n" 'line-height 3)) > (forward-line -1) > (line-pixel-height)) > > In my case, the minibuffer then states "17". The expected result is 3, > because documentation states: > > A newline can have a ‘line-height’ text or overlay property that > controls the total height of the display line ending in that newline. That's not all the documentation says about 'line-height'. It also says this (in the "Line Height" node referenced from the place you cite): There are several ways to explicitly specify a larger line height, either by specifying an absolute height for the display line, or by specifying vertical space. However, no matter what you specify, the actual line height can never be less than the default. [...] Finally, a newline can have a ‘line-spacing’ text or overlay property that can enlarge the default frame line spacing and the buffer local ‘line-spacing’ variable: if its value is larger than the buffer or frame defaults, that larger value is used instead, for the display line ending in that newline. IOW, this property can only enlarge the line's height, which is confirmed by the fact that using 300 in your example does work as expected. This is not a bug. This property exists so a Lisp program could produce higher lines than the default. To produce lower lines, you can use a face with a low :height attribute, and arrange for the newline to have that face. You can find an example of doing that in log-edit.el. > If possible, could you please make line-height control the total height > of the display line also in the original example, or alternatively > consider changing the documentation to mention all relevant exceptions? The documentation already mentions the limitations, see above.