From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: =?UTF-8?Q?Cl=C3=A9ment?= Pit-Claudel Newsgroups: gmane.emacs.bugs Subject: bug#30746: window-text-pixel-width includes width of following propertized space Date: Fri, 16 Mar 2018 10:09:40 -0400 Message-ID: References: <80696d4e-c179-f14b-25e4-656a77954ceb@live.com> <83fu5apu7w.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="Vuz9yLz5XcRe0v6XDvTS1iwy3ZRiYW32m" X-Trace: blaine.gmane.org 1521209406 27117 195.159.176.226 (16 Mar 2018 14:10:06 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 16 Mar 2018 14:10:06 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 Cc: 30746@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Mar 16 15:10:02 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ewq3V-0006x1-Pi for geb-bug-gnu-emacs@m.gmane.org; Fri, 16 Mar 2018 15:10:02 +0100 Original-Received: from localhost ([::1]:57146 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ewq5Y-0005zS-VO for geb-bug-gnu-emacs@m.gmane.org; Fri, 16 Mar 2018 10:12:09 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58135) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ewq3a-0004b1-5x for bug-gnu-emacs@gnu.org; Fri, 16 Mar 2018 10:10:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ewq3W-0007ur-Vl for bug-gnu-emacs@gnu.org; Fri, 16 Mar 2018 10:10:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:57313) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ewq3W-0007uc-RD for bug-gnu-emacs@gnu.org; Fri, 16 Mar 2018 10:10:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ewq3W-00053b-HT for bug-gnu-emacs@gnu.org; Fri, 16 Mar 2018 10:10:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?Cl=C3=A9ment?= Pit-Claudel Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 16 Mar 2018 14:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 30746 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 30746-submit@debbugs.gnu.org id=B30746.152120939319421 (code B ref 30746); Fri, 16 Mar 2018 14:10:02 +0000 Original-Received: (at 30746) by debbugs.gnu.org; 16 Mar 2018 14:09:53 +0000 Original-Received: from localhost ([127.0.0.1]:36977 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ewq3N-00053A-EA for submit@debbugs.gnu.org; Fri, 16 Mar 2018 10:09:53 -0400 Original-Received: from mout.kundenserver.de ([212.227.126.135]:50111) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ewq3L-00052w-FQ for 30746@debbugs.gnu.org; Fri, 16 Mar 2018 10:09:52 -0400 Original-Received: from [18.26.2.123] ([18.26.2.123]) by mrelayeu.kundenserver.de (mreue005 [212.227.15.168]) with ESMTPSA (Nemesis) id 0MN95A-1ez1ub0m9g-006c2c; Fri, 16 Mar 2018 15:09:45 +0100 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0U79475XLXQHt07eTuw1u6+mNtO7Htg== X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:144326 Archived-At: This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --Vuz9yLz5XcRe0v6XDvTS1iwy3ZRiYW32m Content-Type: multipart/mixed; boundary="7lkIyYyBj1kbmHcaH4bWgIEb3iYH8fswz"; protected-headers="v1" From: =?UTF-8?Q?Cl=c3=a9ment_Pit-Claudel?= To: Eli Zaretskii Cc: 30746@debbugs.gnu.org Message-ID: Subject: Re: bug#30746: window-text-pixel-width includes width of following propertized space References: <80696d4e-c179-f14b-25e4-656a77954ceb@live.com> <83fu5apu7w.fsf@gnu.org> In-Reply-To: <83fu5apu7w.fsf@gnu.org> --7lkIyYyBj1kbmHcaH4bWgIEb3iYH8fswz Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: quoted-printable On 2018-03-08 08:33, Eli Zaretskii wrote: >> From: Cl=C3=A9ment Pit-Claudel >> Date: Wed, 7 Mar 2018 17:13:32 -0500 >> >> (progn >> (save-excursion >> (insert #("s " 1 2 (display (space :width (50)))))) >> (window-text-pixel-size nil (point) (1+ (point)))) >> >> On my machine a single 's' is 8 pixels wide, but this snippet returns = 58. =20 >> >> The following snippet, however, returns 8 as expected: >> >> (progn >> (save-excursion >> (insert "s ")) >> (window-text-pixel-size nil (point) (1+ (point)))) >> >> It seems that adding a display property on the space changes the retur= n value of window-text-pixel-size; is that expected? >=20 > It's expected given the relatively na=C3=AFve implementation, which did= n't > expect such calamities. Hopefully now fixed on the master branch. Thanks a lot; the width is indeed fixed. However, the fix seems to have = broken the height calculation: the first snippet above now returns (8 . 0= ), whereas the second one returns (8 . 16). Cheers, Cl=C3=A9ment. --7lkIyYyBj1kbmHcaH4bWgIEb3iYH8fswz-- --Vuz9yLz5XcRe0v6XDvTS1iwy3ZRiYW32m Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJaq9AlAAoJEPqg+cTm90wjsPQP/jZh0m2AAu23BFYdP0sHNylS Wahmh4Eftoo9Pl1lk3uA7k7ZNXATyhStxMi8t8ILpZ0M5o2YNgX1scgcQ/bDmQu3 0zysmd8XgDRghDvYTCJsfOHd2YL1tedeaNaAPV/O+PYt9QJR7q1NaIHc+mQ34Am2 BTq8qt8kTYNd+TDvroHOI1Y8F0f3EvN0+efKN+mnAluypNq0Qlab1mQuQgRCaOCe jlfWnPSLzdItOKzlUjRPA7fS5YiISPsyeJuBrpcW2JlcoSMIr9eKuUhxUuOGFaon cmaW8/xZkbrhyh+kHzQvwaC7z/pDVJ7EJIk1zR9YJ2g1aNe+vfKoAHeRE09pfRD1 91n3Y9nvxGupc4sPy1Y6fvmUXvHOm6H8vRGsx7PR9loPbjzcF+Qm/+MbkzuuYNrW mfCeenwnWuaTfW82tRLJd2oeJHGBtEVdlL+7rwFBw/8jHzQ4MG8N/zfPRnlX2mPr K5f5e9JTx6K/1QA6DKW/fbOckA7AfWaPOkZnqFg8UcuObrAt9odzIi9oiS5sU6S3 KP6dEElMynaawyP1M9Ov7fTDZrFZbjxmSi6dcqXEMWrSTB1QvxuEWC0h4W+03IHf KZz+/qT+O67pqbN2q7tT5eDQV4tGmLMlrurdUfUU3OeEEG6zdBaTOo6DO43FtLpC eWzDnXZ0DcNlWPfx03px =zJ9H -----END PGP SIGNATURE----- --Vuz9yLz5XcRe0v6XDvTS1iwy3ZRiYW32m--