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:30:47 +0000 Message-ID: <87zg3ge8ug.fsf@localhost> References: <87fs5l3b3g.fsf@localhost> <83ilah79aq.fsf@gnu.org> <87jzux2zg8.fsf@localhost> <83351l74ci.fsf@gnu.org> <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> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5184"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , 64696@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jul 28 11:09:17 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 1qPJTJ-00015q-3U for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 28 Jul 2023 11:09:17 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qPIsR-0007gH-1I; Fri, 28 Jul 2023 04:31:11 -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 1qPIsI-0007g5-EV for bug-gnu-emacs@gnu.org; Fri, 28 Jul 2023 04:31: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 1qPIsI-0006R0-66 for bug-gnu-emacs@gnu.org; Fri, 28 Jul 2023 04:31:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qPIsH-0004CX-U0 for bug-gnu-emacs@gnu.org; Fri, 28 Jul 2023 04:31:01 -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:31:01 +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.169053304516122 (code B ref 64696); Fri, 28 Jul 2023 08:31:01 +0000 Original-Received: (at 64696) by debbugs.gnu.org; 28 Jul 2023 08:30:45 +0000 Original-Received: from localhost ([127.0.0.1]:43591 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qPIs0-0004By-Gn for submit@debbugs.gnu.org; Fri, 28 Jul 2023 04:30:44 -0400 Original-Received: from mout02.posteo.de ([185.67.36.66]:46853) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qPIrw-0004Bg-1N for 64696@debbugs.gnu.org; Fri, 28 Jul 2023 04:30:42 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id E5289240104 for <64696@debbugs.gnu.org>; Fri, 28 Jul 2023 10:30:33 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1690533033; bh=/EteZqrROD/v9SzRSUoEh4vRm9EUI6qrMtsA0p/HA/o=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:From; b=nGJ3ApIfnnw4SdsZBlBA0joL3mA15g9K6BxPRQ57zlxVsgLQpg9zo71A3tbowecl1 nSv6To59DKt3wr4VxT5TbwsTRLKt2dubgNiJoVwKip4WT8KjytSMUoavMguAoXPW/K cbnQ+PP/EjFr5zJ9maIhfnXEv+TMXd+hFB2iowjp0CagrfSSwokFrT5M4NFvGwDBkI momK/gmY/SudrpXjowTrw2lvA5rohyKUd3j9c+kYbMMwEm1vC8Oc9jCvvXoadRtqov LVAthRFlFlNp+1tKCh0J/LRN23sCoVNePSbsFTPXjpK8e1MndPRhmUTiIO59paZMa9 m+xJmw0kjqb4Q== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4RC16d26Vyz6v18; Fri, 28 Jul 2023 10:30:32 +0200 (CEST) In-Reply-To: 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:266245 Archived-At: Stefan Monnier writes: > Presumably you'll also want to keep columns aligned dynamically as text > is inserted/deleted. I suspect that once you try to do that, it's > fairly easy to temporarily let-bind `buffer-invisibility-spec` around > the code that inserts SPCs&TABs to enforce the "vanilla" alignment. Sure. Org is slowly moving in that direction - separating text alignment and visual alignment. We have a persistent stream of related feature requests. However, remember that this thread started with `indent-to' calculating target column without taking into account the display staff. While the initial column is using `current-column' and considers composition/faces/[partially] invisibility, the number of tabs/spaces to be inserted to reach target column are calculated assuming that each space occupies 1 column and each tab occupies tab-width columns. Now, when we established that Emacs indentation is visual, it is clear that the assumption in `indent-to' is not accurate. >> Sure, but how can an application, say, disable all the effects of visual >> representation without (1) searching and let-binding each specific > > Define "disable all the effects of visual representation". I think what > you mean is something like "pretend the text is displayed by sending it > to an text terminal", but the width can depend on the specific text > terminal (especially for non-ASCII Unicode chars, but also for chars < > 32). So it's a non-trivial problem, in reality. You are right. Probably, a good goal would be "looks aligned in fundamental-mode". -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at