modify emacs frame and buffer