From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: bug#51995: 29.0.50; `string-pixel-width' depends on the current window width Date: Sat, 20 Nov 2021 09:48:39 +0100 Message-ID: <4abf6240-6cb0-fda0-b264-e2b1a5078f92@gmx.at> References: <84czmvbepd.fsf@gmail.com> 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="26084"; mail-complaints-to="usenet@ciao.gmane.io" To: Brahimi Saifullah , 51995@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Nov 20 09:49:19 2021 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 1moM3i-0006aX-SM for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 20 Nov 2021 09:49:18 +0100 Original-Received: from localhost ([::1]:47702 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1moM3f-0006dt-B1 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 20 Nov 2021 03:49:15 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:34926) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1moM3S-0006dW-QG for bug-gnu-emacs@gnu.org; Sat, 20 Nov 2021 03:49:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:58320) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1moM3S-00067b-I6 for bug-gnu-emacs@gnu.org; Sat, 20 Nov 2021 03:49:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1moM3S-0007ON-H2 for bug-gnu-emacs@gnu.org; Sat, 20 Nov 2021 03:49:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 20 Nov 2021 08:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51995 X-GNU-PR-Package: emacs Original-Received: via spool by 51995-submit@debbugs.gnu.org id=B51995.163739813228395 (code B ref 51995); Sat, 20 Nov 2021 08:49:02 +0000 Original-Received: (at 51995) by debbugs.gnu.org; 20 Nov 2021 08:48:52 +0000 Original-Received: from localhost ([127.0.0.1]:41633 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1moM3H-0007Nu-KJ for submit@debbugs.gnu.org; Sat, 20 Nov 2021 03:48:51 -0500 Original-Received: from mout.gmx.net ([212.227.17.21]:46891) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1moM3E-0007Ng-66 for 51995@debbugs.gnu.org; Sat, 20 Nov 2021 03:48:50 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1637398121; bh=6xkaV7AdEais6M3S1odrJjjJcMxEcdgWjBS++I+s/ro=; h=X-UI-Sender-Class:Subject:To:References:From:Date:In-Reply-To; b=VZA35OZ4lFINzch6oYXYSq0gPYiKe6nUaPgQp2nOaeUsMJfKgyXkweX7llShcZoJr w4DI/0CDCsijooiUcJq2RZDl14Vk8oAU5pAYWfH0jhMNRWdmL9QfokddNleUszHB3Y DOdZR4hyxUa9Qm1mck56uKMYWo2HC/IAPnDphOE0= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from [192.168.1.101] ([212.95.5.5]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MMofc-1n77M50QK4-00IhPC; Sat, 20 Nov 2021 09:48:41 +0100 In-Reply-To: <84czmvbepd.fsf@gmail.com> Content-Language: en-US X-Provags-ID: V03:K1:mxJtnbVowocJEBSA5eYiyXZbb0W0y4pqxhcjypDTYqx9QTRDVnH S5dC22bVkYQElZ3d3NqgluspMgXzjb8vre6mRsVVBOf3/BgmlZ9+qvQubvgoR2beqWbfL9s T3ztgw9Z3SsQTWCowYFKhd/fqdxjfyy5W4IYoXf5k1pOnPAfxEeB9jWnSYK+0kGHp1iUlW5 q+I/SG4TTCNsJUgbD7fGA== X-UI-Out-Filterresults: notjunk:1;V03:K0:LyB6qiygdzo=:Kb8hUaDus9u4B8uXp4fbk0 ozdoOlmCwER2TAF8bwZGQjF3TME4pz3IoRgqRUvMDkjUySpAzd3HX6dBAYB7IOLD0VWTmC+Yh 8cinp1vj9yFSE32xXNhnunmNnCJQhr8uSs8ND91b37XfLHNui1qTAgyjTqnohx3NH/vzaKp7+ ZJwC64WmLP1t9gnb1va8Ku0TflH0uy8Wyyj1i9WkniKGMpk1YPYzbG6gb1uOR3SngMi3maQqc pffR6EW6V72XcrtO8mLyDipL4enK3QH+bTSU/UBC/Vd0WH1n0rdvC6aflqYR2v4McpQaVTKDu Swv+EmiddIje7LgouSJMAM2pwPcpPOZ1GJIUe/7WaYaKF0MlA6YMm1zbvsdiwTzr3pmOWMLpN iGTbEXGNfXIDV+/mDmBIigT1JHJdzOeaQiHHhsGFpUB1eSTdj6tbXEl0ESP/EfOnpP0FDTJ1s ROCccCoWhFFtH6iqAsqZTX+BzzhFdOPXKrnA6SOQGngam8beEV7ebYBOa2xr8Zvn2e0KTIHSC PTi//3whhxBi+CEfi0Xt9NxlSWZe4cMmD9aKXL33F4qn5u/+P9cFHAiXpUijnSX1sSybayPEI Ke5ugqBZJ+IsZxI2GiYk2IqTjsKt4q2z/+gavp+ZMQ5fwC1ys8ABcFY7oSqhylpeA0vV6Hkxi kh9rN/N5ErJUN75SKlTLQZaPd4i9JZ9j1zOvlSDgMTkjvpfYyN0zb+KuN4UKykD6YhvdKWLU6 efWE1vbXTZhLlt5LRi92y3fca+9iRgzs1qTBy0aukrU+MsIgBoRa+NzefFntpXttwnjZVIAm 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:220466 Archived-At: > I think the best solution is to modify `window-text-pixel-size' so that > X-LIMIT may be specified as having "no limit". Y-LIMIT already offers > this possibility: when it is nil, the entirety of the buffer is considered > (in reality, it seems to be simply set to INT_MAX, and that does the job). Since 'window-text-pixel-size' has to deal with arbitrary buffers, it is not a good idea to set X-LIMIT or Y-LIMIT to very large values. The doc-string of 'window-text-pixel-size' explicitly warns about X-LIMIT that Since calculating the width of long lines can take some time, it's always a good idea to make this argument as small as possible; in particular, if the buffer contains long lines that shall be truncated anyway. and about Y-LIMIT that Since calculating the text height of a large buffer can take some time, it makes sense to specify this argument if the size of the buffer is large or unknown. So any such fix has to be made in 'string-pixel-width' itself. > I'm experience some different problems with this function, and I'm pretty sure > it don't stem from this same issue, but from WINDOW being buffer. > Should I open a new bug report? Or expand upon the issue on this same thread? 'string-pixel-width' and the accompanying change of 'window-text-pixel-size' are broken in many ways, see also https://mail.gnu.org/archive/html/emacs-devel/2021-11/msg00339.html If you see a problem that is not mentioned there, please tell us. I hopefully fixed most of the issues here but cannot send you a patch at the moment to test because my local copy is completely out of synch with master. So please bear with me. martin