Thursday, February 7, 2008

emacs read-only buffers

27.7 Read-Only Buffers

If a buffer is read-only, then you cannot change its contents, although you may change your view of the contents by scrolling and narrowing.

Read-only buffers are used in two kinds of situations:

  • A buffer visiting a write-protected file is normally read-only.

    Here, the purpose is to inform the user that editing the buffer with the aim of saving it in the file may be futile or undesirable. The user who wants to change the buffer text despite this can do so after clearing the read-only flag with C-x C-q.

variable: Buffer-read-onlyThis buffer-local variable specifies whether the buffer is read-only. The buffer is read-only if this variable is non-nil.


No comments: