[Emacs] Support using ob-shell instead of ob-sh

This commit is contained in:
Ivan Malison 2018-06-01 15:49:40 -07:00
parent b6148a9132
commit e08eea87bc
No known key found for this signature in database
GPG Key ID: 62530EFBE99DC2F8

View File

@ -3056,14 +3056,19 @@ Intero seems to be causing hangs, so it has been disabled
(add-hook 'org-mode-hook 'imalison:load-babel-languages)
(defun imalison:load-babel-languages ()
(org-babel-do-load-languages
'org-babel-load-languages
'((sh . t)
(python . t)
(ruby . t)
(octave . t)
(sqlite . t)
(plantuml . t))))
(let* ((loaded-ob (or (require 'ob-sh nil t) (require 'ob-shell nil t)))
(ob-shell-name
(when loaded-ob
(intern (substring-no-properties (imalison:maybe-symbol-name loaded-ob) 3))))
(added-modes (when ob-shell-name `((,ob-shell-name . t)))))
(org-babel-do-load-languages
'org-babel-load-languages
`((python . t)
(ruby . t)
(octave . t)
(sqlite . t)
(plantuml . t)
,@added-modes))))
(setq org-log-into-drawer t
org-log-reschedule t