Skip to main content
2 of 2
Added clarification.
Melioratus
  • 4.9k
  • 1
  • 28
  • 49

I think you uncovered a bug or something fell through the cracks when ob-shell.el was built.
Please submit bug report to org-mode repo.

Below is a temporary workaround

  1. Execute the missing org-babel-bash-initiate-session function definition below:
(defun org-babel-bash-initiate-session (&optional session _params) "Initiate a session named SESSION according to PARAMS." (when (and session (not (string= session "none"))) (save-window-excursion (or (org-babel-comint-buffer-livep session) (progn (shell session) ;; Needed for Emacs 23 since the marker is initially ;; undefined and the filter functions try to use it without ;; checking. (set-marker comint-last-output-start (point)) (get-buffer (current-buffer))))))) 

Note: I just copied org-babel-sh-initiate-session definition from ob-shell.el and changed -sh- to -bash-.

  1. Execute bash SRC again with C-c C-c.

  2. Use C-c C-v z.

Thank you for asking your question!


The answer code was tested using:
emacs version: GNU Emacs 25.2.1 (x86_64-unknown-cygwin, GTK+ Version 3.22.10)
org version: 9.1.2

Melioratus
  • 4.9k
  • 1
  • 28
  • 49