From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Ingo Lohmar Newsgroups: gmane.emacs.devel Subject: set-frame-size should respect line-spacing!? Date: Fri, 11 Oct 2019 22:44:34 +0200 Message-ID: <87blun57wt.fsf@kenko.localhost.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="215994"; mail-complaints-to="usenet@blaine.gmane.org" To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Oct 11 22:44:58 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iJ1mT-000u30-9g for ged-emacs-devel@m.gmane.org; Fri, 11 Oct 2019 22:44:57 +0200 Original-Received: from localhost ([::1]:56814 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iJ1mS-0008OR-0I for ged-emacs-devel@m.gmane.org; Fri, 11 Oct 2019 16:44:56 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49839) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iJ1mG-0008Mt-Vb for emacs-devel@gnu.org; Fri, 11 Oct 2019 16:44:46 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iJ1mF-0006at-0g for emacs-devel@gnu.org; Fri, 11 Oct 2019 16:44:44 -0400 Original-Received: from mout01.posteo.de ([185.67.36.65]:40760) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iJ1mC-0006aN-To for emacs-devel@gnu.org; Fri, 11 Oct 2019 16:44:42 -0400 Original-Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id D733416005D for ; Fri, 11 Oct 2019 22:44:35 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1570826675; bh=S47J9n2E3dmSoVJmb4+eUfj0o6W1R6ljWczG1HR87+k=; h=From:To:Subject:Date:From; b=qJNrnE9Ia2F2lXUjsw/dGC47ZxolGVEvK6YN3+voW5WBkJh5Q6wYAaESRewi1kVzb uXW4XvGAYX70F7sCmR4qoOc7S12mVCgnni53ZaYFpBTr3K2iZ143tcdFwX5gITzCIS gk9iO4d7aP7Esya/2d0DGw+xKlFGCDka8GPyoO2G0j5Lxu7CEYG2RIeWjsKUFS5N/G OkZ7TN9z8T7TCfnJuCuZaR+TONZYctSumeoVfCngglFgioSnMTI8izDOsvpAmN9wSX nwKHHrMz/+k+WQ1K+EQjggGN4TKBX8TbO3KnNjwgS2TG/R1S1fLd0nn0pTwWS0oAR0 l0dSscULaHwPw== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 46qg1G6yPvz6tmF for ; Fri, 11 Oct 2019 22:44:34 +0200 (CEST) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 185.67.36.65 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:240899 Archived-At: In Bug#37563, I reported that `fit-frame-to-buffer' ignores a default value of `line-spacing' > 0, whence the buffer might not be tall enough --- that's what happened with the `posframe' pkg that is, eg, used by `company-posframe' to display completions. Martin fixed this and related issues in window.el quickly and thoroughly, for which I am grateful. Since I tested with a minimal example, however, I did not realize before that there is another code path that directly uses the C function `set-frame-size', with the same effect: If line-spacing is > 0 in the frame, it is not accounted for, and the frame lacks a few pixels in height (number of lines * "line-spacing effect"). This appears to be a bug: If asked for a frame N lines tall, N lines (of default-font's character height plus the effect of line-spacing) should fit, right? Maybe this affords some opportunity to concentrate this code on either the lisp or the C side..?