(Emacs) Text is read only?

前端 未结 7 895
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-02-04 06:56

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?

7条回答
  •  独厮守ぢ
    2021-02-04 07:09

    The keyboard shortcut C-x C-q is the default binding for read-only-mode, which can be enabled or disabled with that shortcut. Describing that keyboard shortcut sequence with C-h k C-x C-q yields the following buffer printout:

    C-x C-q runs the command read-only-mode, which is an interactive
    compiled Lisp function in `simple.el'.
    
    It is bound to C-x C-q.
    
    (read-only-mode &optional ARG)
    
    Change whether the current buffer is read-only.
    With prefix argument ARG, make the buffer read-only if ARG is
    positive, otherwise make it writable.  If buffer is read-only
    and `view-read-only' is non-nil, enter view mode.
    
    Do not call this from a Lisp program unless you really intend to
    do the same thing as the C-x C-q command, including
    possibly enabling or disabling View mode.  Also, note that this
    command works by setting the variable `buffer-read-only', which
    does not affect read-only regions caused by text properties.  To
    ignore read-only status in a Lisp program (whether due to text
    properties or buffer state), bind `inhibit-read-only' temporarily
    to a non-nil value.
    

    So, another way to call that option would be to use: M-x read-only-mode RET

提交回复
热议问题