From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Philipp Stephani Newsgroups: gmane.emacs.bugs Subject: bug#30204: 27.0.50; Changing major mode resets non-default invisibility spec Date: Mon, 22 Jan 2018 20:47:25 +0000 Message-ID: References: <83h8rdrio9.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="001a114082e03f10e40563638a16" X-Trace: blaine.gmane.org 1516653991 14259 195.159.176.226 (22 Jan 2018 20:46:31 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 22 Jan 2018 20:46:31 +0000 (UTC) Cc: 30204@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jan 22 21:46:26 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 1ediyp-0002cX-Q3 for geb-bug-gnu-emacs@m.gmane.org; Mon, 22 Jan 2018 21:46:12 +0100 Original-Received: from localhost ([::1]:37056 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1edj0q-0002pb-5g for geb-bug-gnu-emacs@m.gmane.org; Mon, 22 Jan 2018 15:48:16 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35347) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1edj0g-0002nr-9s for bug-gnu-emacs@gnu.org; Mon, 22 Jan 2018 15:48:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1edj0c-00072f-BB for bug-gnu-emacs@gnu.org; Mon, 22 Jan 2018 15:48:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:58906) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1edj0c-00072V-79 for bug-gnu-emacs@gnu.org; Mon, 22 Jan 2018 15:48:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1edj0b-0007Eh-P3 for bug-gnu-emacs@gnu.org; Mon, 22 Jan 2018 15:48:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Philipp Stephani Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 22 Jan 2018 20:48:01 +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.151665406327789 (code B ref 30204); Mon, 22 Jan 2018 20:48:01 +0000 Original-Received: (at 30204) by debbugs.gnu.org; 22 Jan 2018 20:47:43 +0000 Original-Received: from localhost ([127.0.0.1]:38570 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1edj0J-0007E9-ED for submit@debbugs.gnu.org; Mon, 22 Jan 2018 15:47:43 -0500 Original-Received: from mail-lf0-f51.google.com ([209.85.215.51]:35183) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1edj0H-0007Dx-Tk for 30204@debbugs.gnu.org; Mon, 22 Jan 2018 15:47:42 -0500 Original-Received: by mail-lf0-f51.google.com with SMTP id a204so12300159lfa.2 for <30204@debbugs.gnu.org>; Mon, 22 Jan 2018 12:47:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=4Ol0D5NPQq03m7OdCyOvJkhtZvnXgmrB0kUzgd2iaio=; b=kEWL6jesH5z3qvP7/VXKcV3rw9pE+J/EXwhinMaoPhfEtbAwZyIPYS3iUgrPLeE2AJ U4sYZH1uMcNLb/j3Zkx9/yIeQKxj2fHINMR1KmzeAoSmIZL5aHNqkWqRy5qHeL7VYaDm brT8kvYOSPrnYgLJfNLWrseh0xSp2lvMCl+dAHXkKvpSeU6PCZ3NJtCJiadSv1p+TwjZ Us1VwxDJh1caVLnvt0NfQw+ytY6kDvaZJhb0FYWDugnTfWza5NKY+pKv90+sLtYslM4D el4Acsq5qunPJEojnsHkcTlo/hHM4PE+6hsDT8kuefdakGtnohn7ekBRqmejWVC7UVVH LMfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=4Ol0D5NPQq03m7OdCyOvJkhtZvnXgmrB0kUzgd2iaio=; b=fqliiHpryPL3VS6DDPgr8nFAR71xRS0ztWFC84MN5UteJeZZ5I8HWYbZlGc8+jzxWT oY8xyn8wB9nL/X/hu6EnwBSuq1+JjWmAk7PhrxEQZd8Hom/tqrrJXNOhFnJiwSw9cJax yq27MhFwBGw+vOofJsCeB/Lqpfs7RCcmJV/jrilYxuR8HuEAAo1H1bNTyEUa+0uKEn16 A3ylvvVGX+TdUt6GMrnDB+IS+jBoMh3kVHx9Dfp2cPpYLQ2Ht8yfl4VBDR1T8lWeDvsJ 6fcNVqh8Ias0XOGkEZ5bjOfrqG/7K1lL25pw2aHZ0tFm1RFWAsKgQ8CaUckTgRRezNfG ubQQ== X-Gm-Message-State: AKwxytdVPI+W+r33UYBxctqQLlBs2HA5i7fRq1gCxM4ekY7z26Z7biwm NZo2yRtKmv7iHlXvuy8vYAaD6fpscRKt6oXyqVs= X-Google-Smtp-Source: AH8x225G5gcNU4O1SxL0Qr1T3w6s9t3v8sSVEkOOS7P/LBEUDogUcygJ6XZSENOYjg1FGepp83fZwtUHBJPiSz0qAgQ= X-Received: by 10.25.22.2 with SMTP id m2mr70154lfi.21.1516654055852; Mon, 22 Jan 2018 12:47:35 -0800 (PST) In-Reply-To: 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:142394 Archived-At: --001a114082e03f10e40563638a16 Content-Type: text/plain; charset="UTF-8" Philipp Stephani schrieb am Mo., 22. Jan. 2018 um 21:42 Uhr: > Eli Zaretskii schrieb am Mo., 22. Jan. 2018 um 16:57 Uhr: > >> > 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? >> >> > Hmm, yes, that sounds like a good idea. Let me try that. > I don't think this works: The permanent-local property is a global symbol property, but I'd need it to be per-buffer. --001a114082e03f10e40563638a16 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


Philip= p Stephani <p.stephani2@gmail.c= om> schrieb am Mo., 22. Jan. 2018 um 21:42=C2=A0Uhr:
Eli Zaretskii <eliz@gnu.org> schrieb am Mo., 22. Jan. 2018 um 16:57=C2=A0Uhr:
> From: Philipp Stephani <p.stephani2@gmail.co= m>
> Date: Mon, 22 Jan 2018 10:51:32 +0100
>
> C-x b *foo* RET
> M-: (progn (add-to-invisibility-spec 'bar) (insert (propertize &qu= ot;foo" 'invisible 'foo)))
>
> Now "foo" is visible, as it should be.
>
> M-x fundamental-mode =3D> "foo" becomes invisible, becaus= e
> `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<= br> > invisibility properties.

Why can't you make buffer-invisibility-spec be a permanent-local
variable in the cases where that is TRT?


Hmm, yes, that sounds like a good idea. Let me try that.= =C2=A0

I don't think = this works: The permanent-local property is a global symbol property, but I= 'd need it to be per-buffer.=C2=A0
--001a114082e03f10e40563638a16--