Beginner question. I accidentially made a text buffer readonly, and now I can't write to it π I've found a var called `buffer-read-only`. I tried setting it to nil, but I still can't edit the buffer content. I presume I could just restart Emacs to escape, but I'd prefer to learn. Any advice?
Tip: You can check what modes are currently active by typing SPC h m
. There may be some other minor mode (apart from read-only-mode
) at play.
You can also explore what buffer-read-only
is by typing SPC h v
and then searching for it.
SPC h <key>
is very useful in general.
P.S. I just redid what you did. I could safely exit eshell-mode
by simply switching to emacs-lisp-mode
. Changing the major mode also resets all the minor modes (I think).
Thanks!
context: i messed around with a buffer. Made it eshell-mode
when I wanted emacs-lisp-mode
. Then I suddenly coudn't edit stuff.
When I try to delete my content, I'm getting a message "Text is read-only".
I've managed to disableΒ `read-only-mode`, but some text is stuck.
I'm on DOOM Emacs (`Doom v2.0.9 (HEAD -> develop 01b447a12 2021-03-06 10:36:33 -0500)`)
I restarted my Emacs server, that removed the problem. Still curious, though.
I'm a non-evil Doom user. C-x C-q
toggles buffer read-only mode for me.