Commit graph

85 commits

Author SHA1 Message Date
Sam Steingold
fa18077e28 bind goal-column to nil around ewoc-goto-node to fix issue#146 2016-12-18 13:10:25 -05:00
John Miller
d85717bd24 Ensure inserted images are non-whitespace characters.
This is intended to fix #149.
2016-12-14 13:02:21 -06:00
John Miller
f07b5ad7f0 execute_result is the new pyout
Caught one! "pyout" messages are now called "execute_result", so we
should act accordingly. Before "execute_result" was being treated as
"display_data".
2016-09-30 13:26:54 -05:00
John Miller
812757fcc3 Revert "Basic javascript support via skewer.el"
This reverts commit 9e39797ce7.
2016-09-03 18:10:07 -05:00
John Miller
9e39797ce7 Basic javascript support via skewer.el
EIN will try to use skewer to execute javascript cells, which works for
the most part. Those hoping to have widgest or something like d3 working
are going to be disappointed, however, as at its heart ein is not an
HTML page and those packages depend on modifying the DOM of the notebook
web page.

It remains to be seen if those issues are surmountable, but for the
moment this functionality will live in this branch and this branch
alone.
2016-09-03 18:01:57 -05:00
John Miller
04c12f8ab2 Update version, documentation, formatting.
Version bump to 0.9, documentation for new slide functions and
correcting formatting from recent pull requests.
2016-07-23 08:32:22 -05:00
John Miller
3e1baa0657 Toggle viewing of slide metadata in worksheet.
Let the user control whether or not to view slide attributes in current
worksheet via `ein:worksheet-toggle-slideshow-view` (C-c S).

Also added a couple more slide attributes (fragment, notes) as
these appear to be support in current Jupyter version.
2016-07-20 12:50:04 -05:00
Guillaume Anciaux
d7d65f6ac8
fix the default slide and fix a problem at creation of new cells 2016-07-19 17:21:38 +02:00
Guillaume Anciaux
62c0c21d28
cleaning some debug messages 2016-07-19 10:46:50 +02:00
Guillaume Anciaux
1c549e72d7
addîng the slide info in prompt and allow switch slide type with C-c C-d 2016-07-19 10:37:00 +02:00
John Miller
43471c771d Better pretty printing defaults.
Make text output the last option when pretty printing is enabled
(eg when ein:output-type-preference is set to
ein:output-type-prefer-pretty-text-over-html). This will at least make
%%latex cells output the latex inside. Next step - automatically typeset
the math!
2016-04-15 13:16:05 -05:00
John Miller
3aa290ed91 Fix breadcrumbs in notebook list.
Seems like a regression, but I'm not 100% sure on that.

Update metadata name (add ein qualifier) per Jupyter documentation
guidance.
2015-09-14 13:16:49 -05:00
John Miller
efaba65cfe Fixing issue #70
Not sure if this completely address issue raised in #70; will need to confirm what expected behavior should be.
2015-08-26 20:45:09 -05:00
John Miller
710ccaace2 Fix potential issues saving Latex Output
Sometimes ein will not save latex output properly. This is an attempt to
avoid that situation.

Also some updates to gitignore.
2015-06-30 16:25:50 -05:00
Max H. Gerlach
efec1b50f1 new function ein:cell-goto-line.
This is a simple modification of ein:cell-goto to jump to a certain
line instead of a certain character.
2015-05-26 15:55:08 +02:00
John Miller
8e72876ae8 Fix for worksheet tag, clean up some comments. 2015-05-15 18:28:13 -05:00
John Miller
5886498684 Add worksheet tags to nbformat 4 notebooks
NBformat 4 has a tag key in the cell metadata. We use it to tag a cell
depending on which worksheet it is in. For now the code does nothing
else with this tag, but the goal is to reimplement multiple worksheets
in ein.
2015-05-14 09:39:47 -05:00
John Miller
91a9404748 Merge remote-tracking branch 'origin/master' into index-polymode 2015-05-04 10:55:38 -05:00
John Miller
fd6711c4e0 Quick fix for issue #43
This fixes the invalid json error, but behavior still leaves a bit to be
desired. EIN will save pretty text over html, which may be unexpected
behavior for some.
2015-05-03 09:31:30 -05:00
John Miller
ac53106194 Setup and documentation
Some test code and some exploratory writing (see Enhancements.org) to
get my head on straight.
2015-05-03 00:14:38 -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
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
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
e3623a373e Handle nbformat4 notebookes with markdown cells that secretly desire to be heading cells. 2015-02-15 09:23:33 -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
b83621299e Fixing :prompt_number property on saving.
More conditional code for saving notebooks in nbformat v4.0.
`prompt_number` is no longer a valid property so it has to be corrected
to be `execution_count` instead.
2014-11-20 12:36:24 -06:00
John Miller
f3ce2fc66b Missed condition to save display_data
Some additional conditional code to save images embedded in notebooks
using nbformat v4.
2014-11-14 14:49:37 -06:00
John Miller
228d97f397 Fixing nasty mismatch in saved notebook v4 format
There is a nasty mismatch between internal representation of cell
outputs in ein and for cell outputs in notebook v4.

The current solution is less than elegant, but seems to work. Need more
testing!
2014-11-13 21:36:43 -06:00
John Miller
7c7d532609 Reading and saving images in v4 notebooks.
Rock on.
2014-11-12 18:11:08 -06:00
John Miller
9182acc258 NBFormat v4 Tweaks, fixing rename-notebook
Renaming notebooks should work a bit better now, tweaked code for saving
nbformat v4 to correctly include execution_count parameter even if cell
has not been executed.

Cleaned up some silliness in ein:query-singleton-ajax.
2014-11-11 11:33:14 -06:00
John Miller
5112873f7c Bug in saved v4 notebook format
Wasn't generating correct format for output elements in code_cells.
2014-11-10 09:36:44 -06:00
John Miller
849adda708 Support for nbformat v4
BEWARE! This is a large commit and the code here is still mostly
untested. Back up your notebooks before giving this changeset a try with
the current IPython-dev version.

Given that, ein is now able to open and save basic notebooks saved in
nbformat 4. Still haven't tested more complex notebooks with embedded
images.
2014-11-07 19:28:09 -06:00
John Miller
59072658aa IPython 3.0 Support
Maybe, just maybe ein now works under both IPython 2.x and IPython 3.0
(or what is the development version as of this commit). And by works I
mean open, closing, saving notebooks and communicating with the IPython
kernel. It is good.

Also fixed a bug in kernelinfo - os.uname is not implemented in Windows
(or mac, probably), but I think socket.gethostname() is available on all
three platforms.
2014-10-22 21:35:20 -05:00
John Miller
20a725012b Preliminary support for IPython 2.0
Basic, mostly untested support for the brave new world of IPython 2.0.
2.0 now supports the concepts of 'paths', letting notebooks be stored in
a directory hierarchy. This has resulted in a change in the web API -
most URL's are now prefixed with 'api/'.

EIN does not (yet) support hierarchical notebooks, but at least it now
plays better with the new URL scheme for iPython 2.0.

Oh, there also seems to have been a change in the format of the ipython
notebook. This has been fixed too, but is probably bakcwards
incompatible.
2014-04-14 12:48:55 -05:00
Takafumi Arakaki
b12b91da7a Add ein:slice-image
This is a workaround for issue #94.
2013-06-05 01:43:49 +02:00
Takafumi Arakaki
866002d680 Expand cell when kernel send some output
fixes #88
2012-12-06 21:56:02 +01:00
Takafumi Arakaki
0a6b1e3372 Add ein:cell-collapse/expand 2012-12-06 21:54:32 +01:00
Takafumi Arakaki
d04665ced7 Don't invalidate in ein:cell-set-collapsed unless needed 2012-12-06 21:54:18 +01:00
Takafumi Arakaki
8297363d2b Add PROP option to ein:cell-goto 2012-10-05 12:12:06 +02:00
Takafumi Arakaki
6403a83c74 Add new ein:cell-language method 2012-09-04 01:58:27 +02:00
Takafumi Arakaki
45c129b4f9 Use ASCII table for pandas output 2012-08-31 00:30:31 +02:00
Takafumi Arakaki
db104fc836 Make preferred output type configurable 2012-08-31 00:10:14 +02:00
Takafumi Arakaki
50da228b92 Render HTML using shr 2012-08-30 22:51:14 +02:00
Takafumi Arakaki
42b6363ca5 Support deactivated cell in ein:cell-get-text
This is needed for ein:cell-to-json to work with deactivated cell.
2012-08-29 21:03:14 +02:00
Takafumi Arakaki
1f7e6ec857 s/\(maybe_reset_undo\).Notebook/\1.Worksheet/g 2012-08-28 16:42:07 +02:00
Takafumi Arakaki
ca8c1678fe (require 'ein-utils) -> (require 'ein-core) 2012-08-28 15:26:32 +02:00