EIN module to work with Jupyter notebooks

This commit is contained in:
UndeadKernel 2018-04-11 12:31:33 +02:00
parent d7e054a8cc
commit ea7663d4ea
5 changed files with 108 additions and 0 deletions

View file

@ -0,0 +1,26 @@
;;; tools/ein/autoload.el -*- lexical-binding: t; -*-
;;;###autoload
(defun +ein/ace-link-ein ()
"Ace jump to links in ein notebooklist."
(interactive)
(let ((res (avy-with +ein/ace-link-ein
(avy--process
(+ein--collect-ein-buffer-links)
#'avy--overlay-pre))))
;(avy--style-fn avy-style)))))
(when (numberp res)
(goto-char (1+ res))
(widget-button-press (point)))))
;;;###autoload
(defun +ein--collect-ein-buffer-links ()
(interactive)
(let ((end (window-end))
points)
(save-excursion
(goto-char (window-start))
(while (re-search-forward "~?/.+\\|\s\\[" end t)
(push (+ (match-beginning 0) 1) points))
(nreverse points))))