Add jupyter-org-inspect-src-block

This commit is contained in:
Nathaniel Nicandro 2019-03-14 01:58:37 -05:00
parent d065b2f25c
commit 23481e1d51
No known key found for this signature in database
GPG key ID: C34814B309DD06B8

View file

@ -140,6 +140,15 @@ With prefix arg NEW, always insert new cell."
(while (and (org-babel-next-src-block) (< (point) p)) (while (and (org-babel-next-src-block) (< (point) p))
(org-babel-execute-src-block))))) (org-babel-execute-src-block)))))
;;;###autoload
(defun jupyter-org-inspect-src-block ()
"Inspect the symbol under point when in a source block."
(interactive)
(unless (jupyter-org-with-src-block-client
(jupyter-inspect-at-point)
t)
(error "Not in a source block")))
;;;###autoload ;;;###autoload
(defun jupyter-org-restart-kernel-execute-block () (defun jupyter-org-restart-kernel-execute-block ()
"Restart the kernel of the source block where point is and execute it." "Restart the kernel of the source block where point is and execute it."
@ -417,7 +426,7 @@ _S-M-<return>_: Restart/buffer ^ ^ _m_: merge
("L" jupyter-org-clear-all-results) ("L" jupyter-org-clear-all-results)
("h" jupyter-org-edit-header) ("h" jupyter-org-edit-header)
("/" jupyter-inspect-at-point))) ("/" jupyter-org-inspect-src-block)))
(call-interactively #'jupyter-org-hydra/body)) (call-interactively #'jupyter-org-hydra/body))
(define-key jupyter-org-interaction-mode-map (kbd "C-c h") #'jupyter-org-hydra/body) (define-key jupyter-org-interaction-mode-map (kbd "C-c h") #'jupyter-org-hydra/body)