From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: JD Smith Newsgroups: gmane.emacs.bugs Subject: bug#68374: min-width is not correctly treated by buffer-text-pixel-size Date: Wed, 10 Jan 2024 17:22:53 -0500 Message-ID: Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.300.61.1.2\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36214"; mail-complaints-to="usenet@ciao.gmane.io" To: 68374@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jan 10 23:24:25 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 1rNgzp-0009Bw-1l for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 10 Jan 2024 23:24:25 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rNgzW-000791-D0; Wed, 10 Jan 2024 17:24:06 -0500 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 1rNgzT-00078q-Ul for bug-gnu-emacs@gnu.org; Wed, 10 Jan 2024 17:24:03 -0500 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 1rNgzT-0006gK-CS for bug-gnu-emacs@gnu.org; Wed, 10 Jan 2024 17:24:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rNgzR-0007o9-UY for bug-gnu-emacs@gnu.org; Wed, 10 Jan 2024 17:24:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: JD Smith Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 10 Jan 2024 22:24:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 68374 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.170492539529950 (code B ref -1); Wed, 10 Jan 2024 22:24:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 10 Jan 2024 22:23:15 +0000 Original-Received: from localhost ([127.0.0.1]:43443 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rNgyg-0007mz-W1 for submit@debbugs.gnu.org; Wed, 10 Jan 2024 17:23:15 -0500 Original-Received: from lists.gnu.org ([2001:470:142::17]:35474) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rNgyf-0007mj-1u for submit@debbugs.gnu.org; Wed, 10 Jan 2024 17:23:13 -0500 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 1rNgya-00074m-QG for bug-gnu-emacs@gnu.org; Wed, 10 Jan 2024 17:23:08 -0500 Original-Received: from mail-yw1-x112c.google.com ([2607:f8b0:4864:20::112c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rNgyZ-0005ju-CF for bug-gnu-emacs@gnu.org; Wed, 10 Jan 2024 17:23:08 -0500 Original-Received: by mail-yw1-x112c.google.com with SMTP id 00721157ae682-5f3da7ba2bfso48574427b3.3 for ; Wed, 10 Jan 2024 14:23:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1704925385; x=1705530185; darn=gnu.org; h=to:date:message-id:subject:mime-version:content-transfer-encoding :from:from:to:cc:subject:date:message-id:reply-to; bh=IWzM/SbfXWJL+y3nL7SlSfg9mVjcc+ntJ1uBD5xb7lg=; b=Kzy6BQxx7FojSKZRrd+TUDM5kSFeoeYBn5ARHsLHavjBQ662c4yni8s9gmTQVLi/vz nECpGNdPmvtQkVfhrbsCgkWTZdQL3OAaw01ZwMYDdWrx760Ip/h/vXTONQQoHc9NaMrf H8aJcyBaps2Rk/zekDSxnHHpGOxSlyFaNy1NTFuuXpC3oNO+cTpTfD0wNIyrdTI9PCdb zlWmg3IDq/gadws9w8FsPNXgQKVG4Pse0kak8jBbkyuMwMqnFfz10XPk800hhV+rK78W E2bStrYGPu62QcCGZeFjm/dMtgb1fbyu9q0L/+307Sy+8obyZBH2LqCuSzKNDb5ya5GB pkHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704925385; x=1705530185; h=to:date:message-id:subject:mime-version:content-transfer-encoding :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=IWzM/SbfXWJL+y3nL7SlSfg9mVjcc+ntJ1uBD5xb7lg=; b=uh65E6xMe2LBrSzRMVGtvS0OAlvIb7AP07ZxhQYK4nU5+RZUdHQBhEgq3gm4Dmgapl XEWMAjKFNRFwa2ju06iYEJ5II/Rj19MuSW6CNADRNPn7QIkPtyNC4Dh2SWSd1AvN1Xuc FcBuPLrDiGUSEdmhZsE8DbSAR5NApc2Lf1ibH4STYFfKgRWH4zg1KU0eC+xtUyfSrsGb EaVhKUx6kdguTQZ8m2qhxlKSoDESWmdcDDSK/sZ07AD/j2M44G2he+wuHxG2t9XVlE0V 6kmdXwmQPaSquraeTV8ld+8tqQPTNLVPMKyAmeGgezlfUwKTLpYAdzJcWkwE9i13lp+g SWlA== X-Gm-Message-State: AOJu0YzyI6kLheY7hgsN1iMKopBk4GVSS0UtRFUJATWosWFXajkUllau VbSrQQGrz7h+DZMa0M7D62dOUZcpPkD+ZQ== X-Google-Smtp-Source: AGHT+IExl4SgxG4SeCT/VBKkVw4TauIP1n9Q1R/zwSf1xRWkT2yZRhAeJDzzl1zhqFSXT0XWP5c+Iw== X-Received: by 2002:a81:4914:0:b0:5f7:9a2b:fcbb with SMTP id w20-20020a814914000000b005f79a2bfcbbmr354577ywa.103.1704925385097; Wed, 10 Jan 2024 14:23:05 -0800 (PST) Original-Received: from smtpclient.apple ([131.183.131.33]) by smtp.gmail.com with ESMTPSA id l22-20020a815716000000b005e93869ebd6sm1666426ywb.25.2024.01.10.14.23.04 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 10 Jan 2024 14:23:04 -0800 (PST) X-Mailer: Apple Mail (2.3774.300.61.1.2) Received-SPF: pass client-ip=2607:f8b0:4864:20::112c; envelope-from=jdtsmith@gmail.com; helo=mail-yw1-x112c.google.com 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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action 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:277839 Archived-At: When the =E2=80=98display min-width property is used on characters in a = buffer, window/buffer-text-pixel-size does not include this min-width = padding in its calculation of the text's pixel width. =20 This can be seen by using a range of minimum character widths and = noticing that the width is identical; see below. Other =E2=80=98display = properties like space :width and space :align-to do seem to be correctly = handled by pixel size calculations.=20 This is relevant because various elements on the mode-line use = =E2=80=98display min-width, so performing pixel alignment on the = mode-line text is impacted. +++ (eval-when-compile 'cl-lib) (cl-loop for w from 0. to 100. by 20.=20 collect (with-current-buffer (get-buffer-create "*pixel-sizes*") (erase-buffer) (insert ">>>" (propertize " " 'display `(min-width (,w))) "<<<") (cons w (buffer-text-pixel-size)))) =20 ;; ((0 49 . 14) (20 49 . 14) (40 49 . 14) (60 49 . 14) (80 49 . 14) (100 = 49 . 14))=