Closed zw963 closed 3 years ago
This was actually a fix to a previous bug, changed last week. If your program expects input, it's sort of tedious to enable comint mode and disable read-only mode every time your program asks for input. That's why it was changed to this.
@zw963 thanks for opening the issue, but as @wannestas mentioned users want to send input to the process without running an additional command and I can totally understand it. If you prefer running a command before entering your input you can define a function that calls 'cargo run'.
(defun my-cargo-run ()
(interactive)
(call-interactively 'rustic-compile "cargo run"))
Thanks for explain
Do we consider add a new function as old fashion rustic-cargo-run
function? we can keep this new function as default.
Or add a optional args bfor this?
Anyway, for me, in most of my case, i don't input anythings, jus want to see the running result in compilation buffer, and quit immedately. IMO, if we need input somethings, in most case, run it on the terminal is the better
This just a personal advice, i solved this issue too with binding (quit-window)
to a key combination instead of q
anyway.
Hmmm, I'm not sure what's the best solution to cover both needs. Want to come up with a pull request that contains something that fits your needs ?
Hmmm, I'm not sure what's the best solution to cover both needs. Want to come up with a pull request that contains something that fits your needs ?
At least, should we only writable if build successful? anyway, build failed with writable was not so useful.
I don't know how we can detect when build has finished and run has started.
Following is a reproduce:
Write a main.rs, ensure it can be run sucessful.
run it with
rustic-cargo-run
, we can see outout result is successful.Try input somethings try to quit current buffer and close window, e.g. q, get following.
expected.
this compilation buffer should be a readonly buffer, and should permit user binding
q
toquit-window
as it does likerustic-recompile
Thank you.