GNU bug report logs - #30171
27.0.50; {add-to,remove-from}-invisibility-spec don't treat t specially

Previous Next

Package: emacs;

Reported by: Philipp Stephani <p.stephani2 <at> gmail.com>

Date: Fri, 19 Jan 2018 13:36:01 UTC

Severity: normal

Tags: confirmed, fixed

Found in version 27.0.50

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #19 received at 30171 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Eli Zaretskii <eliz <at> gnu.org>, p.stephani2 <at> gmail.com, 30171 <at> debbugs.gnu.org
Subject: Re: bug#30171: 27.0.50;
 {add-to,remove-from}-invisibility-spec don't treat t specially
Date: Wed, 18 Apr 2018 08:35:53 -0400
> The change below is the cause of this odd feature set, and I wonder
> whether Stefan (who made the change) meant for it to do what it does.

The commit message refers to bug#20468 where the discussion indicates
that it seems to be on purpose.

One way to look at it is that the patch made

    (remove-from-invisibility-spec FOO)

give the same result as

    (add-to-invisibility-spec FOO)
    (remove-from-invisibility-spec FOO)

I guess the fundamental problem here is that the special behavior for
the value `t` of buffer-invisibility-spec is just not reflected in
(add-to|remove-from)-invisibility-spec.

So if you rely on the current value being `t` and someone comes along
and just does (add-to-invisibility-spec (make-symbol "unused")),
suddenly your invisible stuff becomes visible.

IOW you just can't rely on the special `t` behavior: if you want your
thing to be invisible, you need to either use the special `t` value of
the `invisible` property (which is invisible regardless of
buffer-invisibility-spec), or you need to add your value via
add-to-invisibility-spec.


        Stefan




This bug report was last modified 7 years and 32 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.