From: Eli Zaretskii <eliz@gnu.org>
To: Michal Nazarewicz <mina86@mina86.com>
Cc: emacs-devel@gnu.org
Subject: Re: [RFC] Add :invisible face attribute
Date: Wed, 18 Dec 2024 18:52:46 +0200 [thread overview]
Message-ID: <867c7xlyqp.fsf@gnu.org> (raw)
In-Reply-To: <20241218160813.31108-1-mina86@mina86.com> (message from Michal Nazarewicz on Wed, 18 Dec 2024 17:08:12 +0100)
> 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.
>
> Use it in Org mode for org-hide face eliminting the need for
> org-find-invisible-foreground function. This also simplifies
> auto-dim-other-buffers NonGNU ELPA package removing the need to
> configure a separate hide face for org-hide remap.
>
> To observe the atribute in action, set ‘org-hide-leading-stars’ option,
> open NEWS file and enable org-mode. The initial stars in section
> headings are rendered using the new attribute rather than Org mode
> needing to explicitly match foregroun to background.
Thanks.
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.
> @@ -2911,6 +2925,13 @@ merge_face_ref (struct window *w,
> else
> err = true;
> }
> + else if (EQ (keyword, QCinvisible))
> + {
> + if (EQ (value, Qt) || NILP (value))
> + to[LFACE_INVISIBLE_INDEX] = value;
> + else
> + err = true;
> + }
Does this mean that the result of merging two faces with different
values for :invisible will depend on the order of the merge? That is,
does the nil value override the t value? Or am I missing something?
Btw, I think "invisible" is not the best name for this, because that's
not really what will happen on display. It's more like "illegible" or
something to that effect.
next prev parent reply other threads:[~2024-12-18 16:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-18 16:08 [RFC] Add :invisible face attribute Michal Nazarewicz
2024-12-18 16:52 ` Eli Zaretskii [this message]
2024-12-18 18:05 ` Michal Nazarewicz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=867c7xlyqp.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=mina86@mina86.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).