bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#16493: 24.3.50; (setq search-invisible t) is useless, let's allow to


From: Stefan Monnier
Subject: bug#16493: 24.3.50; (setq search-invisible t) is useless, let's allow to turn visible-mode temporarily on
Date: Tue, 30 Apr 2019 08:45:54 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

>> You can do
>>
>>     (overlay-put OVERLAY 'invisible 'visible)
>>
>> to get the same result without far-reaching changes to the C code.
>
> Um, no, that gives the opposite effect.
>
> (let ((p (point))
>       overlay)
>   (insert "(" (propertize "invisible" 'invisible t) ")")
>   (setq overlay (make-overlay p (point)))
>   ;; All text, including parens, becomes invisible.
>   (overlay-put overlay 'invisible 'visible))

You need to use `add-to-invisibility-spec` before that works.  E.g.: 

    (add-to-invisibility-spec 'dummy)
    
that's because of a quirk of the way we treat `invisible` and the
`buffer-invisibility-spec`.


        Stefan
        

PS: To fix this quirk, we should change buffer-invisibility-spec's
default value to nil (or `(t)`, maybe) instead of t.





reply via email to

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