xenodium / ready-player

GNU General Public License v3.0
136 stars 7 forks source link

Playing in another file after one song is played to the end shows "Text is read only" error #2

Closed kisaragi-hiu closed 3 months ago

kisaragi-hiu commented 3 months ago

I'm using mpv, with default file types, on Emacs 29.4.

Problem

After a song finishes, opening another file to try to play it shows a "Text is read only" error.

Additional info

This happens because the playback buffer is in shell mode, and shell-mode sets parts of the buffer to read only.

This can be fixed by making ready-player--playback-buffer use inhibit-read-only when erasing the buffer.

This can also be fixed by killing the playback buffer in the playback sentinel after the process finishes.