summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2017-10-28 12:58:37 -0400
committerKyle Meyer <kyle@kyleam.com>2017-10-28 12:58:37 -0400
commit3d98cfff077db38d06563d37bca36bdeb47cf202 (patch)
treeb747c8fb61cadd0df031583f5dcf2aba5861b40e /lisp
parent0b511912860ce04ed674682ef9d141e899089ac6 (diff)
downloademacs.d-3d98cfff077db38d06563d37bca36bdeb47cf202.tar.gz
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.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/km-snakemake.el15
1 files 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