News for hackers. Stuff that matters.
Re:Emacs: The most successful malleable system by taeric on Wednesday April 15, 2020 @09:45AM (#22877601)
You could just set mark when scrolling starts. Then, next cursor move jump back to mark first.

Some heuristics to make it fully behave. Multiple scroll events should not modify mark, for example. Mouse click does not jump back to mark. Etc.

Re:Emacs: The most successful malleable system by danShumway on Wednesday April 15, 2020 @10:19AM (#22877971)
The lack of "scroll-preserve-buffer-position" has been a very minor pet peeve for me for multiple years, and for some reason this very simple solution just never occurred to me.

I can't believe I didn't think of this. I'm already using marks to keep track of position when I scroll, it's just all manual right now.

I'll likely mess around with some hooks in my config this weekend and see if this is actually feasible, or if it comes with caveats I'm not seeing right now. I guess it would need to account for multiple windows open into the same buffer too.

Re:Emacs: The most successful malleable system by taeric on Wednesday April 15, 2020 @10:38AM (#22878229)
I'm convinced the edge cases will dominate this code, but the general idea seems straight forward. If you get this working, please share. Not something I think I want, per se, but I could be mistaken on seeing it work. :)
Re:Emacs: The most successful malleable system by gimboland on Wednesday April 15, 2020 @10:41AM (#22878261)
Well done. You have confirmed what they said:

> and the solution was something like "you are using it wrong - you need to use marks instead".

Re:Emacs: The most successful malleable system by taeric on Wednesday April 15, 2020 @10:57AM (#22878440)
My point was you could automate it. You were not using it wrong. Instead, my point is that you can make using it act like you want.
Re:Emacs: The most successful malleable system by pavelmark on Wednesday April 15, 2020 @10:50AM (#22878366)
Agreed, was thinking the same.