emacs - refactor edit and movement