Add `default-directory' to `body' in `org-babel-execute:tmux'

Change the current directory to `default-directory' before executing commands in
`org-babel-execute:tmux'. This allows the `:dir' header argument to take effect
in the tmux code block.
pull/19/head
York Zhao 2022-12-28 09:23:34 -05:00
parent cb4f151554
commit 4c71e77b83
1 changed files with 1 additions and 0 deletions

View File

@ -89,6 +89,7 @@ Change in case you want to use a different tmux than the one in your $PATH."
Argument BODY the body of the tmux code block.
Argument PARAMS the org parameters of the code block."
(message "Sending source code block to interactive terminal session...")
(setq body (format "cd %s\n%s" default-directory body))
(save-window-excursion
(let* ((org-session (cdr (assq :session params)))
(org-header-terminal (cdr (assq :terminal params)))