emacs -Q output.txt M-x visual-line-mode ;; Scroll just after the long line of text in the middle of the screen, ;; then position the cursor at the first character at that visual line. C-M-: (add-text-properties (point) (1+ (point)) '(invisible t)) next-line recenter-top-bottom previous-line The cursor should jump to the top of the screen. This isn't always the case, as it sometimes moves to the bottom. It seems to only happen when the window needs to be repositioned. As you may be able to tell from the output below, I'm running from the emacs-25 branch.