Fork me on GitHub

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?


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.

👍 3

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.

👍 3

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.

👍 3

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

👍 3