From 23481e1d5145a42751b92bad6e905172613a8625 Mon Sep 17 00:00:00 2001 From: Nathaniel Nicandro Date: Thu, 14 Mar 2019 01:58:37 -0500 Subject: [PATCH] Add `jupyter-org-inspect-src-block` --- jupyter-org-extensions.el | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/jupyter-org-extensions.el b/jupyter-org-extensions.el index 4409294..88fc67e 100644 --- a/jupyter-org-extensions.el +++ b/jupyter-org-extensions.el @@ -140,6 +140,15 @@ With prefix arg NEW, always insert new cell." (while (and (org-babel-next-src-block) (< (point) p)) (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 (defun jupyter-org-restart-kernel-execute-block () "Restart the kernel of the source block where point is and execute it." @@ -417,7 +426,7 @@ _S-M-_: Restart/buffer ^ ^ _m_: merge ("L" jupyter-org-clear-all-results) ("h" jupyter-org-edit-header) - ("/" jupyter-inspect-at-point))) + ("/" jupyter-org-inspect-src-block))) (call-interactively #'jupyter-org-hydra/body)) (define-key jupyter-org-interaction-mode-map (kbd "C-c h") #'jupyter-org-hydra/body)