doom-emacs/lisp
Henrik Lissner 5bdfecfa92
feat(lib): sudo-{find,this}-file: invoke save-place
After switching to the sudo-ed tramp buffer, this restores the point and
scroll position of the window to match the source buffer.

I exploit save-place here instead of simply saving/restoring (point)
and (window-start), because I believe it's better UX that save-place
treat the two buffers as effectively the same now and in the future, and
record the last cursor position equally between them, even if the
implementation is messier. This *could* be generalized into an advice
for save-place-find-file-hook and save-place-to-alist, but that's an
experiment for another day.

This is an experimental implementation and may change later.

Close: #7181
Co-authored-by: YourFin <YourFin@users.noreply.github.com>
2024-05-21 17:17:12 +02:00
..
cli
lib
demos.org
doom-cli.el fix(cli): appease byte-compiler wrt defcli-obsolete! 2024-05-21 17:17:02 +02:00
doom-editor.el
doom-keybinds.el
doom-lib.el
doom-modules.el
doom-packages.el
doom-profiles.el
doom-projects.el
doom-start.el
doom-ui.el
doom.el
init.el
packages.el