From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ihor Radchenko Newsgroups: gmane.emacs.bugs Subject: bug#64696: 30.0.50; indent-to inherits preceding text properties, including 'invisible Date: Fri, 28 Jul 2023 08:06:54 +0000 Message-ID: <877cqkfoip.fsf@localhost> References: <87fs5l3b3g.fsf@localhost> <87a5vt2vx8.fsf@localhost> <831qh56vvz.fsf@gnu.org> <871qh52nlw.fsf@localhost> <83pm4p5er8.fsf@gnu.org> <874jm0mhgb.fsf@localhost> <831qh459sy.fsf@gnu.org> <87jzuvq785.fsf@localhost> <835y6ca1ah.fsf@gnu.org> <87zg3o8m2a.fsf@localhost> <83wmys8a2g.fsf@gnu.org> <87v8ecrqib.fsf@localhost> <83bkg481g5.fsf@gnu.org> <87bkg3rso5.fsf@localhost> <83wmyrt02d.fsf@gnu.org> <87edkx3eoh.fsf@localhost> <83bkg1sbg7.fsf@gnu.org> <87zg3kqtbl.fsf@localhost> <83zg3kp3of.fsf@gnu.org> <87fs597msx.fsf@localhost> <83a5vhn2ak.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9411"; mail-complaints-to="usenet@ciao.gmane.io" Cc: monnier@iro.umontreal.ca, 64696@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jul 28 11:03:00 2023 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 1qPJND-0002E0-Hd for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 28 Jul 2023 11:02:59 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qPIV9-0001F1-NN; Fri, 28 Jul 2023 04:07:07 -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 1qPIV4-00014g-LQ for bug-gnu-emacs@gnu.org; Fri, 28 Jul 2023 04:07:03 -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 1qPIV4-0003iY-Ca for bug-gnu-emacs@gnu.org; Fri, 28 Jul 2023 04:07:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qPIV4-0000oR-5q for bug-gnu-emacs@gnu.org; Fri, 28 Jul 2023 04:07:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ihor Radchenko Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 28 Jul 2023 08:07:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64696 X-GNU-PR-Package: emacs Original-Received: via spool by 64696-submit@debbugs.gnu.org id=B64696.16905316103095 (code B ref 64696); Fri, 28 Jul 2023 08:07:02 +0000 Original-Received: (at 64696) by debbugs.gnu.org; 28 Jul 2023 08:06:50 +0000 Original-Received: from localhost ([127.0.0.1]:43578 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qPIUs-0000nq-Fc for submit@debbugs.gnu.org; Fri, 28 Jul 2023 04:06:50 -0400 Original-Received: from mout02.posteo.de ([185.67.36.66]:40425) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qPIUp-0000nW-Jl for 64696@debbugs.gnu.org; Fri, 28 Jul 2023 04:06:49 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id DEAB5240103 for <64696@debbugs.gnu.org>; Fri, 28 Jul 2023 10:06:41 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1690531601; bh=hhNJv33tQy8cIlxOng9XyqeAJXieGPNe+MZFTUHIlUE=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:From; b=QywuGf2AJjcx5Cnv4s3WEMFlOPnJZ4dve/dmNw7WCk9owY5+L29pHBBi9xhDQDt59 70ueG3RizYSUW2r+sWPpzcOfgnLzKZV4F+UV1x2ZBP54fE6EqJI6UcMe6Kp/Z73EES L6UQSDVeWpa0r1lXkq8rw66pMi6u46TKmiE+WlRdObgRnLW1iF6d/OGqsNQv4nscYj y55lg0fz4tNx1ZlpS0gG1KGGRAAhVlMmgqwm8n5mgtG1EpUW1W0oFVS0z+CN0qTJQ5 Z50iUiNBmTmZune0LSYRdKcmkcVDRmcIn0cNRxTTo8G8lXneCDCxYRkMTIIdHE3jae XhIBn0uOTK6Xg== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4RC0b46d5Tz9s1d; Fri, 28 Jul 2023 10:06:40 +0200 (CEST) In-Reply-To: <83a5vhn2ak.fsf@gnu.org> 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:266243 Archived-At: Eli Zaretskii writes: >> Using :align-to space spec and font-lock-keywords. >> This can work, although it is unfortunate that there is no "stretch" >> space that will automatically occupy as much space as possible without >> pushing the line across right fringe. > > Of course, there is: use the 'right' position with a negative offset. This indeed works, but the annoying part is calculating the offset. One needs to use `string-pixel-width', which is not always reliable.(Org has its own `org-string-width', but it is still not good enough and sometimes creates a few pixel overflows leading to line wraps). The most robust way would be delegating offset calculation to the redisplay of the actual line being displayed. That will guarantee absence of inconsistencies. That's why I asked for "stretch" space feature. >> I think that the main source of the confusion is the first line "Return >> width of STRING when displayed in the current buffer", which sounds like >> certain buffer-specific display things are affecting the result. > > Feel free to suggest a single short enough sentence which doesn't have > this issue, and yet does explain that the value is not just the count > of characters in the string. Return width of STRING when displayed using fixed width font. However, if I look into the code, it looks like buffer-display-table is also taking into account. And string_char_and_length, which I do not fully understand. And glyphs appear to honor variable pitch font, if it is default. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at