rust-lang / rust-mode

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

Refine the error message displaying #481

Closed micl2e2 closed 1 year ago

micl2e2 commented 1 year ago

Before this change, when rust-format-show-buffer is on, which is the default case, all the output from rustfmt's STDERR would be placed into the dedicated "rustfmt" buffer, and the Minibuffer, and Message buffer as well.

Showing two identical lines of message is not necessary, and sometimes causes distraction.

Because the rust-format-show-buffer is a package-wide prefined customizable variable, "rustfmt" buffer should take precedence over either Minibuffer or Message buffer. And because the default behavior of Emacs's display-buffer (used by line 107) ensures that a new window will pop up. We can make a change to conditionally show error messages in Minibuffer or Message buffer, to refine the error message displaying.

brotzeit commented 1 year ago

Makes sense.

micl2e2 commented 1 year ago

Thanks!