This is a very strange issue and its cause is hard to determine. I often leave Emacs open for days, or even weeks at a time. My current
emacs-uptime is 9 and a half days. That's pretty normal and sometimes it can be twice as long or longer.
However, sometimes when I run Emacs for this long and I happen to push Emacs particularly hard (running lots of processes, opening big files, using strange settings, etc.) something weird happens after some days. Emacs randomly blinks all of a sudden, like it's doing
redisplay or something. This lasts for about a second or less. Thereafter, read-only text is not read-only anymore. I mean that any read-only text anywhere in Emacs is no longer read-only. REPL prompts, info buffers, help buffers, eshell prompts, buffers set to
view-mode, any buffer in
read-only-mode, anything else you can think of.
Basically, all read-only text becomes writable. At all, anywhere. I can accidentally clobber documentation by pressing a key that would normally do nothing or I can accidentally delete a REPL prompt which can screw up all kinds of things when developing. The only way around this issue (that I know of) is to restart Emacs. This is not always a viable solution. As you can see, this is a very annoying and often serious problem. But I cannot find anyone else online who has had this same issue.
So how can I determine what is causing this issue? And more importantly, how can I fix it?
Here is my
GNU Emacs 26.1 (build 5, x86_64-apple-darwin17.6.0, Carbon Version 158 AppKit 1561.4) of 2018-07-17
I.e., I'm on the Emacs Mac Port (by Yamamoto Mitsuharu) version 26.1. Also, my OS is macOS 10.13.6. I am happy to give more information about my setup as it becomes necessary.