Subject: bug#20380: 24.5; (shell-command-on-region ... "*Messages*") yields "Buffer is read-only" error

From: Alexis <[email-masked]>
Date: Mon, 20 Apr 2015 19:51:57 +1000

Vincent Lefevre <[email-masked]> writes:

> I have the following problem with Emacs 24:
>
> emacs -Q --eval \ 
>   '(shell-command-on-region (point) (point) "cp" t t 
>   "*Messages*")' tst.txt
>
> yields a "Buffer is read-only: #<buffer *Messages*>" error 
> instead of outputting the standard error from "cp" to the buffer 
> *Messages* like with Emacs 23.

NEWS section "Changes in Emacs 24.4" states: 
 
    ** The *Messages* buffer is created in `messages-buffer-mode', 
    a new major mode, with read-only status.

Alexis.