File tree Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -123,6 +123,11 @@ See also the docstring of `org-image-actual-width' for more details."
123123 :group 'ob-jupyter
124124 :type 'boolean )
125125
126+ (defcustom jupyter-org-want-keybinding t
127+ " Whether to enable contextual keybindings."
128+ :group 'ob-jupyter
129+ :type 'boolean )
130+
126131(defconst jupyter-org-mime-types '(:text/org
127132 ; ; Prioritize images over html
128133 :image/svg+xml :image/jpeg :image/png
@@ -722,11 +727,12 @@ and they only take effect when the variable
722727 #'undefined
723728 (jupyter-org--define-key-filter key))))))))
724729
725- (jupyter-org-define-key (kbd " C-x C-e" ) #'jupyter-eval-line-or-region )
726- (jupyter-org-define-key (kbd " C-M-x" ) #'jupyter-eval-defun )
727- (jupyter-org-define-key (kbd " M-i" ) #'jupyter-inspect-at-point )
728- (jupyter-org-define-key (kbd " C-c C-r" ) #'jupyter-repl-restart-kernel )
729- (jupyter-org-define-key (kbd " C-c C-i" ) #'jupyter-repl-interrupt-kernel )
730+ (when jupyter-org-want-keybinding
731+ (jupyter-org-define-key (kbd " C-x C-e" ) #'jupyter-eval-line-or-region )
732+ (jupyter-org-define-key (kbd " C-M-x" ) #'jupyter-eval-defun )
733+ (jupyter-org-define-key (kbd " M-i" ) #'jupyter-inspect-at-point )
734+ (jupyter-org-define-key (kbd " C-c C-r" ) #'jupyter-repl-restart-kernel )
735+ (jupyter-org-define-key (kbd " C-c C-i" ) #'jupyter-repl-interrupt-kernel ))
730736
731737; ;; Handling ANSI escapes in kernel output
732738
You can’t perform that action at this time.
0 commit comments