From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#64696: 30.0.50; indent-to inherits preceding text properties, including 'invisible Date: Thu, 27 Jul 2023 22:53:53 -0400 Message-ID: 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> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25021"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eli Zaretskii , 64696@debbugs.gnu.org To: Ihor Radchenko Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jul 28 05:10:39 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 1qPDsE-0006MW-Q2 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 28 Jul 2023 05:10:39 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qPDdI-0002ms-5Y; Thu, 27 Jul 2023 22:55:12 -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 1qPDd9-0002mg-RB for bug-gnu-emacs@gnu.org; Thu, 27 Jul 2023 22:55:04 -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 1qPDd8-0001kZ-PN for bug-gnu-emacs@gnu.org; Thu, 27 Jul 2023 22:55:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qPDd8-0000dO-Bp for bug-gnu-emacs@gnu.org; Thu, 27 Jul 2023 22:55:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 28 Jul 2023 02:55: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.16905128522379 (code B ref 64696); Fri, 28 Jul 2023 02:55:02 +0000 Original-Received: (at 64696) by debbugs.gnu.org; 28 Jul 2023 02:54:12 +0000 Original-Received: from localhost ([127.0.0.1]:43341 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qPDcH-0000cG-3y for submit@debbugs.gnu.org; Thu, 27 Jul 2023 22:54:12 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:18920) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qPDcB-0000be-Dn for 64696@debbugs.gnu.org; Thu, 27 Jul 2023 22:54:07 -0400 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id DE9E98005E; Thu, 27 Jul 2023 22:53:57 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1690512837; bh=eLbQfkACSDzLchNEmFhYm6MtdscD63Pl7k5tLCh481g=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=dGV4N9FHUKtemUgMNBuppvagrYtWAKWU+hOnmVBXZ4YrXNRW5dw9+rg5JlNZM4bLO CbySkWqkX6q3tU5kjIWRGKzglfKRYfhXD8IJfcQNwPloaIL06SUEF6lHHopOCWxcsZ VoeNmO8tuPPOaHPoeyVFUkpALQ36ph7wnvF6n7TdtYCTA53bcmLT1BJx+l/LOxJ6MQ MW4t1mocC7vF0ezavloMgtSyM+DDlsWC0dxuelmKU2EAFgP0AFEGYEwJvr3j7Uo34k 2ZPd5Gt7ph6ll2aPlAdwR6ks8Txs0ION9EjpDW+iM6VWg3GtrwI4PxE4lQWAwLhUuM 9MErN2TlFLz6g== Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 2FB3B801B2; Thu, 27 Jul 2023 22:53:57 -0400 (EDT) Original-Received: from alfajor (unknown [181.44.118.150]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 218B9120321; Thu, 27 Jul 2023 22:53:55 -0400 (EDT) In-Reply-To: <87edkx3eoh.fsf@localhost> (Ihor Radchenko's message of "Mon, 24 Jul 2023 08:18:54 +0000") 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:266224 Archived-At: > For example, consider an Org table like > > | *This* | is | some text | > | more | | text | > > It looks aligned in Org buffers ("*" is invisible), I just tried it in a vanilla Emacs-28 and "*" is not made invisible, because `org-hide-emphasis-markers` defaults to nil. > but not when copied to message buffer. I think what you really want is that the above table be properly aligned regardless of the value of `org-hide-emphasis-markers` and without changing the buffer's char contents when changing the value of `org-hide-emphasis-markers`, and I don't think you can do that without adding `display` space properties dynamically in accordance with the current value of `org-hide-emphasis-markers`. 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. Also enforcing this property that the text will be aligned both while prettified in Emacs and when displayed in a text terminal may come with the downside that some columns in Emacs will be "way too large" because its width is determined by the width of the non-prettified text. > 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. Stefan