Skip to content

Commit f9d776b

Browse files
committed
Make jupyter-org-interaction-mode enabled optionally
1 parent 3abdec0 commit f9d776b

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

jupyter-org-client.el

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,11 @@ See also the docstring of `org-image-actual-width' for more details."
141141
:group 'ob-jupyter
142142
:type 'boolean)
143143

144+
(defcustom jupyter-org-want-integration t
145+
"Whether to enable `jupyter-org-interaction-mode' automatically on `org-mode' buffers."
146+
:group 'ob-jupyter
147+
:type 'boolean)
148+
144149
(defconst jupyter-org-mime-types '(:text/org
145150
;; Prioritize images over html
146151
:image/svg+xml :image/jpeg :image/png
@@ -945,7 +950,8 @@ C-x C-e `jupyter-eval-line-or-region'"
945950
(lambda (x) (eq (car x) 'jupyter-org-font-lock-ansi-escapes))
946951
org-font-lock-keywords))))
947952

948-
(add-hook 'org-mode-hook 'jupyter-org-interaction-mode)
953+
(when jupyter-org-want-integration
954+
(add-hook 'org-mode-hook 'jupyter-org-interaction-mode))
949955

950956
;;; Constructing org syntax trees
951957

0 commit comments

Comments
 (0)