-
Notifications
You must be signed in to change notification settings - Fork 101
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
use rustic-test-arguments by default #455
base: master
Are you sure you want to change the base?
Conversation
I agree this is something that needs to be fixed. The problem is really that the behavior is not consistent between using the popup and stand-alone command. The way the popup behave gives you the behavior you want (using Lines 173 to 180 in 4879922
I imagine it looking like this (cond (arg
(setq rustic-test-arguments (read-from-minibuffer "Cargo test arguments: " rustic-test-arguments)))
((string-empty-p rustic-test-arguments)
rustic-default-test-arguments)
(t rustic-test-arguments)) |
The idea was that you can use the rerun commands if you want to reuse the stored arguments. I'm not sure why I decided to make this behavior different for the popup, maybe so you don't have to add two commands to the popup menu. Would it be ok for you if we replace the popup condition with a new option. (cond (arg
(setq rustic-test-arguments (read-from-minibuffer "Cargo test arguments: " rustic-default-test-arguments)))
(rustic-cargo-always-use-stored-arguments ;; maybe better name ?
(if (> (length rustic-test-arguments) 0)
rustic-test-arguments
rustic-default-test-arguments))
(t
rustic-default-test-arguments)) |
@brotzeit: in my patch, to reset
Nevertheless, I agree with you that this functionality is not straightforward and my patch also changed the current default behavior of +1 vote for the use of option using Maybe change the name to |
@CeleritasCelery What do you think ? |
I like the idea of making it a user option for preserving the current behavior if desired. We also probably want to update And my personal preference for bikeshedding over the variable name would be |
@taquangtrung Do you still want to implement this? |
@CeleritasCelery: seems that @brotzeit already implemented it in this commit: 064aeef |
Hi,
Currently, the command
rustic-cargo-test
always runs with the default argumentrustic-default-test-arguments
. Users can set up a custom argument usingC-u
, but this is only applicable for the current run, and next time, users need to runC-u
again to update the argument.I fixed this issue by enabling
rustic-cargo-test
to run withrustic-test-arguments
, which is initialized byrustic-default-test-arguments
, and is only needed to be updated by users once usingC-u
.Can you review and merge this PR if possible?
Thanks!