Hey, here's the script. I only added the sleep and set_backlight after shoot at the end, everything else is untouched. There's no set_raw.. I don't know what else could be causing this. If nobody finds anything I'll guess I'll stick to deleting the cfg file everytime
I don't see anything in that script that would enable raw.
CHDK doesn't do this on anyone else's camera that we know of, so it is very likely something you are doing or there is something specific to your setup. It's possible that there's a bug in there somewhere, but there must be some specific condition that triggers it.
The raw saving really is controlled by the raw option, it's not going to magically save raw without that getting set somehow. There are some additional conditions which could force it off, but there really aren't any that would force it on.
A few things you could do to possibly narrow it down.
Try just shooting manually, rebooting, shooting some more and see if raw comes back on.
Try a different script.
I notice that this
-- honour the display button
if is_key("print") then
This is odd since normally a script can't catch the print, although it should be possible with an adjustable alt button. The comment says disp button. As mentioned above, disp is also the raw shortcut on your camera. The "print" button should map to the playback button. The alt button is adjustable between play, video and display.
I don't think any of this would result in accidentally toggling raw when pressing the a key in the script, but I wouldn't bet much one way or the other.