-
Notifications
You must be signed in to change notification settings - Fork 67
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
feat(cargo-process.el): add var to customize flags passed to cargo #46
Conversation
cargo-process.el
Outdated
@@ -212,7 +216,9 @@ Always set to nil if cargo-process--enable-rust-backtrace is nil" | |||
(let* ((buffer (concat "*Cargo " name "*")) | |||
(path cargo-process--custom-path-to-bin) | |||
(path (and path (file-name-as-directory path))) | |||
(command (cargo-process--maybe-read-command (concat path command))) | |||
(flags (apply #'concatenate 'string cargo-process--command-flags)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will cause issues in the case of having multiple flags, since there is no space added between concatenation.
Maybe instead of a list, simply use a string for all flags?
cargo-process.el
Outdated
@@ -64,6 +64,10 @@ | |||
"Set RUST_BACKTRACE environment variable to 1 for tasks test and run" | |||
:group 'cargo-process) | |||
|
|||
(defcustom cargo-process--command-flags (list "--color never") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From my comment below, this would just be a string. However I'm not sure why you're having this issue, maybe a specific Emacs client or Emacs configuration. So it would be best to have this as an empty string, to prevent this from breaking other people's workflow. You can then adjust the variable in your own config.
Good good, thanks! |
Hi, my output for commands like |
@ejmg (setq cargo-process--command-flags "--color never") |
This is an attempt to deal with issue #45 by adding a
cargo-process--command-flags
custom variable and defaulting it with the--color never
flag. This variable can, of course, be customized as needed by users.