Skip to content

Commit 36bf77c

Browse files
committed
Make jupyter-org-interaction-mode enabled optionally
1 parent 3932c8a commit 36bf77c

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
@@ -128,6 +128,11 @@ See also the docstring of `org-image-actual-width' for more details."
128128
:group 'ob-jupyter
129129
:type 'boolean)
130130

131+
(defcustom jupyter-org-want-integration t
132+
"Whether to enable `jupyter-org-interaction-mode' automatically on `org-mode' buffers."
133+
:group 'ob-jupyter
134+
:type 'boolean)
135+
131136
(defconst jupyter-org-mime-types '(:text/org
132137
;; Prioritize images over html
133138
:image/svg+xml :image/jpeg :image/png
@@ -843,7 +848,8 @@ C-x C-e `jupyter-eval-line-or-region'"
843848
(lambda (x) (eq (car x) 'jupyter-org-font-lock-ansi-escapes))
844849
org-font-lock-keywords))))
845850

846-
(add-hook 'org-mode-hook 'jupyter-org-interaction-mode)
851+
(when jupyter-org-want-integration
852+
(add-hook 'org-mode-hook 'jupyter-org-interaction-mode))
847853

848854
;;; Constructing org syntax trees
849855

0 commit comments

Comments
 (0)