emacs-format-all-the-code
emacs-format-all-the-code copied to clipboard
Cursor jumps back to beginning of the buffer after format-all-buffer before save
trafficstars
Followed the following step to reproduce:
- open a file (I am using C file).
- split several windows (same contents), change cursor position for each window.
- change some content.
- enabled format-all-mode, and save, or directly call format-all-buffer.
- cursor position maintained only for the focused window, other windows cursors are set to the beginning of the window.
Version:
Status: Installed in ‘format-all-20191001.917/’ (unsigned). [Delete]
Version: 20191001.917
Commit: f8ca73192482b67c70c6ef4777abb17e200ade30
Summary: Auto-format C, C++, JS, Python, Ruby and 30 other languages
Requires: emacs-24, cl-lib-0.5
Homepage: https://github.com/lassik/emacs-format-all-the-code
Keywords: [languages] [util]
Other versions: 20191001.917 (melpa).
I saw we have function to keep current window cursor position, just wondering if we can also check and save other windows' cursor position.
Sorry, I missed this issue for some reason. I agree that it'd be nice to preserve the position in other windows. Unfortunately I don't immediately recognize what causes the problem, and don't have time to investigate. If someone else finds a solution, I'll be happy to merge it in.
In general, multi-window stuff is a bit of a PITA to figure out Emacs, so good luck to any brave soul who looks into it :)