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: Tue, 18 Jul 2023 12:09:43 +0000 Message-ID: <87jzux2zg8.fsf@localhost> References: <87fs5l3b3g.fsf@localhost> <83ilah79aq.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="29702"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Stefan Monnier , 64696@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jul 18 14:10:35 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 1qLjXH-0007Vx-FW for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 18 Jul 2023 14:10:35 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qLjWn-0000aJ-Ad; Tue, 18 Jul 2023 08:10:05 -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 1qLjWk-0000Zn-TF for bug-gnu-emacs@gnu.org; Tue, 18 Jul 2023 08:10:02 -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 1qLjWk-0002fP-JW for bug-gnu-emacs@gnu.org; Tue, 18 Jul 2023 08:10:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qLjWk-0001v4-7P for bug-gnu-emacs@gnu.org; Tue, 18 Jul 2023 08:10: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: Tue, 18 Jul 2023 12:10: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.16896821887356 (code B ref 64696); Tue, 18 Jul 2023 12:10:02 +0000 Original-Received: (at 64696) by debbugs.gnu.org; 18 Jul 2023 12:09:48 +0000 Original-Received: from localhost ([127.0.0.1]:51845 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qLjWV-0001uZ-ES for submit@debbugs.gnu.org; Tue, 18 Jul 2023 08:09:47 -0400 Original-Received: from mout02.posteo.de ([185.67.36.66]:35115) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qLjWS-0001uN-Qi for 64696@debbugs.gnu.org; Tue, 18 Jul 2023 08:09:46 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id CF9FD240103 for <64696@debbugs.gnu.org>; Tue, 18 Jul 2023 14:09:38 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1689682178; bh=Oozs17zjhJ3DWTYafRDXutrqU++mJBoXwDDn+SvPF14=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:From; b=fEb1zqbyV9lGO0rlWp19laYdZoDox+KpQw46xFt7FURjJKZkZZMpVdW0rdIab4khu Uy7iMlCXfhTPT7wCyQ13Q0EpHgQpZ6UAFi2+Tn2BNMY6PQwv+ECJlqWb8EiG5hM1m1 6pTrfZUKpSXW5a7ZhR0YVD5nAzsMJS3wNz8ze2FzvO8LIMnTB47dToFWr8Pdsf71hj 5sXBu0AkZuAilhJRQ3hyM5XuoCb+MA/2RnmSqvd0uXRYKeZoOEwQdGmyQv7BtMtqVx m2scCwKCtO2ojPkcMIz2XR7GVa8x4oYcJhjPw+lOQriW1EQggUlEl0l0QxZD+CVEbx I39mVxGMkFjuw== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4R4yRw3w5sz6tsb; Tue, 18 Jul 2023 14:09:32 +0200 (CEST) In-Reply-To: <83ilah79aq.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:265449 Archived-At: Eli Zaretskii writes: >> However, after un-commenting `put-text-property' line, no indentation is >> done "visually" because Finsert_char is called with INHERIT argument Qt. > > Isn't that in general TRT? When you indent text, you _want_ to > inherit the text properties, right? > > Whether the inherited properties should also include the invisible > property could be subject to discussion, but it isn't 100% clear to me > that it should always be excluded. The problem is that inheriting 'invisible (if its value is actually hiding text) yields to cursor not moving to the target column. When I read the docstring: (indent-to COLUMN &optional MINIMUM) Documentation Indent from point with tabs and spaces until COLUMN is reached. I expect that (current-column) will become COLUMN after calling `indent-to'. It is not the case in the described scenario. More generally, `indent-to' implementation assumes that it is sufficient to insert "COLUMN - (current-column)" spaces in order to reach COLUMN (let me ignore tabs for simplicity). However, it is not true for invisible text and when 'display is specifying custom space width (and what about :align-to?). And the actual scenario for Org is even more complex because Org fontification is what is adding that problematic invisible text property, leading to race condition between redisplay and indentation. When I sprinkled (redisplay) calls to different places in Org's tag alignment code, the results varied depending on where the (redisplay) call was inserted. > In any case, I think you can bind text-property-default-nonsticky > around the indent-to call to control this, right? Or use the > rear-sticky text property. That's what I did to fix things on Org side, but I believe that the current behaviour is a genuine bug. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at