From ef1cecce0104a07577ee71d220065e9b09c2c5e5 Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Mon, 14 Oct 2019 22:00:29 -0500 Subject: [PATCH] Add a way to start an EIN Jupyter server from Spacemacs's UI --- CHANGELOG.develop | 2 ++ layers/+lang/ipython-notebook/README.org | 3 ++- layers/+lang/ipython-notebook/packages.el | 6 ++++-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.develop b/CHANGELOG.develop index 7aea39e3d..91d7605ab 100644 --- a/CHANGELOG.develop +++ b/CHANGELOG.develop @@ -1795,6 +1795,8 @@ Other: - ~~ (execute cell) and ~~ (execute cell and go to next) also in hybrid mode (thanks to Jaakko Luttinen) - Remove spurious key binding (thanks to Carlos Andrés Rocha) + - Added ~SPC a y r~ =ein:run= (thanks to Zach Pearson) + - Added ~SPC a y s~ =ein:stop= (thanks to Zach Pearson) **** Ivy - Added =recentf= alt actions to refresh and delete items (thanks to Rich Alesi) - Added =projectile= alternate actions to invalidate cache (thanks to Rich Alesi) diff --git a/layers/+lang/ipython-notebook/README.org b/layers/+lang/ipython-notebook/README.org index c9002b942..7cb721312 100644 --- a/layers/+lang/ipython-notebook/README.org +++ b/layers/+lang/ipython-notebook/README.org @@ -69,7 +69,8 @@ Have an IPython notebook running * Using the IPython notebook ** Open Notebook List This layer is lazy loaded so the transient-state will only work after you summon the -command =ein:notebooklist-open= which is bound to ~SPC a y o~ +command =ein:notebooklist-open= which is bound to ~SPC a y o~ or =ein:run= which is +bound to ~SPC a y r~. ** Key bindings The key bindings can be used through a transient state or the usual evil-leader. diff --git a/layers/+lang/ipython-notebook/packages.el b/layers/+lang/ipython-notebook/packages.el index 8f71e031b..43385cd72 100644 --- a/layers/+lang/ipython-notebook/packages.el +++ b/layers/+lang/ipython-notebook/packages.el @@ -24,12 +24,14 @@ (defun ipython-notebook/init-ein () (use-package ein :defer t - :commands (ein:notebooklist-open ein:notebooklist-login) + :commands (ein:notebooklist-open ein:notebooklist-login ein:run ein:stop) :init (progn (spacemacs/set-leader-keys "ayl" 'ein:notebooklist-login - "ayo" 'ein:notebooklist-open) + "ayo" 'ein:notebooklist-open + "ayr" 'ein:run + "ays" 'ein:stop) (spacemacs/declare-prefix "ay" "ipython notebook") (with-eval-after-load 'ein-notebooklist (evilified-state-evilify-map ein:notebooklist-mode-map