Commit graph

785 commits

Author SHA1 Message Date
John Miller
29e1d7e077 Experiment with comint.
Doing as a first step towards integration with gud...
2015-04-06 13:34:42 -05:00
John Miller
33522fcb8d Separate ipdb buffer, basic command loop. 2015-04-06 07:23:09 -05:00
John Miller
faaa578807 Basic support for ipdb sessions.
Similar to support in web interface; interaction with debugger is sent
to cell output. We can do better.
2015-03-31 17:26:00 -05:00
John Miller
1c73f2b016 Support stdin input_request for password 2015-03-31 16:55:14 -05:00
John Miller
10154bfa9e Actually update zeroein.el.
Sigh.
2015-03-26 13:13:49 -05:00
John Miller
2eeae04a03 Fix issue #35
Get ein:junk-new working again under IPython 2.x.

Some non-related work on fixing `ein:pytools-export-buffer`. Not quite
there yet, but I have an idea of what is going on.
2015-03-25 09:52:16 -05:00
John Miller
7a43f34dc9 FIX: pytools-jump-to-source
Was not working in IPython 3.0 thanks to changes in the messaging spec.
2015-03-21 21:57:04 -05:00
John Miller
d2232a9814 Merge pull request #34 from smoofra/traceback
Traceback
2015-03-21 21:01:44 -05:00
Lawrence D'Anna
7581aa33ac bugfix: make \C-c \C-x (ein:tb-show) work
ein:tb-show wasn't working because tracebacks were being stored in "error"
messages, and it was looking for them in "pyerr" messages.
2015-03-20 19:03:51 -07:00
Lawrence D'Anna
dffd45e383 bugfix: don't print the same traceback twice
When there is a python error, we actually get two identical tracebacks back
from the kernel, one from the "shell" channel, and one from the "iopub"
channel.  As a workaround, we remember the cell's traceback and ignore
traceback outputs that are identical to the one we already have.
2015-03-20 19:03:51 -07:00
John Miller
0328ee70aa Fix silly typo.
It was silly.
2015-03-18 14:09:44 -05:00
John Miller
f41549cd2e Fix `KeyError: 'detail_level' with IPython 3.0
Some more problems with inspect_request messages that I thought I fixed
in earlier commits.

Also some typo fixin' and link correctin'.
2015-03-17 20:41:31 -05:00
John Miller
68e14af9ea Object info for IPython 3.0
After many attempts ein now supports getting object information in
IPython 3.0 just like in the good ole days in IPython 2.x.
2015-03-11 17:02:25 -05:00
John Miller
3c1131a558 Save error outputs in IPython 3.0.
Also less verbose messaging when saving nbformat 4 notebooks.
2015-03-01 12:37:22 -06:00
John Miller
df72c1df12 Fix error reporting in IPython 3.0
Protocol for error reporting has changed in IPython 3.0 messaging and
ein was missing error messages.

EIN was also saving "*" for the notebook execution count and per
nbformat v4 execute_count can only be null or a number.
2015-02-25 14:55:09 -06:00
John Miller
28a0c53bc6 Factor out ein-mumamo. Documentaiton update.
Compiling ein when nxhtml is not installed causes an error when
compiling ein-mumamo.el. Since it seems unreasonable to force mumamo as
a dependency (it is not in MELPA) better to move mumamo support to its
own, optional package.

Also some long overdue upates to documentation.
2015-02-21 19:07:34 -06:00
John Miller
7c251fbd5c Fix locked ein-contents-api
Fixes issues #27. I hope.
2015-02-21 17:50:20 -06:00
John Miller
9774ab910f Fixing misnamed variable. 2015-02-16 21:54:21 -06:00
John Miller
c1ce100f31 Renaming notebooks works again in IPython 2.x
As an added bonus you should be able to move notebooks to different
directories in the notebook hierarchy. Not tested, though, so I'm not
sure how well that works.
2015-02-16 21:14:47 -06:00
John Miller
ff415f3ebc Unbreaking ein:notebook-rename-command 2015-02-16 13:06:35 -06:00
John Miller
ec537398d1 New feature ein:pytools-export-buffer
Export contents of notebook using nbconvert_ to user-specified format
\(options will depend on the version of nbconvert available\) to a new
buffer.

Currently EIN/IPython supports exporting to the following formats:

- HTML
- JSON (this is basically the sames opening the ipynb file in a buffer).
- Latex
- Markdown
- Python
- RST
- Slides

.. _nbconvert:
http://ipython.org/ipython-doc/stable/notebook/nbconvert.html

Also making ein.py compatible with IPython 3.
2015-02-16 11:28:35 -06:00
John Miller
f711a83d42 Fixing up some typos. 2015-02-15 11:34:50 -06:00
millejoh
da56452155 More bugfixes for markdown cells that don't secretly yearn for heading-ness. 2015-02-15 09:57:25 -06:00
millejoh
9bfbf5544c Fix bug in heading detection code. 2015-02-15 09:31:23 -06:00
millejoh
d52cc9a662 Restore heading level cells to nbformat4 notebooks. 2015-02-15 09:27:18 -06:00
millejoh
e3623a373e Handle nbformat4 notebookes with markdown cells that secretly desire to be heading cells. 2015-02-15 09:23:33 -06:00
John Miller
f8a82b8e24 Correctly determine path for 2.x notebooks
Found another corner cases for IPython 2.x.
2015-02-12 12:10:56 -06:00
John Miller
bc3e2ffdc6 Cleaning up calls to ein:notebooklist-open
Syncronizing API update for opening notebooks across various calls in
ein-notebooklist.
2015-02-12 09:20:34 -06:00
John Miller
098dddd3e9 Regain IPython 2.x compatibility I
Notebooks now save in IPython 2.x and 3.x.
2015-02-12 08:45:29 -06:00
John Miller
8836cf6152 Bug in notebooklist-render
Now correctly detects when a notebook is open and kernel running.
2015-02-10 14:56:41 -06:00
John Miller
f71676ac88 Refactoring notebook management
Work in progress.

Lots and lots of changes trying to clean up code so there are not so
many checks of IPython version. Also a significant amount of refactoring
all notebook server requests code to ein-contents-api.

Also moving away from notebook-id concept; instead use notebook path to
uniquely identify notebooks/content.

Made `ein:query-ipython-version` more efficient by caching results.
2015-02-10 14:53:08 -06:00
John Miller
66db53333b Generic query contents for IPython 2.x and beyond
Renamed `ein:content-list-contents` to reflect it's more generic
function.

Added support fro content querying of IPython 2.x notebook servers.
2015-02-09 13:27:20 -06:00
John Miller
40646b75ae Merge remote-tracking branch 'origin/fix-travis' into deferred-dev 2015-02-09 06:50:06 -06:00
millejoh
84f478aed6 Improving ipython 3 support in testein.py. Lots of fixes for notebook tests to
properly test nbformat 3 notebooks.
2015-02-02 13:20:24 -06:00
John Miller
0796ed2dce Fix typos
Never can remember the names of the keywords for request.
2015-01-31 10:32:52 -06:00
John Miller
c30bad19a5 Content renaming
Call ein:content-rename to rename a content object in ein and at the
Jupyter server.
2015-01-31 10:31:20 -06:00
John Miller
55be1cbf26 Refactoring support for contents API
Start of a refactor of code for accessing Jupyter's new contents API.
First up an implementation of list contents.

New function for flattening lists borrowed from cl-alexandria (how did
we survive withoutthis in the before times?)

Updating author list here and there.
2015-01-31 10:13:49 -06:00
millejoh
c0a3a7d1e0 Be more specific when creating a new notebook.
When creating a new notebook pass some additional json so IPython
knows we want to create a notebook, and not a file or directory (this
was causing problems with IPython-dev).
2015-01-16 22:01:54 -06:00
John Miller
7b57db59bd Fix execute_reply payload processing in IPython 3.0
The message format for execute_reply payloads has changed. Seems the API
for this is still not finalized, but at least the pager works when I do
things like `object_name?`.
2015-01-14 18:36:59 -06:00
John Miller
b1f4c017e7 Support single websocket with multiple channels
With IPython 3.0 we now support multiplexed communication over a single
websocket. At the moment iopub and shell are supported; stdin doesn't
seem to be working yet (not sure if it needs to be, though).
2015-01-14 17:07:28 -06:00
John Miller
e5728799ef Merge remote-tracking branch 'origin/nbformat4' 2015-01-13 06:48:28 -06:00
John Miller
c1ba0efc11 Notebooklist auto-reload hack
Auto-reload notebooklist after opening a notebook or stopping a kernel.
Feels hacky using run-at-time, especially with a constant time (3
seconds).
2015-01-13 06:40:15 -06:00
John Miller
26f1696c6b Revert "Autoupdate notebooklist buffer on open or stop"
This reverts commit 90c26ad16d.
2015-01-09 10:27:45 -06:00
John Miller
90c26ad16d Autoupdate notebooklist buffer on open or stop
Call `(ein:notebooklist-reload)` to automatically refresh the
notebooklist buffer when a notebook is opened or stopped so those
helpful [Stop] widgets appear and disappear as needed.
2015-01-09 10:22:35 -06:00
John Miller
9637ea7317 Fix null metadata
ein was incorrectly writing empty metadata as a Null object, which was
causing errors in ipython.

Added a helper function to write json encoding of a notebook to a
temporary buffer to help debug code for encoding nbformat4 json from
cell data.
2015-01-09 10:00:22 -06:00
millejoh
3c3033ed9a Merge branch 'master' of https://github.com/millejoh/emacs-ipython-notebook 2014-12-26 13:48:32 -06:00
millejoh
8510111b5d Remove auto-complete as required dependency.
As the documentation says, auto-complete is optional.
2014-12-26 13:46:31 -06:00
John Miller
547f50fd52 Stop/kill notebooks from the notebooklist
The notebooklist buffer will give option of "stopping" running kernels,
similar to feature in the browser UI. In EIN stopping a kernel also
means kill the buffer the kernel is connected to.
2014-12-19 16:24:59 -06:00
John Miller
fac3637034 Updating package commentary, grammar.
So the MELPA package info is a bit more, well, informative.
2014-12-17 08:19:51 -06:00
John Miller
cbf4938d76 Make ein:query-ipython-version less whiny.
Calling ein:query-ipython-version with IPython 2.x running will result
in a request error since the api REST url is not implemented. Getting a
404 response is inevitable unless the IPython devs backport the api URL,
but I can make ein complain less when this happens.
2014-12-16 14:26:51 -06:00