From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#30204: 27.0.50; Changing major mode resets non-default invisibility spec Date: Mon, 22 Jan 2018 17:56:38 +0200 Message-ID: <83h8rdrio9.fsf@gnu.org> References: Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1516636587 23094 195.159.176.226 (22 Jan 2018 15:56:27 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 22 Jan 2018 15:56:27 +0000 (UTC) Cc: 30204@debbugs.gnu.org To: Philipp Stephani Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jan 22 16:56:22 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1edeSF-0005Jk-BY for geb-bug-gnu-emacs@m.gmane.org; Mon, 22 Jan 2018 16:56:15 +0100 Original-Received: from localhost ([::1]:49661 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1edeUD-000567-S0 for geb-bug-gnu-emacs@m.gmane.org; Mon, 22 Jan 2018 10:58:17 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40227) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1edeU2-00054W-VG for bug-gnu-emacs@gnu.org; Mon, 22 Jan 2018 10:58:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1edeTz-00006r-SZ for bug-gnu-emacs@gnu.org; Mon, 22 Jan 2018 10:58:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:58658) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1edeTz-00006j-P9 for bug-gnu-emacs@gnu.org; Mon, 22 Jan 2018 10:58:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1edeTz-0008OU-Is for bug-gnu-emacs@gnu.org; Mon, 22 Jan 2018 10:58:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 22 Jan 2018 15:58:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 30204 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 30204-submit@debbugs.gnu.org id=B30204.151663662332126 (code B ref 30204); Mon, 22 Jan 2018 15:58:03 +0000 Original-Received: (at 30204) by debbugs.gnu.org; 22 Jan 2018 15:57:03 +0000 Original-Received: from localhost ([127.0.0.1]:38317 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1edeSz-0008Lq-Rp for submit@debbugs.gnu.org; Mon, 22 Jan 2018 10:57:03 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:48911) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1edeSx-0008LT-UI for 30204@debbugs.gnu.org; Mon, 22 Jan 2018 10:57:00 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1edeSp-0007vq-HH for 30204@debbugs.gnu.org; Mon, 22 Jan 2018 10:56:54 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:38309) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1edeSp-0007vi-Df; Mon, 22 Jan 2018 10:56:51 -0500 Original-Received: from [176.228.60.248] (port=3289 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1edeSo-0007iG-Or; Mon, 22 Jan 2018 10:56:51 -0500 In-reply-to: (message from Philipp Stephani on Mon, 22 Jan 2018 10:51:32 +0100) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:142377 Archived-At: > From: Philipp Stephani > Date: Mon, 22 Jan 2018 10:51:32 +0100 > > C-x b *foo* RET > M-: (progn (add-to-invisibility-spec 'bar) (insert (propertize "foo" 'invisible 'foo))) > > Now "foo" is visible, as it should be. > > M-x fundamental-mode => "foo" becomes invisible, because > `kill-all-local-variables' has reset `buffer-invisibility-spec' to t. > This can be confusing for modes that use conditional invisibility > properties such as markdown-mode. > Probably `kill-all-local-variables' shouldn't blindly reset > `buffer-invisibility-spec', or maybe it should remove conditional > invisibility properties. Why can't you make buffer-invisibility-spec be a permanent-local variable in the cases where that is TRT? (In general, clearing buffer-invisibility-spec on major mode change sounds appropriate to me.)