(Emacs)文本是只读的? [英] (Emacs) Text is read only?

查看:157
本文介绍了(Emacs)文本是只读的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我正在emacs工作,突然间,slime-repl sbcl说文本是只读的。那好极了,因为现在我无法打入任何东西。如何解决?

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?

推荐答案

缓冲区是只读可以被C-x C-q修复,但作为Drew& phils说,

文本是只读是非常不同的 - 这意味着
缓冲区的一部分具有只读属性。

尝试

"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手册> elisp.info>文本>文本属性>特殊属性

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

因此,擦除整个缓冲区无论M-:(let((禁止只读) t))(擦除缓冲区))RET

或删除所有属性(let((禁止只读))(set-text-properties(point-min) )()))

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

这篇关于(Emacs)文本是只读的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆