Print command output to a new *debug* buffer in mg
Add soft and hard undo boundaries