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."
136
136
:group 'ob-jupyter
137
137
:type 'boolean )
138
138
139
+ (defcustom jupyter-org-want-keybinding t
140
+ " Whether to enable contextual keybindings."
141
+ :group 'ob-jupyter
142
+ :type 'boolean )
143
+
139
144
(defconst jupyter-org-mime-types '(:text/org
140
145
; ; Prioritize images over html
141
146
:image/svg+xml :image/jpeg :image/png
@@ -823,12 +828,13 @@ and they only take effect when the variable
823
828
#'undefined
824
829
(jupyter-org--define-key-filter key))))))))
825
830
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 ))
832
838
833
839
; ;; Handling ANSI escapes in kernel output
834
840
You can’t perform that action at this time.
0 commit comments