Modified sage-edit:exec-command-base.