mirror of
https://github.com/doomemacs/doomemacs
synced 2025-09-18 16:06:56 -05:00
tweak(org): don't configure ob-python
More recent versions of ob-python (Org 9.7+) calculates the python command from `python-shell-interpreter` and `python-shell-interpreter-args`, effectively rendering this block (mostly) redundant. It still leaves `org-babel-python-command-nonsession` to be changed, but I think I'll leave that to users to set, for simplicity's sake. What's more, users who repin Org to an older version (predating bzg/org-mode@9239b0e8d1) will see void-variable errors for this new variable. Fix: #8509
This commit is contained in:
@@ -284,17 +284,7 @@ Also adds support for a `:sync' parameter to override `:async'."
|
||||
(save-excursion
|
||||
(when-let ((beg (org-babel-where-is-src-block-result))
|
||||
(end (progn (goto-char beg) (forward-line) (org-babel-result-end))))
|
||||
(org-display-inline-images nil nil (min beg end) (max beg end)))))))
|
||||
|
||||
(after! ob-python
|
||||
(when (equal org-babel-python-command-nonsession "python")
|
||||
(setq org-babel-python-command-nonsession
|
||||
(string-trim
|
||||
(concat python-shell-interpreter " "
|
||||
(if (string-match-p "\\<i?python[23]?$" python-shell-interpreter)
|
||||
(replace-regexp-in-string
|
||||
"\\(^\\| \\)-i\\( \\|$\\)" " " python-shell-interpreter-args)
|
||||
python-shell-interpreter-args)))))))
|
||||
(org-display-inline-images nil nil (min beg end) (max beg end))))))))
|
||||
|
||||
|
||||
(defun +org-init-babel-lazy-loader-h ()
|
||||
|
Reference in New Issue
Block a user