From unknown Fri Jun 20 18:15:13 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#43105 <43105@debbugs.gnu.org> To: bug#43105 <43105@debbugs.gnu.org> Subject: Status: (window-body-height) Reporting Too Large of Value Reply-To: bug#43105 <43105@debbugs.gnu.org> Date: Sat, 21 Jun 2025 01:15:13 +0000 retitle 43105 (window-body-height) Reporting Too Large of Value reassign 43105 emacs submitter 43105 William Carroll severity 43105 normal tag 43105 notabug thanks From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 29 14:06:17 2020 Received: (at submit) by debbugs.gnu.org; 29 Aug 2020 18:06:17 +0000 Received: from localhost ([127.0.0.1]:49086 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kC5F1-0002Jc-Qr for submit@debbugs.gnu.org; Sat, 29 Aug 2020 14:06:17 -0400 Received: from lists.gnu.org ([209.51.188.17]:54020) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kC4N7-0000zH-NG for submit@debbugs.gnu.org; Sat, 29 Aug 2020 13:10:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35604) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kC4N7-00086C-Ic for bug-gnu-emacs@gnu.org; Sat, 29 Aug 2020 13:10:33 -0400 Received: from mail-ej1-x62f.google.com ([2a00:1450:4864:20::62f]:42923) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kC4N5-0003eZ-Q7 for bug-gnu-emacs@gnu.org; Sat, 29 Aug 2020 13:10:33 -0400 Received: by mail-ej1-x62f.google.com with SMTP id j25so3178726ejk.9 for ; Sat, 29 Aug 2020 10:10:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=+Tx3r+khQ7MMqLE6fxvS3nXj+nb5TKv2VmJkGseDRe4=; b=gLalbM2p+uWoNHo43uPWk7b3KsfWJGxNMImR+Go/efiRDTrBbQXzXc4OTzPfuQZrqx bqWzW7CpQhsKvK7zKZTk4nLxlDaVdq3gPso4ShNunfgdG1OumSlnP/K1/fil6P5wE/Fe V1b66nxS3W6WOmUf8C27p/7ZuMa+PlQaQb7UhKWsjO5aPY8w/Mt0VLySgBx15Fi9vsdi d5c+eEJrgvEkRm155qmFyxK6oOtWlpjsUQ3GPfwqCi86yAcHeotNPicTvUzbtKwsOTcg hk9a2aMY5G+RqOENF75bQ90Xzb/AxWGmXxEET6OU8BuPgFpI6yn1U4Z5VjOG3Ax0xbmA 4Hgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=+Tx3r+khQ7MMqLE6fxvS3nXj+nb5TKv2VmJkGseDRe4=; b=EgG1Kv38eBww4nENzzKFYhCQ/Bf10d0QIzSAinyfUMbDw/ZFbAfp9Q6BtbZDUK5pXO 5B2TQ8fPGaamEc8mYo1HBCTZEtEhnpKOJntFaGadeSlcp/DlGldnmKtnObRDD7QS1N9k LBaPClcHo2jd61asAWDHgnKvVFRA50pm8s2XMmcXWeUyu5h/CSilSp1UQqY50QubotiB ON5KlN99DcwMQNru4SaclHxmacSKf/MzchaymgdF8zdLiyfYLp8FvCutTJJWUVQOg4Hf YB4Mnr9O7memI26CfLPC2la4LSPqleRaMIPQUWWelDtukjtSvvT4TNxYf033TceKzqeZ WKXQ== X-Gm-Message-State: AOAM532wgHb4VD7OFAmsA0T0AzOa2cqFtS6bc3rBHqD8Q/PKBQGtGbJK 3N/lWg1AyAV2LlJp3x/QmZzjCcyt6q7Now== X-Google-Smtp-Source: ABdhPJw2RTQsZfIbajX2xeFc4tMi+AqtpqKxNEwRdedqRKAzf8IRTeZW7clA3srZu56vmO1dQurL5A== X-Received: by 2002:a17:906:5812:: with SMTP id m18mr4418031ejq.66.1598721029264; Sat, 29 Aug 2020 10:10:29 -0700 (PDT) Received: from mail-wr1-f53.google.com (mail-wr1-f53.google.com. [209.85.221.53]) by smtp.gmail.com with ESMTPSA id e15sm2676986ejb.18.2020.08.29.10.10.28 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 29 Aug 2020 10:10:28 -0700 (PDT) Received: by mail-wr1-f53.google.com with SMTP id w13so2039304wrk.5 for ; Sat, 29 Aug 2020 10:10:28 -0700 (PDT) X-Received: by 2002:a05:6000:10c6:: with SMTP id b6mr4191521wrx.257.1598721027882; Sat, 29 Aug 2020 10:10:27 -0700 (PDT) MIME-Version: 1.0 From: William Carroll Date: Sat, 29 Aug 2020 18:10:17 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: (window-body-height) Reporting Too Large of Value To: bug-gnu-emacs@gnu.org Content-Type: multipart/alternative; boundary="000000000000f6a6c105ae073e6d" Received-SPF: pass client-ip=2a00:1450:4864:20::62f; envelope-from=wpcarro@gmail.com; helo=mail-ej1-x62f.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -0.1 (/) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Sat, 29 Aug 2020 14:06:15 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) --000000000000f6a6c105ae073e6d Content-Type: text/plain; charset="UTF-8" I believe `(window-body-height)` does not account for non-zero `line-spacing` amounts. This causes `(window-body-height)` in graphical Emacs to report values larger than the number of lines of text that can render on the screen. This affects programs like vterm.el and others that rely on `(window-body-height)`. In my particular case, when I ran `man` and `less` from vterm.el, it rendered things above the top "fold" of the screen. When I tried to reproduce these issues with `emacs -nw`, everything was fine. I imagine this is because `emacs -nw` disregards `line-spacing`. I'm happy to share more information to help someone reproduce this issue. --000000000000f6a6c105ae073e6d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I believe `(window-body-height)` does not account for non-= zero `line-spacing` amounts. This causes `(window-body-height)` in graphica= l Emacs to report values larger than the number of lines of text that can r= ender on the screen.

This affects programs like vterm.el= and others that rely on `(window-body-height)`. In my particular case, whe= n I ran `man` and `less` from vterm.el, it=C2=A0rendered things above the t= op "fold" of the screen.

When I tried to= reproduce these issues with `emacs -nw`, everything was fine. I imagine th= is is because `emacs -nw` disregards `line-spacing`.

I'm happy to share more information to help someone reproduce this i= ssue.
--000000000000f6a6c105ae073e6d-- From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 29 14:37:32 2020 Received: (at 43105) by debbugs.gnu.org; 29 Aug 2020 18:37:32 +0000 Received: from localhost ([127.0.0.1]:49134 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kC5jI-00035P-LD for submit@debbugs.gnu.org; Sat, 29 Aug 2020 14:37:32 -0400 Received: from eggs.gnu.org ([209.51.188.92]:40184) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kC5jH-00035C-4m for 43105@debbugs.gnu.org; Sat, 29 Aug 2020 14:37:31 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:57050) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kC5jB-0004zF-Os; Sat, 29 Aug 2020 14:37:25 -0400 Received: from [176.228.60.248] (port=1854 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kC5jB-0007xp-1J; Sat, 29 Aug 2020 14:37:25 -0400 Date: Sat, 29 Aug 2020 21:37:19 +0300 Message-Id: <83pn79xpr4.fsf@gnu.org> From: Eli Zaretskii To: William Carroll In-Reply-To: (message from William Carroll on Sat, 29 Aug 2020 18:10:17 +0100) Subject: Re: bug#43105: (window-body-height) Reporting Too Large of Value References: MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 43105 Cc: 43105@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: William Carroll > Date: Sat, 29 Aug 2020 18:10:17 +0100 > > I believe `(window-body-height)` does not account for non-zero `line-spacing` amounts. This causes > `(window-body-height)` in graphical Emacs to report values larger than the number of lines of text that can > render on the screen. window-body-height reports the height of the window's body in units of canonical character height: If PIXELWISE is nil, return the largest integer smaller than WINDOW’s pixel height divided by the character height of WINDOW’s frame. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Thus, window-body-height is by design insensitive to factors like non-default fonts, line-spacing, etc. > This affects programs like vterm.el and others that rely on `(window-body-height)`. In my particular case, > when I ran `man` and `less` from vterm.el, it rendered things above the top "fold" of the screen. Then the bug is in vterm.el: it should use other APIs to get the dimensions in terms of actual number of lines in the window. The function window-body-height works as intended. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 01 10:30:09 2020 Received: (at 43105) by debbugs.gnu.org; 1 Sep 2020 14:30:09 +0000 Received: from localhost ([127.0.0.1]:56680 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kD7IX-0003Am-0x for submit@debbugs.gnu.org; Tue, 01 Sep 2020 10:30:09 -0400 Received: from mail-ej1-f67.google.com ([209.85.218.67]:39760) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kD7IS-00038R-Pw for 43105@debbugs.gnu.org; Tue, 01 Sep 2020 10:30:05 -0400 Received: by mail-ej1-f67.google.com with SMTP id p9so1961655ejf.6 for <43105@debbugs.gnu.org>; Tue, 01 Sep 2020 07:30:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:in-reply-to:references:user-agent :mime-version:date:message-id:subject:to:cc :content-transfer-encoding; bh=BDie9XKDez+/wv4EPB2y3gyIgBt0HABQGar3qXOXndI=; b=owMxZfdZmCX5ybtOCx/PcCvZWmuoAK8KKwLKlXbYfAUTrhWz6cJelaxACdKK/NS1ex a6F/z+md2if2X1nTCPdnWSq/VtAK0M8XbTP09sX2IqktM51GKz2mgDIfKu6fg96O1lzt XI2NDC9/4Uw2KDntXpGAV+ANTsLOPuw3VvtKwOMo8gp/cUDQLUApjc2P+Ck7KHnIYlrZ 9HYqs7Bk9nHrM+vfeM5sDQ18tvtNmwIxoPY4Dk63XUMAkibrkUClQRVqdlT26AlVVjcD Km76uZ2TCItQAnjKNAopzo2hP1w55uO20bwz89PEYlAjA9BzAUyWM1aZ370gFwr9ByhG bMRA== X-Gm-Message-State: AOAM5327l4ZeOn2WyTli1r+qi40+JHCRs/y49clthNFPpMnvPEjrlRWF kIzZ1sdqvxrUvSugOXrLG5qAe8wAjWEdYoP6H3c= X-Google-Smtp-Source: ABdhPJzNgj+rWTvg8PG+V49Yf7G72aEy3WG7vOmEx0RElmjtRrIjTTtzJy6J/iYjR+I+NvrCU+RToVcOjlhkrQVOV+o= X-Received: by 2002:a17:906:3a02:: with SMTP id z2mr1662001eje.287.1598970599056; Tue, 01 Sep 2020 07:29:59 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Tue, 1 Sep 2020 07:29:58 -0700 From: Stefan Kangas In-Reply-To: <83pn79xpr4.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 29 Aug 2020 21:37:19 +0300") References: <83pn79xpr4.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Date: Tue, 1 Sep 2020 07:29:58 -0700 Message-ID: Subject: Re: bug#43105: (window-body-height) Reporting Too Large of Value To: Eli Zaretskii Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 43105 Cc: 43105@debbugs.gnu.org, William Carroll X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) tags 43105 notabug close 43105 thanks Eli Zaretskii writes: >> From: William Carroll >> Date: Sat, 29 Aug 2020 18:10:17 +0100 >> >> I believe `(window-body-height)` does not account for non-zero `line-spa= cing` amounts. This causes >> `(window-body-height)` in graphical Emacs to report values larger than t= he number of lines of text that can >> render on the screen. > > window-body-height reports the height of the window's body in units of > canonical character height: > > If PIXELWISE is nil, return the largest integer smaller than WINDOW=E2= =80=99s > pixel height divided by the character height of WINDOW=E2=80=99s frame. > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > > Thus, window-body-height is by design insensitive to factors like > non-default fonts, line-spacing, etc. > >> This affects programs like vterm.el and others that rely on `(window-bod= y-height)`. In my particular case, >> when I ran `man` and `less` from vterm.el, it rendered things above the = top "fold" of the screen. > > Then the bug is in vterm.el: it should use other APIs to get the > dimensions in terms of actual number of lines in the window. The > function window-body-height works as intended. I'm therefore closing this bug report. From unknown Fri Jun 20 18:15:13 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 30 Sep 2020 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator