I don't find this warning particularly helpful and pretty distracting because it hides the current text in the echo area for a brief moment. Is also seems unnecessary, because I will notice anyway that I cannot write in read-only areas. Is there a way to disable it?
Yes, you can disable these messages by setting
(Tested using GNU Emacs 24.5.1.)
Source of the 'buffer read-only' error
I believe that the source of that error:
So the solution to this would be to tweak the source code and build emacs locally by commenting out this specific line.
For reference, here is that code snippet that throws that error:
.. and commenting out that
There is a much easier way to avert this annoyance for the duration you are working in a read-only buffer .. you can temporarily NOT make it read-only.
So if you are getting a lot of these errors, simply make the buffer temporarily editable by hitting
A note of warning: Doing the C source hack could be a major source of confusion in future. So I wouldn't do it.