From f86e0c5cba0028474e35fa218e972958d2673dd6 Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Mon, 8 Jun 2015 20:54:18 -0400 Subject: Expose --touch to snakemake-compile-project-file --- lisp/init-snakemake.el | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'lisp') diff --git a/lisp/init-snakemake.el b/lisp/init-snakemake.el index e41bfb5..9e45634 100644 --- a/lisp/init-snakemake.el +++ b/lisp/init-snakemake.el @@ -17,14 +17,15 @@ (defun km/snakemake-compile-project-file (jobs) "Run Snakemake to produce project file at point. The numeric prefix JOBS controls the number of jobs that -Snakemake runs (defaults to 1). If JOBS is zero, perform a dry -run." +Snakemake runs (defaults to 1). If JOBS is zero, perform a dry +run. If JOBS is negative, just touch the output files." (interactive "p") (let* ((fname (or (km/project-filename-at-point) (read-file-name "File: "))) - (job-flag (if (zerop jobs) - " -n " - (format " -j%s " jobs))) + (job-flag (cond + ((> jobs 0) (format " -j%s " jobs)) + ((zerop jobs) " -n ") + (t " -t "))) (compile-command (concat (snakemake-compile-command) job-flag fname)) (default-directory (projectile-project-root))) -- cgit v1.2.3