With this patch TAB in a code block aligns the code according to the major mode. The macro could be used to do the same thing for other commands (i.e. allow other commands to be invoked in the Org buffer, but actually carried out in the code buffer.) Patch attached and in branch src-block-tab at git@github.com:dandavison/org-devel.git.