(Emacs) Text is read only?

emacs, lisp, sbcl, slime

Solution

"Buffer is read-only" can be cured by `C-x C-q` but as Drew & phils said, "Text is read-only" is very different -- it means some part of the buffer has a read-only property. Try moving away from the read-only part, e.g., to the end of the buffer.

Emacs Lisp Manual > elisp.info > Text > Text Properties > Special Properties

 Since changing properties counts as modifying the buffer, it is not
 possible to remove a `read-only' property unless you know the
 special trick: bind `inhibit-read-only' to a non-`nil' value and
 then remove the property.  *Note Read Only Buffers::.

thus to erase the entire buffer regardless:

M-: (let ((inhibit-read-only t)) (erase-buffer)) RET

or to remove all properties:

(let ((inhibit-read-only t)) (set-text-properties (point-min) (point-max) ()))

Problem

So I was working in emacs and the suddenly, the slime-repl sbcl says text is read only. Well that's great because now I can't type anything into it. How do I fix?

Original source

Related problems