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".
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.