[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Cannot set invisible text property
From: |
Ihor Radchenko |
Subject: |
Re: Cannot set invisible text property |
Date: |
Wed, 12 Jan 2022 22:05:08 +0800 |
Enrico Flor <enrico@eflor.net> writes:
> In a minor mode I wrote for myself, I use add-text-properties to make
> certain things invisible. This does not work in org-mode, and I don't
> understand why. For instance, the following has no effect in when the
> buffer is in org-mode (and only when it's in org mode):
>
> (add-text-properties 1 3 '(invisible t))
This is because Org makes use of invisible text property during
fontification. You should either apply invisibility in Org through
font-lock, or do it temporarily until next re-fontification via
(with-silent-modifications (add-text-properties 1 3 '(invisible t)))
Best,
Ihor