I tested elph130. The af_lock method
works as expected only takes one shot.
set_mf without delay only takes one shot.
The output does not show the focus updated, like
Shot 1 focus= 500 : 2846
Shot 2 focus= 3000 : 494
which is probably due to the issue mentioned in :
http://chdk.setepontos.com/index.php?topic=11078.msg110967#msg110967 since the camera doesn't have native MF, the actual focus update happens in shooting.
With get_shooting set, the output is still wrong, but both shots are taken and the focus appears to be adjusted in the images.
With the patch applied, output is correct but no wait still only takes one shot. get_shooting() mode appears to work correctly.
edit:
I went back and retested the other cams, since I wasn't certain I actually verified that two shots were taken before.
D10 works correctly in both mf and aflock (sets focus, takes two shots) if it is in continuous mode. In regular mode, it only takes one shot. Or possibly it's somewhat random.
A540 appears to work correctly in either mode, without get_shooting and not in continuous mode.
The elph130 was in continuous mode.
I had raw disabled on all to avoid additional delay.
I think phil is right about the 1 shot behavior being script logic rather than specific to the set_focus stuff. To test whether focus can be updated inside get_shooting, it would probably be better to set the focus immediately, and then wait for get_shooting before trying to actually shoot again.
edit:
note the patch linked above isn't completely correct, it will be confused by modes other than regular AF. I'm not sure I understand the logic in shooting_get_real_focus_mode() - actual it was right, see below.