Hot answers tagged

2

If you add the built-in scroll-lock-mode to your code, you should get behavior like what you want. Here's a slightly more-expansive update to your mode that fixes two other issues I found (the buffer-local version works normally and it doesn't change recenter-positions globally). Following your comments, I've also updated it not to rely directly on scroll-...


1

I have written something that after some quick testing seems to be working. save-place-mode does the automatic restoring of the cursor position by adding save-place-find-file-hook – which takes the cursor to the saved position – to find-file-hook. To change the behaviour so that the restoring can be done on demand, I removed save-place-find-file-hook from ...


1

You can put the current position in a variable of your choosing and save that variable persistently. Put a function that sets the variable value on kill-buffer-hook, since you say (in a comment) that you want to do this just before killing the buffer. Or on kill-emacs-hook. You can add your variable for this to savehist-additional-variables, and use ...


1

The mark-ring is supposed to do just that: use C-u C-SPC to go back one step; repeat as needed. You'll need to increase mark-ring-max if you want to go "up to 100 of them", of course. And it might be the case that some operations fail to "push a mark". If so, please report that as a bug.


Only top voted, non community-wiki answers of a minimum length are eligible