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?
相关问题
- Symbol's function definition is void: declare-
- Generating powerset in one function, no explicit r
- How can I set the SVN password with Emacs 23.1 bui
- Emacs shell: save commit message
- emacs bind key to the insertion of another
相关文章
- ess-rdired: I get this error “no ESS process is as
- Emacs/xterm color annoyance on Linux
- Does learning one Lisp help in learning the other?
- Common Lisp: Why does my tail-recursive function c
- Pipe less to Emacs
- What is the definition of “natural recursion”?
- How do I write a macro-defining macro in common li
- How can I unintern a qualified method?
The keyboard shortcut
C-x C-q
is the default binding forread-only-mode
, which can be enabled or disabled with that shortcut. Describing that keyboard shortcut sequence withC-h k C-x C-q
yields the following buffer printout:So, another way to call that option would be to use:
M-x read-only-mode RET
Possible cause of such a message may be this: you are trying to print something over the REPL prompt, for example
CL-US|ER> (+ 1 2)
. This text in the SLIME buffer is read-only. Note the space after>
, it is the part of the prompt.I can't offer any insight into why you ended up with undesirable read-only text properties, but I occasionally encounter similar situations and so find the following command useful.
Select the region in question (or C-xh for the entire buffer), and run M-x
set-region-writeable
to remove the read-only text properties.I solved this by first opening two frames, one with a .lisp file opened and the other with the slime-repl.
From the frame with the .lisp file, I applied C-c C-j on a line of code (e.g (+ 1 2)).
This copied the line of code down to the slime-repl and evaluated it.
This also somehow solved the problem with the "text is read only" problem.
You can change read-only mode by doing:
M-x
->toggle-read-only
->RET
(in other words press enter)"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
thus to erase the entire buffer regardless:
or to remove all properties: