From c8ee803a5f8a8e6342ea127f9714cf0e036ceb1f Mon Sep 17 00:00:00 2001 From: Allard Hendriksen Date: Thu, 19 Apr 2018 10:49:41 +0200 Subject: [PATCH] Send strings literally When a command in the tmux source code block ended with a semi-colon, it was previously ignored. Now we send the keys with the -l option to send the line literally. --- ob-tmux.el | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/ob-tmux.el b/ob-tmux.el index 8bf2bad..93ca60d 100644 --- a/ob-tmux.el +++ b/ob-tmux.el @@ -129,11 +129,17 @@ must be created." "If SESSION exists, send a line of text to it." (let ((alive (org-babel-tmux-session-alive-p session))) (when alive - (start-process "tmux-send-keys" "*Messages*" - "tmux" "send-keys" - "-t" (org-babel-tmux-target-session session) + (start-process "tmux-send-keys" + "*Messages*" + "tmux" + "send-keys" + "-l" + "-t" + (concat (org-babel-tmux-session session) + ":" + (org-babel-tmux-window-default session)) line - "Enter")))) + "\n")))) (defun org-babel-tmux-session-execute-string (session body) "If SESSION exists, send BODY to it."