Commit graph

100 commits

Author SHA1 Message Date
John Miller
778d58b850 Reintroduce ein-skewer.el
The code was lost, but now it is found.
2017-06-12 11:05:24 -05:00
John Miller
9cfb25379e Merge branch 'master' into dynamic-javascript 2017-06-11 20:30:09 -05:00
John Miller
179cec48ae ein-cell: Fix slideshow metadata.
Was using wrong name for slide type; should be 'slide_type' not 'slide-type'.
2017-06-02 15:05:21 -05:00
John Miller
1bbaf7600c Merge branch 'master' into dynamic-javascript 2017-05-30 21:00:26 -05:00
John Miller
3697273a84 slideshow: Clean up variable names (no more underscores). 2017-05-22 08:02:42 -05:00
Dov Grobgeld
6b752fd32b Update ein-cell.el
Fixed typo.
2017-05-18 22:22:40 +03:00
John Miller
c97c85eae8 ein-cell-output: Remove duplicate code. 2017-05-18 10:17:10 -05:00
John Miller
d9c77492d6 Balancing parenthesis. 2017-05-16 15:07:14 -05:00
John Miller
4f4cfa8f0a Ensure new cells have metadata set. 2017-05-16 14:34:40 -05:00
John Miller
43a1afe49b Preserve metadata information when saving.
EIN should now respect when other actors (namely nbextensions) set metadata for
a cell.
2017-05-16 13:55:43 -05:00
John Miller
e88f7f3d5f Fix for #188.
Make even more unique edit-cell buffer names. Check that an edit-cell-buffer
does not already exits before creating one.

Also try to be even more aggressive in limiting output in backtraces when
debugging ein.
2017-04-02 08:59:02 -05:00
Thierry BM
740c1ca999 Fix for the copy cell feature 2017-02-23 19:14:01 -05:00
John Miller
0ede9e7ef6 Typos in slot name accessors, fix version cache to accept URL strings.
Mistyped some accessors for worksheet slot accessors. Correct
`*running-ipython-version*` hash to accept strings (i.e. URL's) as well as just
port numbers.
2017-02-01 09:51:12 -06:00
John Miller
cfd0e8a3d7 Fix clear_output in the Jupyter age and a bug fix.
Finally do the right thing when clear_output is received. Closes issue #24. Also
fix a nasty bug that might occurr when trying to open a notebook with no
associated kernelspec.
2016-12-23 16:33:35 -06:00
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
55176c3a4c Moving away from eieio to cl-generic
The goal is to eventually eliminate most of the warnings that are
generated when byte-compiling ein.

Do this over several commits to make it easier to revert in the likely
event that something breaks.
2016-10-13 16:29:44 -05: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