Factored out register-do-with-preview for re-use