Fork me on GitHub
#emacs
<
2021-03-06
>
teodorlu16:03:15

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?

teodorlu16:03:00

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

teodorlu16:03:03

I've managed to disable `read-only-mode`, but some text is stuck.

teodorlu16:03:02

I'm on DOOM Emacs (`Doom v2.0.9 (HEAD -> develop 01b447a12 2021-03-06 10:36:33 -0500)`)

teodorlu17:03:57

I restarted my Emacs server, that removed the problem. Still curious, though.

bob20:03:36

I'm a non-evil Doom user. C-x C-q toggles buffer read-only mode for me.

👍 3
hindol10:03:59

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
hindol11:03:03

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
hindol11:03:29

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