mirror of
https://github.com/vale981/emacs-ipython-notebook
synced 2025-03-05 09:01:40 -05:00
Update documentation, bumpb version.
This commit is contained in:
parent
684ccbede4
commit
8e3764044c
6 changed files with 66 additions and 9 deletions
|
@ -51,9 +51,9 @@ copyright = u'2015, John Miller'
|
|||
# built documents.
|
||||
#
|
||||
# The short X.Y version.
|
||||
version = '0.11'
|
||||
version = '0.12'
|
||||
# The full version, including alpha/beta/rc tags.
|
||||
release = '0.11'
|
||||
release = '0.12.0'
|
||||
|
||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||
# for a list of supported languages.
|
||||
|
|
|
@ -247,7 +247,13 @@ port or URL of the IPython notebook server.
|
|||
Notebook
|
||||
^^^^^^^^
|
||||
|
||||
The following keybinds are available in notebook buffers.
|
||||
The following keybinds are available in notebook buffers. Modified notebooks are
|
||||
saved automatically with a frequency dependenant on the setting of
|
||||
`ein:notebook-autosave-frequency`. If `ein:notebook-create-checkpoint-on-save`
|
||||
is True than a checkpoint will also be generated in the Jupyter server every
|
||||
time the notebook is saved. A notebook can be returned to a previous checkpoint
|
||||
via `ein:notebook-restore-to-checkpoint`. Checkpoints can also be manually
|
||||
created via `ein:notebook-create-checkpoint`.
|
||||
|
||||
.. el:keymap:: ein:notebook-mode-map
|
||||
:replace: s/C-c TAB/C-c C-i/
|
||||
|
@ -263,6 +269,24 @@ The following keybinds are available in notebook buffers.
|
|||
.. el:function:: ein:notebook-enable-autosaves
|
||||
.. el:function:: ein:notebook-disable-autosaves
|
||||
|
||||
Advanced Editing
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
Worksheet cells can be edited in a manner similar to `source blocks`_ in Org
|
||||
buffers. Use ``C-c '`` to edit the contents of the current cell. You can execute
|
||||
the contents of the buffer and the results will be sent to the output of the
|
||||
cell being edited.
|
||||
|
||||
.. el:keymap:: ein:edit-cell-mode-map
|
||||
|
||||
.. el:function:: ein:edit-cell-contents
|
||||
.. el:function:: ein:edit-cell-exit
|
||||
.. el:function:: ein:edit-cell-abort
|
||||
.. el:function:: ein:edit-cell-save
|
||||
.. el:function:: ein:edit-cell-save-and-execute
|
||||
|
||||
.. _`source blocks`: http://orgmode.org/manual/Editing-source-code.html#Editing-source-code
|
||||
|
||||
Connected buffer
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
|
@ -327,7 +351,22 @@ Misc
|
|||
Org-mode integration
|
||||
--------------------
|
||||
|
||||
You can link to IPython notebook from org-mode_ files.
|
||||
You can execute org source blocks in EIN by adding `ein` to
|
||||
`org:babel-load-languages`. You need to specify a notebook via the :session
|
||||
argument. The format for the session argument is
|
||||
`{url-or-port}/{path-to-notbooke}`. For example:
|
||||
|
||||
.. code:: python
|
||||
|
||||
#+BEGIN_SRC ein :session 8888/Untitled.ipynb
|
||||
import sys
|
||||
|
||||
a = 14500
|
||||
b = a+1000
|
||||
sys.version
|
||||
#+END_SRC
|
||||
|
||||
You can also link to IPython notebook from org-mode_ files.
|
||||
|
||||
1. Call org-mode function :el:symbol:`org-store-link`
|
||||
[#org-store-link]_ in notebook buffer. You can select a region to
|
||||
|
@ -568,6 +607,12 @@ everything the log buffer. You can reset the patch and log level with
|
|||
Change Log
|
||||
==========
|
||||
|
||||
v0.12.0
|
||||
-------
|
||||
|
||||
* Cell edit buffers ala org source block edit buffers.
|
||||
* Better integration with org source blocks.
|
||||
|
||||
v0.11.0
|
||||
-------
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
(let ((map (make-sparse-keymap)))
|
||||
(define-key map "\C-c'" 'ein:edit-cell-exit)
|
||||
(define-key map "\C-c\C-k" 'ein:edit-cell-abort)
|
||||
(define-key map "\C-c\C-c" 'ein:edit-cell-execute)
|
||||
(define-key map "\C-c\C-c" 'ein:edit-cell-save-and-execute)
|
||||
(define-key map "\C-x\C-s" 'ein:edit-cell-save)
|
||||
map))
|
||||
|
||||
|
@ -86,7 +86,9 @@ or abort with \\[ein:edit-cell-abort]"))
|
|||
(setq write-contents-functions '(ein:edit-cell-save)))
|
||||
(setq buffer-read-only t))))
|
||||
|
||||
(defun ein:edit-cell-execute ()
|
||||
(defun ein:edit-cell-save-and-execute ()
|
||||
"Save, then execute the countents of the EIN source edit buffer
|
||||
and place results (if any) in output of original notebook cell."
|
||||
(interactive)
|
||||
(ein:edit-cell-save)
|
||||
(ein:cell-execute-internal ein:src--cell
|
||||
|
@ -95,6 +97,8 @@ or abort with \\[ein:edit-cell-abort]"))
|
|||
:silent nil))
|
||||
|
||||
(defun ein:edit-cell-save ()
|
||||
"Save contents of EIN source edit buffer back to original notebook
|
||||
cell."
|
||||
(interactive)
|
||||
(set-buffer-modified-p nil)
|
||||
(let ((edited-code (buffer-string)))
|
||||
|
@ -102,6 +106,9 @@ or abort with \\[ein:edit-cell-abort]"))
|
|||
(ein:worksheet-render ein:src--ws)))
|
||||
|
||||
(defun ein:edit-cell-exit ()
|
||||
"Close the EIN source edit buffer, saving contents back to the
|
||||
original notebook cell, unless being called via
|
||||
`ein:edit-cell-abort'."
|
||||
(interactive)
|
||||
(let ((edit-buffer (current-buffer))
|
||||
(ws ein:src--ws))
|
||||
|
@ -113,6 +120,8 @@ or abort with \\[ein:edit-cell-abort]"))
|
|||
))
|
||||
|
||||
(defun ein:edit-cell-abort ()
|
||||
"Abort editing the current cell, contents will revert to
|
||||
previous value."
|
||||
(interactive)
|
||||
(let (ein:src--allow-write-back) (ein:edit-cell-exit)))
|
||||
|
||||
|
@ -124,6 +133,9 @@ or abort with \\[ein:edit-cell-abort]"))
|
|||
(t 'python)))
|
||||
|
||||
(defun ein:edit-cell-contents ()
|
||||
"Edit the contents of the current cell in a buffer using an
|
||||
appropriate language major mode. Functionality is very similar to
|
||||
`org-edit-special'."
|
||||
(interactive)
|
||||
(let* ((cell (or (ein:worksheet-get-current-cell)
|
||||
(error "Must be called from inside an EIN worksheet cell.")))
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
:group 'applications
|
||||
:prefix "ein:")
|
||||
|
||||
(defvar ein:version "0.11.0"
|
||||
(defvar ein:version "0.12.0"
|
||||
"Version number for Emacs IPython Notebook (EIN).")
|
||||
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
(define-package "ein"
|
||||
"0.10.1"
|
||||
"0.12.0"
|
||||
"Emacs IPython Notebook"
|
||||
'((websocket "1.5")
|
||||
(request "0.2")
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
;; Author: John Miller <millejoh at millejoh.com>, Takafumi Arakaki <aka.tkf at gmail.com>
|
||||
;; URL: http://millejoh.github.io/emacs-ipython-notebook/
|
||||
;; Keywords: applications, tools
|
||||
;; Version: 0.11.0
|
||||
;; Version: 0.12.0
|
||||
|
||||
;; This file is NOT part of GNU Emacs.
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue