https://www.gnu.org/software/emacs/manual/html_node/emacs/Scrolling.htmlSome users like scroll commands to keep point at the same screen position, so that scrolling back to the same screen conveniently returns point to its original position. You can enable this behavior via the variable scroll-preserve-screen-position. If the value is t, Emacs adjusts point to keep the cursor at the same screen position whenever a scroll command moves it off-window, rather than moving it to the topmost or bottommost line. With any other non-nil value, Emacs adjusts point this way even if the scroll command leaves point in the window. This variable affects all the scroll commands documented in this section, as well as scrolling with the mouse wheel (see Mouse Commands); in general, it affects any command that has a non-nil scroll-command property. See Property Lists.
查了一下,可能这个 scroll-preserve-screen-position 对你有用,让你在再次滚动回来的时候,光标位于滚动前的那个位置,我感觉应该满足你的需求。
在你的配置文件里面增加一行 (setq scroll-preserve-screen-position t) 或者 (setq scroll-preserve-screen-position 'always) 这两个据说效果不一样,你都可以试试看。