From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#51766: string-pixel-width limitations (was: bug#51766: 29.0.50; Return value of buffer-chars-modified-tick changes when buffer text is not yet changed before inserting a character for non-latin input methods) Date: Tue, 21 Jun 2022 15:47:24 +0300 Message-ID: <83y1xqji8z.fsf@gnu.org> References: <87mtmalrs1.fsf@localhost> <837dde200c.fsf@gnu.org> <87k0helmig.fsf@localhost> <831r3m1tpk.fsf@gnu.org> <8735o1r31q.fsf@localhost> <834k8hzi10.fsf@gnu.org> <87zgq9pmb6.fsf@localhost> <831r3lzfk4.fsf@gnu.org> <87wnldpk5x.fsf@localhost> <83zgq9xv1y.fsf@gnu.org> <87r1bkpgjw.fsf@localhost> <87y1xv7ggf.fsf@localhost> <838rpvpns3.fsf@gnu.org> <8735fyslgq.fsf@localhost> <83fsjyl3sz.fsf@gnu.org> <87r13iqo19.fsf@localhost> <834k0eky7h.fsf@gnu.org> <87a6a6qjgx.fsf@localhost> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37902"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 51766@debbugs.gnu.org, monnier@iro.umontreal.ca To: Ihor Radchenko Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jun 21 14:49:20 2022 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 1o3dJo-0009g2-Ol for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 21 Jun 2022 14:49:20 +0200 Original-Received: from localhost ([::1]:50598 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o3dJn-0001dT-62 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 21 Jun 2022 08:49:19 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52804) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o3dIY-0000Lw-TG for bug-gnu-emacs@gnu.org; Tue, 21 Jun 2022 08:48:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:37284) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o3dIY-0003ht-Ja for bug-gnu-emacs@gnu.org; Tue, 21 Jun 2022 08:48:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o3dIY-00068J-Ib for bug-gnu-emacs@gnu.org; Tue, 21 Jun 2022 08:48:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 21 Jun 2022 12:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51766 X-GNU-PR-Package: emacs Original-Received: via spool by 51766-submit@debbugs.gnu.org id=B51766.165581566323454 (code B ref 51766); Tue, 21 Jun 2022 12:48:02 +0000 Original-Received: (at 51766) by debbugs.gnu.org; 21 Jun 2022 12:47:43 +0000 Original-Received: from localhost ([127.0.0.1]:59414 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o3dIF-00066C-3R for submit@debbugs.gnu.org; Tue, 21 Jun 2022 08:47:43 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:39452) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o3dID-00065U-HO for 51766@debbugs.gnu.org; Tue, 21 Jun 2022 08:47:41 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:43744) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o3dI8-0003dg-79; Tue, 21 Jun 2022 08:47:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=cs5EAnaQOYz5b8lbejPqSBs9yR9jxxPPvzvsdKrCJyA=; b=VjHUbPrmtw+g OBm7kN3XkGH2X4Gr7h7GR7jsl+zTGN5Xo+eNX81Y3UdObjuy0AxTzfPkYzo0cGHRNLlXw0OiqBfOO jejC3GZXwPdfi2HvX5uWpVeTTBlYX4Drx6cgp7yLy/Ksun7ZyjnSID4f0TjKBPvuZ+vWtkf+bPKUE w+HejJZajfiUdCKdZBRBz7xV+S/sGcVqNl1yJCE+TXJz2BF/INUN63r1h3TdsGV6pDkyHkR1ydSYQ 9JK6Lro2IoY+QcGuxX1fdjyQwMUBjTcicomb40Yfa9OVxy+8AqdDPou3d99i5vSLzb3h6zeVUAtgX otSBOhNCxhZ9rcyBOi0+vQ==; Original-Received: from [87.69.77.57] (port=2594 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o3dI7-0003k7-Lv; Tue, 21 Jun 2022 08:47:35 -0400 In-Reply-To: <87a6a6qjgx.fsf@localhost> (message from Ihor Radchenko on Tue, 21 Jun 2022 20:39:10 +0800) 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:234961 Archived-At: > From: Ihor Radchenko > Cc: monnier@iro.umontreal.ca, 51766@debbugs.gnu.org > Date: Tue, 21 Jun 2022 20:39:10 +0800 > > >> > If you need such high accuracy, may I suggest window-text-pixel-size? > >> > >> window-text-pixel-size suffers from the same issues with > >> wrap-prefix/line-prefix and line numbers mode. > > > > What issue are those? > [...] > To show all the trickery, let me share org-string-width I had to > implement for the purposes of Org mode. I did not want this function to > be complex and every single extra LOC there is fixing some edge case, > test failure, or bug report: Ah, so you do use window-text-pixel-size... Then we are in violent agreement. Anyway, the beginning of this sub-thread, specifically about valign, was in the context of Lisp programs that do buffer modifications under with-silent-modifications or equivalent, and valign seems to do that because it just needs to measure the pixel width of a string, and it does that by inserting the string and then removing it. So in that case, the "buffer modifications" are indeed null and void, and Org shouldn't be bothered by such "modifications", because the buffer really remains unmodified. Right?