EIN module to work with Jupyter notebooks
This commit is contained in:
parent
d7e054a8cc
commit
ea7663d4ea
5 changed files with 108 additions and 0 deletions
26
modules/tools/ein/autoload.el
Normal file
26
modules/tools/ein/autoload.el
Normal 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))))
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue