From 3d98cfff077db38d06563d37bca36bdeb47cf202 Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Sat, 28 Oct 2017 12:58:37 -0400 Subject: snakemake-recompile-no-dryrun: Support local snakemake-program I set snakemake-program to a directory-local variable to run the Snakemake call within a Guix profile. --- lisp/km-snakemake.el | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/lisp/km-snakemake.el b/lisp/km-snakemake.el index 64c7221..013d21a 100644 --- a/lisp/km-snakemake.el +++ b/lisp/km-snakemake.el @@ -30,13 +30,14 @@ (interactive) (unless (buffer-live-p compilation-last-buffer) (user-error "No previous compile command found")) - (with-current-buffer compilation-last-buffer - (let ((command (car compilation-arguments))) - (if (string-prefix-p snakemake-program command) - (setf (car compilation-arguments) - (replace-regexp-in-string " --dryrun" "" command)) - (user-error "Last compile was not with %s" snakemake-program))) - (recompile))) + (let ((program snakemake-program)) + (with-current-buffer compilation-last-buffer + (let ((command (car compilation-arguments))) + (if (string-prefix-p program command) + (setf (car compilation-arguments) + (replace-regexp-in-string " --dryrun" "" command)) + (user-error "Last compile was not with %s" program))) + (recompile)))) (provide 'km-snakemake) ;;; km-snakemake.el ends here -- cgit v1.2.3