|
From: | Jim Porter |
Subject: | Re: [RFC] Add :invisible face attribute |
Date: | Sat, 21 Dec 2024 10:52:29 -0800 |
On 12/21/2024 10:28 AM, Ihor Radchenko wrote:
Jim Porter <jporterbugs@gmail.com> writes:I'm just brainstorming here, but could Org use a display spec with specified spaces[1] to make Emacs render a space of the appropriate width? That requires a bit of computation, but it's how 'visual-wrap-prefix-mode' and SHR handle (roughly) similar sorts of things.If one uses display spec, editing the text underneath will become tricky. Org mode is first and foremost a text format and should remain editable using normal text editing commands.
Hmm. Doing a bit of testing in a scratch buffer, I think if each hidden character had its own display spec, editing seems to work ok. At least in the sense that I can delete each character like I'd expect. There might be other problems with this though, e.g. keeping the display specs updated, or performance issues...
For a completely different idea, I seem to recall some discussion around an :opacity face attribute. That would be useful for themes, e.g. to de-emphasize some text by reducing the opacity, and then here we could just set the :opacity to zero. I can't find the thread about this, but I recall there being some debate about how it should work; for example, if instead we should support RGBA for :foreground.
[Prev in Thread] | Current Thread | [Next in Thread] |