emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFC] Add :invisible face attribute


From: Jim Porter
Subject: Re: [RFC] Add :invisible face attribute
Date: Sat, 21 Dec 2024 09:46:40 -0800

On 12/18/2024 8:52 AM, Eli Zaretskii wrote:
From: Michal Nazarewicz <mina86@mina86.com>
Date: Wed, 18 Dec 2024 17:08:12 +0100

Introduce :invisible face attribute which makes foreground to be the
same as background rendering the text invisible; or when :invert-video
is also in effect, background is the same as foreground.
[snip]

A new face attribute adds quite a bit of complexity, so we should
really believe this is a good idea.  Given that this can already be
achieved without a new attribute, I'm not sure.  Is this really a
frequent need/situation?

But let's see what others think about this.

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 it's too difficult to get the existing specified spaces to work properly here, maybe we could enhance them? For example, perhaps you could have a display spec like this:

  '(space :width "**")

Which would mean "make a space as wide as the string '**'". That might even allow simplifying some of the code in 'visual-wrap-prefix-mode' (specifically, the parts that compute the width of the prefix; see 'visual-wrap--content-prefix').

Still, if the existing specified space code is enough, it's probably best not to add even more complexity to it.

[1] https://www.gnu.org/software/emacs/manual/html_node/elisp/Specified-Space.html



reply via email to

[Prev in Thread] Current Thread [Next in Thread]