all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Philipp Stephani <p.stephani2@gmail.com>
Cc: 30204@debbugs.gnu.org
Subject: bug#30204: 27.0.50; Changing major mode resets non-default invisibility spec
Date: Fri, 13 Aug 2021 14:50:08 +0200	[thread overview]
Message-ID: <87lf55cxvj.fsf@gnus.org> (raw)
In-Reply-To: <wvr41siikyqj.fsf@a.muc.corp.google.com> (Philipp Stephani's message of "Mon, 22 Jan 2018 10:51:32 +0100")

Philipp Stephani <p.stephani2@gmail.com> writes:

> 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.

I'm not quite sure I understand the problem here -- if you have a buffer
in markdown-mode (that's set these properties), why would you change to
fundamental-mode?

And I think this is correct behaviour -- if you've switched to
fundamental-mode, then you don't want these remnants from markdown-mode
to survive, I think?

>  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. 

Yes, I don't think we have any mechanism that says "this buffer-local
value should survive if you change major mode, but only this one".  And
I think that's probably a good idea, because it sounds like a confusing
interface.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





  parent reply	other threads:[~2021-08-13 12:50 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-22  9:51 bug#30204: 27.0.50; Changing major mode resets non-default invisibility spec Philipp Stephani
2018-01-22 15:56 ` Eli Zaretskii
2018-01-22 20:42   ` Philipp Stephani
2018-01-22 20:47     ` Philipp Stephani
2021-08-13 12:50 ` Lars Ingebrigtsen [this message]
2021-09-04 18:35   ` Philipp
2021-09-05  8:53     ` Lars Ingebrigtsen
2021-09-05  9:34       ` Eli Zaretskii
2021-09-05  9:43         ` Lars Ingebrigtsen
2021-09-05  9:50           ` Eli Zaretskii
2021-09-05 10:12             ` Lars Ingebrigtsen
2021-09-05 10:32               ` Eli Zaretskii
2021-09-05 10:44                 ` Lars Ingebrigtsen
2021-10-06 10:55           ` Lars Ingebrigtsen
2021-10-07 22:21             ` Richard Stallman
2021-10-07 22:25               ` Lars Ingebrigtsen
2021-10-08 21:56                 ` Richard Stallman
2021-10-09 11:20                   ` Lars Ingebrigtsen
2021-10-10 16:50                     ` Juri Linkov
2021-10-10 18:07                       ` Eli Zaretskii
2021-10-11 21:12                         ` Richard Stallman
2021-10-10 23:26                     ` Richard Stallman
2021-10-11  3:01                       ` Phil Sainty
2021-10-11  8:19                       ` Lars Ingebrigtsen
2021-10-11  9:14                         ` Kévin Le Gouguec
2021-10-11 10:05                           ` Robert Pluim
2021-10-11 21:14                             ` Richard Stallman
2021-10-11 10:53                           ` Phil Sainty
2021-10-13 21:38                           ` Tomas Nordin
2021-10-11 21:15                         ` Richard Stallman
2021-10-12 12:04                           ` Lars Ingebrigtsen
2021-10-12 22:43                             ` Richard Stallman
2021-10-09 10:55                 ` Robert Pluim
2021-10-09 11:10                   ` Lars Ingebrigtsen
2021-10-09 11:15                     ` Robert Pluim
2021-10-09 11:28                       ` Lars Ingebrigtsen
2021-10-10 15:59                         ` Robert Pluim
2021-10-10 16:06                           ` Stefan Monnier
2021-10-10 16:15                             ` Robert Pluim
2021-09-06 10:22       ` jakanakaevangeli

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87lf55cxvj.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=30204@debbugs.gnu.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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.