From 98bec6d3f6b8b9a4ef3ef830cdd1d8af95e21f80 Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Tue, 19 Apr 2016 22:01:06 -0400 Subject: Rename snakemake-graph-rule to snakemake-graph-id With introduction of snakemake-graph-this-file, this variable isn't restricted to rule names. --- snakemake.el | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/snakemake.el b/snakemake.el index 6f9059b..ce07712 100644 --- a/snakemake.el +++ b/snakemake.el @@ -388,7 +388,7 @@ targets." ;;; Graphing commands -(defvar-local snakemake-graph-rule nil) +(defvar-local snakemake-graph-id nil) ;;;###autoload (defun snakemake-graph (rules &optional rule-graph) @@ -418,7 +418,7 @@ $ snakemake --{dag,rulegraph} -- RULES | display" rules)) (image-mode) (snakemake-graph-mode) - (setq snakemake-graph-rule (mapconcat #'file-name-nondirectory rules "-")) + (setq snakemake-graph-id (mapconcat #'file-name-nondirectory rules "-")) (pop-to-buffer (current-buffer))))) ;;;###autoload @@ -469,7 +469,7 @@ $ snakemake -s --{dag,rulegraph} | display" (if (= 0 ret-val) (progn (image-mode) (snakemake-graph-mode) - (setq snakemake-graph-rule file)) + (setq snakemake-graph-id file)) (goto-char (point-min)) (insert (format "Error in snakemake call from %s:\n\n" dir))) (pop-to-buffer (current-buffer))))) @@ -481,10 +481,10 @@ default extension of the output file is `snakemake-graph-default-extension', but you can enter any extension that the dot program supports." (interactive) - (unless snakemake-graph-rule + (unless snakemake-graph-id (user-error "Not in Snakemake graph buffer")) (let ((file (read-file-name "To file: " nil nil nil - (concat snakemake-graph-rule + (concat snakemake-graph-id snakemake-graph-default-extension)))) (unless (or (string-match-p "\\`\\s-*\\'" file) (and (file-exists-p file) -- cgit v1.2.3