GNU bug report logs - #16493
24.3.50; (setq search-invisible t) is useless, let's allow to turn visible-mode temporarily on

Previous Next

Package: emacs;

Reported by: Bastien Guerry <bzg <at> altern.org>

Date: Sun, 19 Jan 2014 14:57:01 UTC

Severity: normal

Found in version 24.3.50

Full log


View this message in rfc822 format

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: bzg <at> gnu.org, 16493 <at> debbugs.gnu.org, Noam Postavsky <npostavs <at> gmail.com>
Subject: bug#16493: 24.3.50; (setq search-invisible t) is useless, let's allow to turn visible-mode temporarily on
Date: Sat, 11 May 2019 16:06:12 -0400
>> Starting from t, (add-to-invisibility-spec 'foo) also has the weird
>> result that it *reduces* the number of properties which cause
>> invisibility (from infinity to 2).
> Yes, but I don't see that as a problem.

Here's another way to look at it:

Give me a circumstance where an Elisp package can make use of the fact
that buffer-invisibility-spec defaults to t?

I can't come up with any, because there are only 3 cases:
- the package doesn't use `invisible` and hence doesn't care.
- the package only uses the `t` value of the `invisible` property, so it
  doesn't care because add-to-invisibility-spec always puts `t` in the list.
- the package uses non-nil, non-t value of the `invisible` property.
  In this case, either the package:
  - calls add-to-invisibility-spec to register that value, in which case
    it doesn't care.
  - doesn't call add-to-invisibility-spec, so the text is only invisible
    until some other unrelated package comes around and calls
    add-to-invisibility-spec, thus causing undesired behavior.

So any package which makes use of this default value is vulnerable to
being broken by activation of some unrelated package.


        Stefan





This bug report was last modified 6 years and 34 days ago.

Previous Next


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