From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: martin rudalics via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#70894: [PATCH] * lisp/window.el (fit-window-to-buffer): Fix width calculation Date: Sun, 19 May 2024 11:22:36 +0200 Message-ID: <9ce8c102-65eb-4c66-8474-87ce7bb7a55b@gmx.at> References: <86jzjre9xh.fsf@gnu.org> <86le46b4ue.fsf@gnu.org> Reply-To: martin rudalics Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39504"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: Morgan.J.Smith@outlook.com, 70894@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun May 19 11:23:23 2024 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 1s8clG-000A9G-8c for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 19 May 2024 11:23:22 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s8ckt-0007Mk-PQ; Sun, 19 May 2024 05:22:59 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s8cks-0007Mc-Rp for bug-gnu-emacs@gnu.org; Sun, 19 May 2024 05:22:58 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s8cks-0001Ko-Jy for bug-gnu-emacs@gnu.org; Sun, 19 May 2024 05:22:58 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s8ckw-00032d-7m for bug-gnu-emacs@gnu.org; Sun, 19 May 2024 05:23:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 19 May 2024 09:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70894 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 70894-submit@debbugs.gnu.org id=B70894.171611057311683 (code B ref 70894); Sun, 19 May 2024 09:23:02 +0000 Original-Received: (at 70894) by debbugs.gnu.org; 19 May 2024 09:22:53 +0000 Original-Received: from localhost ([127.0.0.1]:35893 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s8ckm-00032J-MO for submit@debbugs.gnu.org; Sun, 19 May 2024 05:22:53 -0400 Original-Received: from mout.gmx.net ([212.227.17.21]:49677) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s8ckj-000327-Q1 for 70894@debbugs.gnu.org; Sun, 19 May 2024 05:22:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.at; s=s31663417; t=1716110557; x=1716715357; i=rudalics@gmx.at; bh=vXeofv5poBBhnSxCUOabAcwsHZv7DoowR5lz/DnYYNU=; h=X-UI-Sender-Class:Message-ID:Date:MIME-Version:Subject:To:Cc: References:From:In-Reply-To:Content-Type: Content-Transfer-Encoding:cc:content-transfer-encoding: content-type:date:from:message-id:mime-version:reply-to:subject: to; b=I5p9Lqv2W7cQu6smtxTv3Mu/CrHfSurUpxlZl/FLShL6/wZ41PwxV5FoBHRL7Cdh cER9Run78Hl2M1n6s1himLaGemdAWeewdxtHjC5FDyii0X7SVRsQeGOmVmJIyxYzV roNtBpN8UwgV4pXqTYOIXSCnA8CxW/z/pf9/TgojJtbM2xYwTpDJURl5WBnj4rzlA hN1iFmdVHtDoLZOg5twEy1F07Ni3C6D7aGDgr2VqCXqWbWGHpX8fplzb3GiO9E1S+ qjinHtpYS0OLk3vhn1WBlIATJBk53c4poXupYjS1ZFBN1njDNOnV/lFbE0awmAgCh 3t/uWgZU8CyHL6wFVw== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Original-Received: from [192.168.31.113] ([46.125.249.77]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1N3siG-1sYqkP153Q-00zrax; Sun, 19 May 2024 11:22:37 +0200 Content-Language: en-US In-Reply-To: <86le46b4ue.fsf@gnu.org> X-Provags-ID: V03:K1:DeXn7Nw/NVjM1YmPxq/kEHNpP7K4ypFFHCX6hzjPNDesMIAZ4gz Im3Uodr6wT7ICN3BfRkRZBBUO8BeN8uXNnjMKgeiE3t00BK22cqMXjHgANlozgFla2FiwIb L58NBWx4DVychyffdPQdx/Du9jdwOOPP/gqEeu5BISyO6JBPAsBKJ5ChAtDuO0YiywfHzHB mqR0uruG60+6NiXJaxj1w== UI-OutboundReport: notjunk:1;M01:P0:VW+hNd5Y1Yk=;T+In9GA03+hdMXL1J9A5w0CoSuw /wS4mzqOIDR7v26xQm/aX4/hQDNjp3SRdQQyK0dzeECVdMUk2COp+mBITHnQwyYenj7fAHBKs yFrVaVIMlQxulwEbM4NBvVBympFdvFRdYnu9ryhKRr4zp32PprqGADp6EYHJZ9650yaBqfn1v r3RYu+9VK37zsi6EhxrXUYlm4pApEMspTi39dLbdb23cv+l7PVorrIZX5JvnRmrvwBEuirvLg UTeq1q+/Rnob0yHDQAl/QqkYBzI2XYozZmaPbpro1KzSfnaRkscSjR27AdFpUS4UILNWQ8PLj 3w9NRSKSlnY6wXqxDYXaz/6xmbt5JxDe1iqFMjBl44iOhxSjn8HLU6hCMqzTxEcoB3c0cLMXA kLxp/2Nlx9mrFxQ/oNrv8SPIko7lQeAsvP58bUhrfcegywmjth23If5R/BpOeW8/G/K6orHOA PmzUsq1GqkhxPnRDkskd4bLh8t2MY/klcT6OFbgDoGaup6ejZ9nQRf2SjdQwBf4KOACpvk5Z2 4FDzcOrBqvozTI4c1IAL7d9X7fAOjFhAoBTQFjY1V49mNpGy8MPLlnvGOfZsMShlAlTYXugi5 fRC6hISn2c4cM456PIRgpCTKemGy3r9sJ/ZFJnIKtIbXFiPWVmeSzkpbvGQ7X68zOO8imL6GQ qwktGnJsSrJ/kqqmDeLj2/qvweET0THvDCWeo8TZyd06kBqRNu8QIOW/xx7zMPAPSYCbK6gdS z/LY+GE0ucOUWPGxvLyu+CB6BCIncrNxMBqXL7PLtcsaPXGQHEipPlScV9LZAUZLoZXtVCG8 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:285419 Archived-At: > For the last issue: we should use default-font-width/height. But the > question is: would replacing frame-char-width/height by these two fix > that use case, or do we need anything else? It might improve those use cases but won't take care of any extra line spacing. But there are too many unresolved issues there: How would we interpret the MAX/MIN-WIDTH and MAX/MIN-HEIGHT arguments - still in frame character units as we (partially) do now? Note that functions like 'window-min-size' or 'window-safe-min-pixel-height' don't care about window character units, they operate in frame units. And there's always the possibility that intermediate rounding errors sum up and make things only get worse. martin