diff options
author | Kyle Meyer <kyle@kyleam.com> | 2016-04-19 22:01:06 -0400 |
---|---|---|
committer | Kyle Meyer <kyle@kyleam.com> | 2016-04-19 22:20:52 -0400 |
commit | 98bec6d3f6b8b9a4ef3ef830cdd1d8af95e21f80 (patch) | |
tree | 4f1e6b3bf9754a108c084fd60200214c6aa53975 | |
parent | efbfad46bb98d8f2884747c241cd2b17a085244c (diff) | |
download | snakemake-mode-98bec6d3f6b8b9a4ef3ef830cdd1d8af95e21f80.tar.gz |
Rename snakemake-graph-rule to snakemake-graph-id
With introduction of snakemake-graph-this-file, this variable isn't
restricted to rule names.
-rw-r--r-- | snakemake.el | 10 |
1 files 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 <current file> --{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) |