Skip to content

Confusion on the behavior of rustic-cargo-run, rustic-cargo-plain-run and rustic-comint-run #517

@hi563145

Description

@hi563145

Confusion

rustic-cargo-run and rustic-cargo-comint-run

The documentation string says that when arg is nil, the value of arg would be used and stored in rustic-run-arguments. However, the actual behavior is getting the value from mini buffer and storing it to rustic-run-arguments (rustic-run-comint-arguments for rustic-cargo-comint-run).

rustic-cargo-plain-run

The function does what the documentation says. However, if the arg is nil it still reads the arguments from the mini buffer.

Proposal

All rustic-cargo-run, rustic-cargo-plain-run and rustic-comint-run:

  • Will set a common variable rustic-run-arguments and use the value if arg is non-nil.
  • A configuration rustic-cargo-use-last-stored-arguments, when set to nil will get and store the arguments to the common variable from mini buffer. When set to non-nil would use the common variable as arguments.
  • The arguments would be appended to cargo run.
  • Change documentation accordingly

Additional Features

  • Auto fills mini buffer if is in example directory.
  • Auto fills mini buffer if there are multiple binary crates.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions