From e07912bb4e07944f8a3fa74bbc331432a87183fc Mon Sep 17 00:00:00 2001 From: Ty Overby Date: Mon, 23 Jan 2017 14:34:17 -0800 Subject: [PATCH 1/2] Add cargo-process-run-bin for running specific binaries --- cargo-process.el | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/cargo-process.el b/cargo-process.el index be437b5..4bf0d20 100644 --- a/cargo-process.el +++ b/cargo-process.el @@ -282,6 +282,15 @@ Cargo: Build and execute src/main.rs." (interactive) (cargo-process--start "Run" "cargo run")) +;;;###autoload +(defun cargo-process-run-bin (command) + "Run the Cargo run command --bin . +With the prefix argument, modify the command's invocation. +Cargo: Build and execute with --example ." + (interactive) + (cargo-process--start (concat "Run " command) + (concat "cargo run --bin " command))) + ;;;###autoload (defun cargo-process-run-example (command) "Run the Cargo run command --example . From 8591bd867bd4cdedfa4bfc3b0db42d9ca05cfc22 Mon Sep 17 00:00:00 2001 From: Ty Overby Date: Tue, 24 Jan 2017 10:41:54 -0800 Subject: [PATCH 2/2] Fix comments --- cargo-process.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cargo-process.el b/cargo-process.el index 4bf0d20..c50f5c2 100644 --- a/cargo-process.el +++ b/cargo-process.el @@ -32,6 +32,7 @@ ;; * cargo-process-init - Create a new cargo project inside an existing directory. ;; * cargo-process-run - Build and execute src/main.rs. ;; * cargo-process-run-example - Build and execute with --example . +;; * cargo-process-run-bin - Build and execute a specific binary. ;; * cargo-process-search - Search registry for crates. ;; * cargo-process-test - Run all unit tests. ;; * cargo-process-update - Update dependencies listed in Cargo.lock. @@ -286,7 +287,7 @@ Cargo: Build and execute src/main.rs." (defun cargo-process-run-bin (command) "Run the Cargo run command --bin . With the prefix argument, modify the command's invocation. -Cargo: Build and execute with --example ." +Cargo: Build and execute a specific binary" (interactive) (cargo-process--start (concat "Run " command) (concat "cargo run --bin " command)))