Emacs tip of the day: use (interactive "*") for commands that edit the buffer, so they show a helpful error if the buffer is read only.