From: "Kévin Le Gouguec" <kevin.legouguec@gmail.com>
To: Michal Nazarewicz <mina86@mina86.com>
Cc: rms@gnu.org, emacs-devel@gnu.org
Subject: Re: [RFC] Add :invisible face attribute
Date: Sat, 21 Dec 2024 19:05:49 +0100 [thread overview]
Message-ID: <87frmgq5c2.fsf@gmail.com> (raw)
In-Reply-To: <mln8yalh07ha04ihgtb1rusk@mina86.com> (Michal Nazarewicz's message of "Sat, 21 Dec 2024 17:09:26 +0100")
Michal Nazarewicz <mina86@mina86.com> writes:
> On Fri, Dec 20 2024, Richard Stallman wrote:
>> > 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.
>>
>> Why is this feature worth having> What is useful about it?
>>
>> > Use it in Org mode for org-hide face eliminting the need for
>> > org-find-invisible-foreground function.
>>
>> Ia that the sole benefit of this feature?
>> I don't think it is sufficent reason to add the feature
>> and write the changes to document it.
>
> Yes, the use-cases I’m aware of are around org-hide. To sum up:
> * The feature would make org-hide easier as described above.
> * It addresses two minor bugs with org-hide I’ve mentioned in the other
> mail.
Drive-by idea, from another org-hide-leading-stars user who encounters
the first bug occasionally (or rather, a variant thereof, when
highlighting headings with faces like region or hl-line):
Would it make sense to fix these bugs by making Org apply a
'(display (space :width 1))
property on every star to hide? (Suggesting one prop per char, instead
of prop'ing the whole prefix with a single (space :width N), since AFAIU
that would prevent users from moving point within the prefix?)
Possibly a hot air suggestion: not super familiar with display props, so
they may have undesirable side-effects? Also not sure how to apply them
& keep them updated "robustly". The current org-hide face is applied
via font-lock so no extra bookkeeping required; '(elisp) Search-based
Fontification' suggests font-lock does support applying arbitrary
properties - and clearing them, using font-lock-extra-managed-props.
This is completely armchair reading of the manual tho, never toyed with
display properties. Mostly curious if this is something that could make
sense in theory. AFAIU this "solution" would not address your second
use-case anyway:
> * For code outside of Emacs, it makes auto-dim-other-buffers slightly
> more user friendly.
next prev parent reply other threads:[~2024-12-21 18:05 UTC|newest]
Thread overview: 10+ 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
2024-12-18 18:05 ` Michal Nazarewicz
2024-12-21 17:46 ` Jim Porter
2024-12-21 18:28 ` Ihor Radchenko
2024-12-21 18:52 ` Jim Porter
2024-12-21 4:51 ` Richard Stallman
2024-12-21 16:09 ` Michal Nazarewicz
2024-12-21 18:05 ` Kévin Le Gouguec [this message]
2024-12-21 18:30 ` Ihor Radchenko
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=87frmgq5c2.fsf@gmail.com \
--to=kevin.legouguec@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=mina86@mina86.com \
--cc=rms@gnu.org \
/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).