From unknown Sun Jun 22 07:32:33 2025
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Mailer: MIME-tools 5.509 (Entity 5.509)
Content-Type: text/plain; charset=utf-8
From: bug#30171 <30171@debbugs.gnu.org>
To: bug#30171 <30171@debbugs.gnu.org>
Subject: Status: 27.0.50; {add-to,remove-from}-invisibility-spec don't
treat t specially
Reply-To: bug#30171 <30171@debbugs.gnu.org>
Date: Sun, 22 Jun 2025 14:32:33 +0000
retitle 30171 27.0.50; {add-to,remove-from}-invisibility-spec don't treat t=
specially
reassign 30171 emacs
submitter 30171 Philipp Stephani
severity 30171 normal
tag 30171 confirmed fixed
thanks
From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 19 08:35:08 2018
Received: (at submit) by debbugs.gnu.org; 19 Jan 2018 13:35:08 +0000
Received: from localhost ([127.0.0.1]:34166 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from )
id 1ecWp2-00065r-79
for submit@debbugs.gnu.org; Fri, 19 Jan 2018 08:35:08 -0500
Received: from eggs.gnu.org ([208.118.235.92]:52257)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from ) id 1ecWp0-00065L-I9
for submit@debbugs.gnu.org; Fri, 19 Jan 2018 08:35:06 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
(envelope-from ) id 1ecWou-0001ZB-Az
for submit@debbugs.gnu.org; Fri, 19 Jan 2018 08:35:01 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: *
X-Spam-Status: No, score=1.1 required=5.0 tests=BAYES_50,
FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,T_DKIM_INVALID autolearn=disabled
version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:46614)
by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
(Exim 4.71) (envelope-from )
id 1ecWou-0001Z7-7I
for submit@debbugs.gnu.org; Fri, 19 Jan 2018 08:35:00 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:43216)
by lists.gnu.org with esmtp (Exim 4.71)
(envelope-from ) id 1ecWos-0006ZJ-9p
for bug-gnu-emacs@gnu.org; Fri, 19 Jan 2018 08:34:59 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
(envelope-from ) id 1ecWor-0001XN-5D
for bug-gnu-emacs@gnu.org; Fri, 19 Jan 2018 08:34:58 -0500
Received: from mail-wr0-x22d.google.com ([2a00:1450:400c:c0c::22d]:46448)
by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
(Exim 4.71) (envelope-from )
id 1ecWoq-0001Ws-Ur
for bug-gnu-emacs@gnu.org; Fri, 19 Jan 2018 08:34:57 -0500
Received: by mail-wr0-x22d.google.com with SMTP id g21so1582812wrb.13
for ; Fri, 19 Jan 2018 05:34:56 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
h=from:to:subject:date:message-id:mime-version
:content-transfer-encoding;
bh=HqTgq1jQkktFJUzQaap7SgIqsZAnIGBvb2g1+oC5UpM=;
b=ukfh7wbYEJtK02aSSBWV9f5gKxFn2kixNMwHu1alFrOBpEOAeTns2M09ziemFm2eJq
0BtYLmi1PMBxnKJLXSaT1J/iR9BctZEX45rcHKcr0XUjCAHWGqEMOZEF8gCP4ZMzVAet
4pNw71fjVvJIkYeuMPnR0XkKCVraSt0L95/1v81eT7acc+XUKLeHKm/W7ADh2VrQbH9u
dCyOQbm3w+SwC25qmpYxrKxi1u5JDv0hmnadBOsucB4h65JQi9W+JSw8fB5zNOka1SFD
2e9x30YmUnSkD2pK9gF3ZAWxnt0jPpq0FAB4pwQU/kZ3aqLAdlWHorlrikUrB0jjrxFM
NgnQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20161025;
h=x-gm-message-state:from:to:subject:date:message-id:mime-version
:content-transfer-encoding;
bh=HqTgq1jQkktFJUzQaap7SgIqsZAnIGBvb2g1+oC5UpM=;
b=iNfHONMZZLDo8JHkIeH1wJMF123N9wERXIZfN/JqWTlsfn9eZejVdxf/b4KVtLnTkD
TNtkw+xkesAaFZfitVX6no0xmg8M5HTK6Bb3BbbPQUa8eSNwCP/GCJ1rL8QMEF2FTCHV
T9+6JrhEUya3ZoIZE/Ivvt058Ut5dvc0NAs+wQ1ml72vMJngV7xUVsc0mjaySGt+Stom
zHzxNLZvPKH+A00DP+KoKYl/ijEqrwk4McCgU7qQzj8YcnRC6H0olR9seiRwiGoeO63T
lsU+W0aeJybVIqCW+hTqwWtwv+4NRz586mgHiRPraFGZkEBX4s4Y9mGGtZygV5J4WGOv
bJNg==
X-Gm-Message-State: AKwxytdysx5+XpeAfZKEji7pHGMq7rkjAGctPkceFw3i17uQRFsXcXLB
9/IRh473Bog06RHNn7tOjl30ETXS
X-Google-Smtp-Source: ACJfBouOCwkK13njk4r7rUzdb/TinmeP0XMgvYRhrVHeYrBGQkek7OGIU+phseaSZpbILkqKmyIrEA==
X-Received: by 10.223.139.221 with SMTP id w29mr9010274wra.223.1516368895127;
Fri, 19 Jan 2018 05:34:55 -0800 (PST)
Received: from a.muc.corp.google.com ([2a00:79e0:15:4:bfda:710c:4a38:a674])
by smtp.gmail.com with ESMTPSA id b127sm628228wma.26.2018.01.19.05.34.53
for
(version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
Fri, 19 Jan 2018 05:34:53 -0800 (PST)
From: Philipp Stephani
To: bug-gnu-emacs@gnu.org
Subject: 27.0.50;
{add-to,remove-from}-invisibility-spec don't treat t specially
Date: Fri, 19 Jan 2018 14:34:53 +0100
Message-ID:
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
recognized.
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -3.8 (---)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id:
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Errors-To: debbugs-submit-bounces@debbugs.gnu.org
Sender: "Debbugs-submit"
X-Spam-Score: -3.8 (---)
(with-temp-buffer
(insert (propertize " " 'invisible 'foo))
(remove-from-invisibility-spec 'what)
(invisible-p 1))
is nil. Commenting out the `remove-from-invisibility-spec' form causes
it to return t. I'd expect t with `remove-from-invisibility-spec', but
that function and `add-to-invisibility-spec' always convert a
buffer-invisibility-spec of t to (t), which is not the same.
In GNU Emacs 27.0.50 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.22.24)
of 2018-01-19 built on localhost
Repository revision: ffeb1164d43c351786bc1e93e441fcbc29f5207b
Windowing system distributor 'The X.Org Foundation', version 11.0.11903000
System Description: Debian GNU/Linux
Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Configured using:
'configure --without-threads --enable-gcc-warnings=3Dwarn-only
--enable-gtk-deprecation-warnings --without-pop --with-mailutils
--enable-checking --enable-check-lisp-object-type --with-modules
'CFLAGS=3D-O0 -ggdb3''
Configured features:
XPM JPEG TIFF GIF PNG SOUND DBUS GSETTINGS NOTIFY GNUTLS FREETYPE XFT
ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 MODULES JSON
Important settings:
value of $LANG: en_US.UTF-8
locale-coding-system: utf-8-unix
Major mode: Lisp Interaction
Minor modes in effect:
tooltip-mode: t
global-eldoc-mode: t
eldoc-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
tool-bar-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
line-number-mode: t
transient-mark-mode: t
Load-path shadows:
None found.
Features:
(shadow sort mail-extr emacsbug message rmc puny seq byte-opt gv
bytecomp byte-compile cconv cl-loaddefs cl-lib dired dired-loaddefs
format-spec rfc822 mml easymenu mml-sec password-cache epa derived epg
epg-config gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode
mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047
rfc2045 ietf-drums mm-util mail-prsvr mail-utils elec-pair time-date
mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar
dnd fontset image regexp-opt fringe tabulated-list replace newcomment
text-mode elisp-mode lisp-mode prog-mode register page menu-bar
rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock
syntax facemenu font-core term/tty-colors frame cl-generic cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese composite charscript charprop
case-table epa-hook jka-cmpr-hook help simple abbrev obarray minibuffer
cl-preloaded nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote dbusbind inotify
dynamic-setting system-font-setting font-render-setting move-toolbar gtk
x-toolkit x multi-tty make-network-process emacs)
Memory information:
((conses 16 95220 8811)
(symbols 48 20320 1)
(miscs 40 41 121)
(strings 32 28334 1953)
(string-bytes 1 756739)
(vectors 16 14131)
(vector-slots 8 499016 12234)
(floats 8 49 68)
(intervals 56 225 0)
(buffers 992 12))
--=20
Google Germany GmbH
Erika-Mann-Stra=C3=9Fe 33
80636 M=C3=BCnchen
Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg
Gesch=C3=A4ftsf=C3=BChrer: Paul Manicle, Halimah DeLaine Prado
If you received this communication by mistake, please don=E2=80=99t forward=
it to
anyone else (it may contain confidential or privileged information), please
erase all copies of it, including all attachments, and please let the sender
know it went to the wrong person. Thanks.
From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 17 16:30:43 2018
Received: (at control) by debbugs.gnu.org; 17 Apr 2018 20:30:43 +0000
Received: from localhost ([127.0.0.1]:57980 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from )
id 1f8XFT-0001Us-Ls
for submit@debbugs.gnu.org; Tue, 17 Apr 2018 16:30:43 -0400
Received: from hermes.netfonds.no ([80.91.224.195]:38578)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from ) id 1f8XFR-0001SN-Sk
for control@debbugs.gnu.org; Tue, 17 Apr 2018 16:30:42 -0400
Received: from 46.67.12.60.tmi.telenormobil.no ([46.67.12.60] helo=corrigan)
by hermes.netfonds.no with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.84_2) (envelope-from ) id 1f8XFP-0006Ji-CK
for control@debbugs.gnu.org; Tue, 17 Apr 2018 22:30:41 +0200
Received: from larsi by corrigan with local (Exim 4.89)
(envelope-from ) id 1f8XFJ-0002i5-Cj
for control@debbugs.gnu.org; Tue, 17 Apr 2018 22:30:33 +0200
To: control@debbugs.gnu.org
From: Lars Ingebrigtsen
Subject: control message for bug #30171
Message-Id:
Date: Tue, 17 Apr 2018 22:30:33 +0200
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: control
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id:
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Errors-To: debbugs-submit-bounces@debbugs.gnu.org
Sender: "Debbugs-submit"
X-Spam-Score: -1.0 (-)
tags 30171 confirmed
From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 17 16:39:41 2018
Received: (at 30171) by debbugs.gnu.org; 17 Apr 2018 20:39:41 +0000
Received: from localhost ([127.0.0.1]:58000 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from )
id 1f8XO8-0002yx-S7
for submit@debbugs.gnu.org; Tue, 17 Apr 2018 16:39:41 -0400
Received: from hermes.netfonds.no ([80.91.224.195]:38634)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from ) id 1f8XO6-0002yp-U9
for 30171@debbugs.gnu.org; Tue, 17 Apr 2018 16:39:39 -0400
Received: from 46.67.12.60.tmi.telenormobil.no ([46.67.12.60] helo=corrigan)
by hermes.netfonds.no with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.84_2) (envelope-from )
id 1f8XO3-0000ms-Sx; Tue, 17 Apr 2018 22:39:38 +0200
Received: from larsi by corrigan with local (Exim 4.89)
(envelope-from )
id 1f8XNx-0002iT-Kj; Tue, 17 Apr 2018 22:39:29 +0200
From: Lars Ingebrigtsen
To: Philipp Stephani
Subject: Re: bug#30171: 27.0.50;
{add-to,remove-from}-invisibility-spec don't treat t specially
References:
Date: Tue, 17 Apr 2018 22:39:29 +0200
In-Reply-To: (Philipp Stephani's
message of "Fri, 19 Jan 2018 14:34:53 +0100")
Message-ID: <87d0yxh8ji.fsf@mouse.gnus.org>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 30171
Cc: 30171@debbugs.gnu.org
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id:
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Errors-To: debbugs-submit-bounces@debbugs.gnu.org
Sender: "Debbugs-submit"
X-Spam-Score: -1.0 (-)
Philipp Stephani writes:
> (with-temp-buffer
> (insert (propertize " " 'invisible 'foo))
> (remove-from-invisibility-spec 'what)
> (invisible-p 1))
>
> is nil. Commenting out the `remove-from-invisibility-spec' form causes
> it to return t. I'd expect t with `remove-from-invisibility-spec', but
> that function and `add-to-invisibility-spec' always convert a
> buffer-invisibility-spec of t to (t), which is not the same.
Yes, that's extremely confusing, but poking around, it seems like the
idea is that if you've altered the `buffer-invisibility-spec' in any
way (i.e., made it into a list), then only the properties that are in
the list are the ones that are supposed to be invisible.
In that light, the behaviour here makes sense.
But I'm not sure that's really what's intended here. Perhaps somebody
who was involved with implementing this could shed some light?
In any case, perhaps calling `remove-from-invisibility-spec' that's not
in the spec anyway shouldn't alter it? It's certainly surprising.
This definition seems odd to me:
(defun remove-from-invisibility-spec (element)
"Remove ELEMENT from `buffer-invisibility-spec'."
(setq buffer-invisibility-spec
(if (consp buffer-invisibility-spec)
(delete element buffer-invisibility-spec)
(list t))))
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 18 02:13:56 2018
Received: (at 30171) by debbugs.gnu.org; 18 Apr 2018 06:13:56 +0000
Received: from localhost ([127.0.0.1]:58372 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from )
id 1f8gLo-0006gJ-Bz
for submit@debbugs.gnu.org; Wed, 18 Apr 2018 02:13:55 -0400
Received: from eggs.gnu.org ([208.118.235.92]:44813)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from ) id 1f8gLk-0006g4-52
for 30171@debbugs.gnu.org; Wed, 18 Apr 2018 02:13:51 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
(envelope-from ) id 1f8gLa-0002br-6O
for 30171@debbugs.gnu.org; Wed, 18 Apr 2018 02:13:43 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level:
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled
version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:39365)
by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from )
id 1f8gLa-0002bm-2o; Wed, 18 Apr 2018 02:13:38 -0400
Received: from [176.228.60.248] (port=3348 helo=home-c4e4a596f7)
by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
(Exim 4.82) (envelope-from )
id 1f8gLZ-0002yt-CL; Wed, 18 Apr 2018 02:13:37 -0400
Date: Wed, 18 Apr 2018 09:13:47 +0300
Message-Id: <831sfd2g9w.fsf@gnu.org>
From: Eli Zaretskii
To: Lars Ingebrigtsen
In-reply-to: <87d0yxh8ji.fsf@mouse.gnus.org> (message from Lars Ingebrigtsen
on Tue, 17 Apr 2018 22:39:29 +0200)
Subject: Re: bug#30171: 27.0.50;
{add-to,remove-from}-invisibility-spec don't treat t specially
References:
<87d0yxh8ji.fsf@mouse.gnus.org>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 2001:4830:134:3::e
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: 30171
Cc: p.stephani2@gmail.com, 30171@debbugs.gnu.org
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id:
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Reply-To: Eli Zaretskii
Errors-To: debbugs-submit-bounces@debbugs.gnu.org
Sender: "Debbugs-submit"
X-Spam-Score: -6.0 (------)
> From: Lars Ingebrigtsen
> Date: Tue, 17 Apr 2018 22:39:29 +0200
> Cc: 30171@debbugs.gnu.org
>
> In any case, perhaps calling `remove-from-invisibility-spec' that's not
> in the spec anyway shouldn't alter it? It's certainly surprising.
If the only problem is the surprising behavior, I'd prefer to document
it rather than potentially open a can of worms.
From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 18 07:35:14 2018
Received: (at 30171) by debbugs.gnu.org; 18 Apr 2018 11:35:14 +0000
Received: from localhost ([127.0.0.1]:58513 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from )
id 1f8lMk-0007on-IJ
for submit@debbugs.gnu.org; Wed, 18 Apr 2018 07:35:14 -0400
Received: from hermes.netfonds.no ([80.91.224.195]:54101)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from ) id 1f8lMf-0007ob-5K
for 30171@debbugs.gnu.org; Wed, 18 Apr 2018 07:35:09 -0400
Received: from 46.67.12.60.tmi.telenormobil.no ([46.67.12.60] helo=corrigan)
by hermes.netfonds.no with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.84_2) (envelope-from )
id 1f8lMU-0008Re-Lk; Wed, 18 Apr 2018 13:35:00 +0200
Received: from larsi by corrigan with local (Exim 4.89)
(envelope-from )
id 1f8lMJ-0003qK-NV; Wed, 18 Apr 2018 13:34:43 +0200
From: Lars Ingebrigtsen
To: Eli Zaretskii
Subject: Re: bug#30171: 27.0.50;
{add-to,remove-from}-invisibility-spec don't treat t specially
References:
<87d0yxh8ji.fsf@mouse.gnus.org> <831sfd2g9w.fsf@gnu.org>
Date: Wed, 18 Apr 2018 13:34:42 +0200
In-Reply-To: <831sfd2g9w.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 18 Apr
2018 09:13:47 +0300")
Message-ID: <87vacod9yl.fsf@mouse.gnus.org>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 30171
Cc: p.stephani2@gmail.com, 30171@debbugs.gnu.org,
Stefan Monnier
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id:
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Errors-To: debbugs-submit-bounces@debbugs.gnu.org
Sender: "Debbugs-submit"
X-Spam-Score: -1.0 (-)
Eli Zaretskii writes:
>> From: Lars Ingebrigtsen
>> Date: Tue, 17 Apr 2018 22:39:29 +0200
>> Cc: 30171@debbugs.gnu.org
>>
>> In any case, perhaps calling `remove-from-invisibility-spec' that's not
>> in the spec anyway shouldn't alter it? It's certainly surprising.
>
> If the only problem is the surprising behavior, I'd prefer to document
> it rather than potentially open a can of worms.
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 relevant bit commit message seems to be "Handle the t case".
Stefan, the issue is that t and `(t)' mean wildly differing things: `t'
means "hide everything that has an invisibility spec" and `(t)' means
"hide the things that has an invisibility spec `eq' to `t'."
So if the spec was t, and you remove `foo', you end up with `(t)', which
means that if you had invisible text that was `eq' to `bar', that
suddenly becomes visible.
If you understand what I mean. :-)
diff --git a/lisp/subr.el b/lisp/subr.el
index 5d40aaae41..535fa2d3d0 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -4066,9 +4066,10 @@ add-to-invisibility-spec
(defun remove-from-invisibility-spec (element)
"Remove ELEMENT from `buffer-invisibility-spec'."
- (if (consp buffer-invisibility-spec)
- (setq buffer-invisibility-spec
- (delete element buffer-invisibility-spec))))
+ (setq buffer-invisibility-spec
+ (if (consp buffer-invisibility-spec)
+ (delete element buffer-invisibility-spec)
+ (list t))))
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 18 08:35:59 2018
Received: (at 30171) by debbugs.gnu.org; 18 Apr 2018 12:35:59 +0000
Received: from localhost ([127.0.0.1]:58571 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from )
id 1f8mJa-0002oG-Qg
for submit@debbugs.gnu.org; Wed, 18 Apr 2018 08:35:58 -0400
Received: from chene.dit.umontreal.ca ([132.204.246.20]:45414)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from ) id 1f8mJZ-0002o8-8Z
for 30171@debbugs.gnu.org; Wed, 18 Apr 2018 08:35:57 -0400
Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242])
by chene.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id w3ICZwhU001473;
Wed, 18 Apr 2018 08:35:59 -0400
Received: by pastel.home (Postfix, from userid 20848)
id A2D2F6A0EB; Wed, 18 Apr 2018 08:35:53 -0400 (EDT)
From: Stefan Monnier
To: Lars Ingebrigtsen
Subject: Re: bug#30171: 27.0.50;
{add-to,remove-from}-invisibility-spec don't treat t specially
Message-ID:
References:
<87d0yxh8ji.fsf@mouse.gnus.org> <831sfd2g9w.fsf@gnu.org>
<87vacod9yl.fsf@mouse.gnus.org>
Date: Wed, 18 Apr 2018 08:35:53 -0400
In-Reply-To: <87vacod9yl.fsf@mouse.gnus.org> (Lars Ingebrigtsen's message of
"Wed, 18 Apr 2018 13:34:42 +0200")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-NAI-Spam-Flag: NO
X-NAI-Spam-Threshold: 5
X-NAI-Spam-Score: 0
X-NAI-Spam-Rules: 2 Rules triggered
EDT_SA_DN_PASS=0, RV6267=0
X-NAI-Spam-Version: 2.3.0.9418 : core <6267> : inlines <6570> : streams
<1784382> : uri <2627551>
X-Spam-Score: -1.3 (-)
X-Debbugs-Envelope-To: 30171
Cc: Eli Zaretskii , p.stephani2@gmail.com, 30171@debbugs.gnu.org
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id:
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Errors-To: debbugs-submit-bounces@debbugs.gnu.org
Sender: "Debbugs-submit"
X-Spam-Score: -2.3 (--)
> 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
From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 18 08:41:02 2018
Received: (at 30171) by debbugs.gnu.org; 18 Apr 2018 12:41:02 +0000
Received: from localhost ([127.0.0.1]:58576 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from )
id 1f8mOU-0002vb-E1
for submit@debbugs.gnu.org; Wed, 18 Apr 2018 08:41:02 -0400
Received: from hermes.netfonds.no ([80.91.224.195]:55671)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from ) id 1f8mOQ-0002v3-Pk
for 30171@debbugs.gnu.org; Wed, 18 Apr 2018 08:41:00 -0400
Received: from 46.67.12.60.tmi.telenormobil.no ([46.67.12.60] helo=corrigan)
by hermes.netfonds.no with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.84_2) (envelope-from )
id 1f8mOJ-0000iW-QI; Wed, 18 Apr 2018 14:40:54 +0200
Received: from larsi by corrigan with local (Exim 4.89)
(envelope-from )
id 1f8mOA-0003vi-1V; Wed, 18 Apr 2018 14:40:42 +0200
From: Lars Ingebrigtsen
To: Stefan Monnier
Subject: Re: bug#30171: 27.0.50;
{add-to,remove-from}-invisibility-spec don't treat t specially
References:
<87d0yxh8ji.fsf@mouse.gnus.org> <831sfd2g9w.fsf@gnu.org>
<87vacod9yl.fsf@mouse.gnus.org>
Date: Wed, 18 Apr 2018 14:40:41 +0200
In-Reply-To: (Stefan Monnier's
message of "Wed, 18 Apr 2018 08:35:53 -0400")
Message-ID: <87k1t4d6wm.fsf@mouse.gnus.org>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 30171
Cc: Eli Zaretskii , p.stephani2@gmail.com, 30171@debbugs.gnu.org
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id:
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Errors-To: debbugs-submit-bounces@debbugs.gnu.org
Sender: "Debbugs-submit"
X-Spam-Score: -1.0 (-)
Stefan Monnier writes:
> 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.
I see. Makes sense. I'll clarify this in the doc strings of those
functions, then.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 24 11:20:50 2018
Received: (at 30171) by debbugs.gnu.org; 24 Apr 2018 15:20:51 +0000
Received: from localhost ([127.0.0.1]:38345 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from )
id 1fAzkM-0000n7-PI
for submit@debbugs.gnu.org; Tue, 24 Apr 2018 11:20:50 -0400
Received: from hermes.netfonds.no ([80.91.224.195]:47852)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from ) id 1fAzkH-0000mu-1s
for 30171@debbugs.gnu.org; Tue, 24 Apr 2018 11:20:44 -0400
Received: from cm-84.212.221.165.getinternet.no ([84.212.221.165] helo=stories)
by hermes.netfonds.no with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.84_2) (envelope-from )
id 1fAzkA-0002FW-JD; Tue, 24 Apr 2018 17:20:38 +0200
From: Lars Ingebrigtsen
To: Stefan Monnier
Subject: Re: bug#30171: 27.0.50;
{add-to,remove-from}-invisibility-spec don't treat t specially
References:
<87d0yxh8ji.fsf@mouse.gnus.org> <831sfd2g9w.fsf@gnu.org>
<87vacod9yl.fsf@mouse.gnus.org>
<87k1t4d6wm.fsf@mouse.gnus.org>
Date: Tue, 24 Apr 2018 17:20:34 +0200
In-Reply-To: <87k1t4d6wm.fsf@mouse.gnus.org> (Lars Ingebrigtsen's message of
"Wed, 18 Apr 2018 14:40:41 +0200")
Message-ID:
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 30171
Cc: Eli Zaretskii , p.stephani2@gmail.com, 30171@debbugs.gnu.org
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id:
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Errors-To: debbugs-submit-bounces@debbugs.gnu.org
Sender: "Debbugs-submit"
X-Spam-Score: -1.0 (-)
Lars Ingebrigtsen writes:
> Stefan Monnier writes:
>
>> 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.
>
> I see. Makes sense. I'll clarify this in the doc strings of those
> functions, then.
I've now done so and am closing this bug report.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 24 11:20:51 2018
Received: (at control) by debbugs.gnu.org; 24 Apr 2018 15:20:51 +0000
Received: from localhost ([127.0.0.1]:38348 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from )
id 1fAzkQ-0000nK-VY
for submit@debbugs.gnu.org; Tue, 24 Apr 2018 11:20:51 -0400
Received: from hermes.netfonds.no ([80.91.224.195]:47861)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from ) id 1fAzkO-0000nA-Bc
for control@debbugs.gnu.org; Tue, 24 Apr 2018 11:20:48 -0400
Received: from cm-84.212.221.165.getinternet.no ([84.212.221.165] helo=stories)
by hermes.netfonds.no with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.84_2) (envelope-from ) id 1fAzkM-0002pn-6g
for control@debbugs.gnu.org; Tue, 24 Apr 2018 17:20:47 +0200
Date: Tue, 24 Apr 2018 17:20:46 +0200
Message-Id:
To: control@debbugs.gnu.org
From: Lars Ingebrigtsen
Subject: control message for bug #30171
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: control
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id:
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Errors-To: debbugs-submit-bounces@debbugs.gnu.org
Sender: "Debbugs-submit"
X-Spam-Score: -1.0 (-)
tags 30171 fixed
close 30171
From unknown Sun Jun 22 07:32:33 2025
Received: (at fakecontrol) by fakecontrolmessage;
To: internal_control@debbugs.gnu.org
From: Debbugs Internal Request
Subject: Internal Control
Message-Id: bug archived.
Date: Wed, 23 May 2018 11:24:05 +0000
User-Agent: Fakemail v42.6.9
# This is a fake control message.
#
# The action:
# bug archived.
thanks
# This fakemail brought to you by your local debbugs
# administrator