2019-01-03 01:39:23 -05:00
|
|
|
#+TITLE: tools/ein
|
|
|
|
#+DATE: April 11, 2018
|
|
|
|
#+SINCE: v2.0
|
|
|
|
#+STARTUP: inlineimages
|
2018-04-11 12:31:33 +02:00
|
|
|
|
|
|
|
* Table of Contents :TOC:
|
2019-10-07 17:09:52 -04:00
|
|
|
- [[#description][Description]]
|
|
|
|
- [[#module-flags][Module Flags]]
|
|
|
|
- [[#plugins][Plugins]]
|
|
|
|
- [[#prerequisites][Prerequisites]]
|
|
|
|
- [[#features][Features]]
|
|
|
|
- [[#interaction-with-a-jupyter-server][Interaction with a Jupyter server]]
|
|
|
|
- [[#configuration][Configuration]]
|
|
|
|
- [[#setting-the-default-location-of-your-notebooks][Setting the default location of your notebooks]]
|
|
|
|
- [[#using-hydra][Using hydra]]
|
2019-01-03 01:39:23 -05:00
|
|
|
|
|
|
|
* Description
|
|
|
|
Adds Jupyter notebook integration into emacs.
|
|
|
|
|
|
|
|
** Module Flags
|
|
|
|
This module provides no flags.
|
2018-04-11 12:31:33 +02:00
|
|
|
|
2019-01-03 01:39:23 -05:00
|
|
|
** Plugins
|
|
|
|
+ [[https://github.com/millejoh/emacs-ipython-notebook][ein]]
|
2018-04-11 12:31:33 +02:00
|
|
|
|
2019-01-03 01:39:23 -05:00
|
|
|
* Prerequisites
|
|
|
|
This module has no prereqisites.
|
|
|
|
|
|
|
|
* Features
|
|
|
|
** Interaction with a Jupyter server
|
2018-04-11 12:31:33 +02:00
|
|
|
Three functions are available to start EIN:
|
2019-01-03 01:39:23 -05:00
|
|
|
|
2018-04-11 12:31:33 +02:00
|
|
|
1. ~ein:jupyter-server-start~ --- Start a jupyter server within emacs
|
|
|
|
2. ~ein:notebooklist-login~ --- Login to an existing jupyter server
|
|
|
|
3. ~ein:notebooklist-open~ --- Open the list of jupyter notebooks
|
|
|
|
|
|
|
|
These functions do not have default key bindings.
|
|
|
|
|
|
|
|
When ~ein:jupyter-server-start~ is called, after successfully finishing,
|
|
|
|
~ein:notebooklist-login~ and ~ein:notebooklist-open~ will be automatically
|
|
|
|
called.
|
|
|
|
|
2019-01-03 01:39:23 -05:00
|
|
|
When in the ~Notebook List~ buffer, the key =o= calls ~ace-link~ to speed up the
|
2018-04-11 12:31:33 +02:00
|
|
|
process of selecting links in the buffer.
|
|
|
|
|
2019-01-03 01:39:23 -05:00
|
|
|
If ~company-mode~ is enabled as a module, ~company-ein~ will handle completion.
|
2018-04-11 12:31:33 +02:00
|
|
|
|
|
|
|
* Configuration
|
2019-01-03 01:39:23 -05:00
|
|
|
** Setting the default location of your notebooks
|
|
|
|
Change ~+ein-notebook-dir~ to tell ein where to find your Jupityr notebooks.
|
2018-04-11 12:31:33 +02:00
|
|
|
|
2019-01-03 01:39:23 -05:00
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
(setq +ein-notebook-dir "~/my-notebooks")
|
|
|
|
#+END_SRC
|
2019-02-25 14:35:56 +00:00
|
|
|
|
|
|
|
** Using hydra
|
2019-07-22 22:49:27 +02:00
|
|
|
This module provides a batteries-included hydra - ~+ein/hydra~ - to make using ein
|
2019-02-25 14:35:56 +00:00
|
|
|
easier. Things like navigating between cells, workbook management etc, are greatly
|
|
|
|
simplified and are easily accessible. However, by default, it's not bound to any key.
|
|
|
|
Here's an example of how to bind it:
|
|
|
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
2019-05-30 13:21:19 -04:00
|
|
|
(map! :map ein:notebook-mode-map
|
|
|
|
:localleader
|
2019-07-22 22:49:27 +02:00
|
|
|
"," #'+ein/hydra/body)
|
2019-02-25 14:35:56 +00:00
|
|
|
#+END_SRC
|
|
|
|
|