rust-lang / rust-mode

Emacs configuration for Rust
Apache License 2.0
1.1k stars 176 forks source link

Prevent opening *rustfmt* in a frame on save if parsing fails #432

Closed scd31 closed 2 years ago

scd31 commented 2 years ago

If I have a file that cannot be parsed (for instance, it's missing a parenthesis or semicolon), when I save the file, Emacs opens a new frame with the *rustfmt* buffer. This is already pretty annoying, but when I fix the error it doesn't even close the frame! (It just points the frame at whatever existing buffer I was looking at, so now I have two frames that are looking at the same buffer).

Is there a way I can turn this off? I would like rustfmt to fail silently if it can't parse my file.

brotzeit commented 2 years ago

rust-format-show-buffer to nil maybe ?

scd31 commented 2 years ago

Thank you! That fixed it.