From 0b09770835dbb00d2028aae321dfa6113cdd967a Mon Sep 17 00:00:00 2001 From: Allard Hendriksen Date: Mon, 16 Jul 2018 12:02:16 +0200 Subject: [PATCH] Fix parameter name: consistency I want to use org-session as parameter when it expects the org-session as typed in to an org document. The terms 'session', 'window', and 'target' should remain reserved for tmux sessions, windows, and targets respectively. --- ob-tmux.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ob-tmux.el b/ob-tmux.el index 214628a..0a62eac 100644 --- a/ob-tmux.el +++ b/ob-tmux.el @@ -200,10 +200,11 @@ If no window is specified, use first window." (target-window (if window (concat "=" window) "^"))) (concat target-session ":" target-window))) -(defun org-babel-tmux-session-alive-p (session) + +(defun org-babel-tmux-session-alive-p (org-session) "Check if SESSION exists by parsing output of \"tmux ls\"." (let* ((tmux-ls (shell-command-to-string "tmux ls -F '#S'")) - (tmux-session (org-babel-tmux-session session))) + (tmux-session (org-babel-tmux-session org-session))) (car (seq-filter (lambda (x) (string-equal tmux-session x)) (split-string tmux-ls "\n")))))