New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rust-enable-format-on-save + compile = annoying jump to end of buffer #256
Comments
Can you do me a favor and try this with my fork. I have added a custom process and it's possible that this issue doesn't occur with it. If the problem still exists I will try to fix it. |
I tried. For real project is does not work at all.
looks like it copy just one file into '/tmp' and run rustfmt for it? But for dummy test project created with I wonder how scheme with copying will work for real projects, with tree of modules, |
Thanks for taking a look at it! What do you think would be the best solution. Switch to stdin again, try to ignore this error with the current solution or create a temp file in the project directory ? |
If I edit
|
I wouldn't have a problem with that. The best way would be reverting I guess, but I will check if this is practicable. But probably there will be complaints about it as it changes the user experience. |
May be time to ask emacs-devel for general infrastructure for that? |
Maybe, but I don't think it would change anything for this issue. rustfmt just isn't ready. And even if they would add something we could use it in 5 ? years. |
It should work, but I just fixed it for now. |
Looks like function already exists in emacs 26: emacs-lsp/lsp-mode#258 (comment) , also in lsp-mode#258 was implemented some work around for emacs 25. |
Hi, not sure if relevant: I experience a slight variation of this issue: when I save the code is formatted and the cursor goes to the lower part of the buffer (as if running executing command Example: I'm using Emacs 25.2.2 on Linux and |
@Dushistov @brotzeit I didn't clearly understand at what level the fix should be applied, whether in the Emacs world or in Can you kindly help me understanding here? I'm still experiencing this, it's a bit annoying (especially when pair-programming or in live coding sessions). thank you! |
Bump: anybody find a workaround? I've had to disable auto-fmt because it's so bad. (rust-mode 20180626.1512, GNU Emacs 24.5.1) |
I added |
This is bug is similar to #231, but instead of begin of buffer,
at now it jumps to the end of buffer with rust code.
I have applied fix from #251
Steps to reproduce:
C-x 2
C-x O
M-x compile
choose and run compilation commandformating in so way that
rustfmt
should modify it (Do not save buffer)C-x O
and pressg
as result the position of cursor in buffer with rust code will change to the end of buffer.
/cc @brotzeit
The text was updated successfully, but these errors were encountered: