Add to CAPF for code block completion when org-mode is enabled

This commit is contained in:
Nathaniel Nicandro 2018-09-30 22:49:20 -05:00
parent f0fe7ff5e8
commit 6e59813dc4

View file

@ -207,6 +207,12 @@ METADATA has the same meaning as in
(code (substring val 0 (1- (length val))))) (code (substring val 0 (1- (length val)))))
(list code (min (- (point) beg) (length code)))))) (list code (min (- (point) beg) (length code))))))
(defun jupyter-org-enable-completion ()
"Enable autocompletion in Jupyter source code blocks."
(add-hook 'completion-at-point-functions 'jupyter-completion-at-point nil t))
(add-hook 'org-mode-hook 'jupyter-org-enable-completion)
;;; Inserting results ;;; Inserting results
(defun jupyter-org-image-file-name (data ext) (defun jupyter-org-image-file-name (data ext)