所以我在 emacs 中工作,突然,slime-repl sbcl 说文本是只读的。那太好了,因为现在我无法在其中输入任何内容。我该如何解决?
最佳答案
“缓冲区是只读的”可以通过 C-x C-q
解决,但正如 Drew & phils 所说,
“文本是只读的”非常不同——这意味着
缓冲区的某些部分具有只读属性。
尝试离开只读部分,例如,移到缓冲区的末尾。
Emacs Lisp 手册 > elisp.info > 文本 > 文本属性 > 特殊属性
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::.
因此删除整个缓冲区而不管:
M-: (let ((inhibit-read-only t)) (erase-buffer)) RET
或删除所有属性:
(let ((inhibit-read-only t)) (set-text-properties (point-min) (point-max) ()))
关于emacs - (Emacs) 文本是只读的?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24565068/