[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) (add-hook 'org-mode-hook 'imalison:load-babel-languages)
(defun imalison:load-babel-languages () (defun imalison:load-babel-languages ()
(org-babel-do-load-languages (let* ((loaded-ob (or (require 'ob-sh nil t) (require 'ob-shell nil t)))
'org-babel-load-languages (ob-shell-name
'((sh . t) (when loaded-ob
(python . t) (intern (substring-no-properties (imalison:maybe-symbol-name loaded-ob) 3))))
(ruby . t) (added-modes (when ob-shell-name `((,ob-shell-name . t)))))
(octave . t) (org-babel-do-load-languages
(sqlite . t) 'org-babel-load-languages
(plantuml . t)))) `((python . t)
(ruby . t)
(octave . t)
(sqlite . t)
(plantuml . t)
,@added-modes))))
(setq org-log-into-drawer t (setq org-log-into-drawer t
org-log-reschedule t org-log-reschedule t