unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@IRO.UMontreal.CA>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: p.stephani2@gmail.com, 30171@debbugs.gnu.org
Subject: 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	[thread overview]
Message-ID: <jwvbmegem2g.fsf-monnier+emacsbugs@gnu.org> (raw)
In-Reply-To: <87vacod9yl.fsf@mouse.gnus.org> (Lars Ingebrigtsen's message of "Wed, 18 Apr 2018 13:34:42 +0200")

> 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





  reply	other threads:[~2018-04-18 12:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-19 13:34 bug#30171: 27.0.50; {add-to,remove-from}-invisibility-spec don't treat t specially Philipp Stephani
2018-04-17 20:39 ` Lars Ingebrigtsen
2018-04-18  6:13   ` Eli Zaretskii
2018-04-18 11:34     ` Lars Ingebrigtsen
2018-04-18 12:35       ` Stefan Monnier [this message]
2018-04-18 12:40         ` Lars Ingebrigtsen
2018-04-24 15:20           ` Lars Ingebrigtsen

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=jwvbmegem2g.fsf-monnier+emacsbugs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=30171@debbugs.gnu.org \
    --cc=larsi@gnus.org \
    --cc=p.stephani2@gmail.com \
    /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).