emacs - (Emacs) 文本是只读的?

标签 emacs lisp sbcl slime

所以我在 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/

相关文章:

logging - Emacs 口齿不清 : How to use ad-get-arg and ad-get-args?

Emacs 组织模式 : Change Time Format in Clock Table to Decimal Number

emacs - 有纯HTML5 Emacs模式吗?

visual-studio-code - 如何在 Visual Studio Code 上运行 Scheme?

common-lisp - 为什么在 `make-instance` 中调用 `let` 的工作方式不同?

lisp - scbl 异常堆在垃圾收集期间耗尽

Emacs:将 psvn.el 文件放在哪里?

scheme - Racket /Lisp 错误 : expected a procedure that can be applied to arguments

Clojure:相当于 Common Lisp 中的 "do"

common-lisp - SBCL 内置可执行文件 : "When attempting to set the slot' s value to XXX (SETF of SLOT-VALUE), 对象中缺少插槽 YYY”?