File tree Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -136,6 +136,11 @@ See also the docstring of `org-image-actual-width' for more details."
136136 :group 'ob-jupyter
137137 :type 'boolean )
138138
139+ (defcustom jupyter-org-want-keybinding t
140+ " Whether to enable contextual keybindings."
141+ :group 'ob-jupyter
142+ :type 'boolean )
143+
139144(defconst jupyter-org-mime-types '(:text/org
140145 ; ; Prioritize images over html
141146 :image/svg+xml :image/jpeg :image/png
@@ -823,12 +828,13 @@ and they only take effect when the variable
823828 #'undefined
824829 (jupyter-org--define-key-filter key))))))))
825830
826- (jupyter-org-define-key (kbd " C-x C-e" ) #'jupyter-eval-line-or-region )
827- (jupyter-org-define-key (kbd " C-M-x" ) #'jupyter-eval-defun )
828- (jupyter-org-define-key (kbd " M-i" ) #'jupyter-inspect-at-point )
829- (jupyter-org-define-key (kbd " C-c M-:" ) #'jupyter-eval-string-command )
830- (jupyter-org-define-key (kbd " C-c C-r" ) #'jupyter-repl-restart-kernel )
831- (jupyter-org-define-key (kbd " C-c C-i" ) #'jupyter-repl-interrupt-kernel )
831+ (when jupyter-org-want-keybinding
832+ (jupyter-org-define-key (kbd " C-x C-e" ) #'jupyter-eval-line-or-region )
833+ (jupyter-org-define-key (kbd " C-M-x" ) #'jupyter-eval-defun )
834+ (jupyter-org-define-key (kbd " M-i" ) #'jupyter-inspect-at-point )
835+ (jupyter-org-define-key (kbd " C-c M-:" ) #'jupyter-eval-string-command )
836+ (jupyter-org-define-key (kbd " C-c C-r" ) #'jupyter-repl-restart-kernel )
837+ (jupyter-org-define-key (kbd " C-c C-i" ) #'jupyter-repl-interrupt-kernel ))
832838
833839; ;; Handling ANSI escapes in kernel output
834840
You can’t perform that action at this time.
0 commit comments