Subject: Re: bug#43844: 27.1; Mouse-3 avoid "Buffer is read-only" *patch*

From: Noam Postavsky <[email-masked]>
Date: Wed, 07 Oct 2020 11:14:39 -0400

Corwin Brust <[email-masked]> writes:

> In Dired, ERC, and, I assume, any read-only buffer the default behavior of
> mouse-3 causes errors (E.g. "kill-region: Buffer is read-only: #<buffer
> *Messages*>").

I think you just need to set the kill-read-only-ok option.

    kill-read-only-ok is a variable defined in ‘simple.el’.
    Its value is nil

    Documentation:
    Non-nil means don’t signal an error for killing read-only text.

> Unfortunately, it seems that ERC has some other means of causing its
> buffers to be rendered read-only that doesn't affect this var, thus
> the special-case logic.

I'm guessing ERC marks only some of text as read-only via text
properties.