Commit graph

1272 commits

Author SHA1 Message Date
John Miller
59d2b83a21 Maybe fix eager macro expansion error on travis. 2018-05-31 07:56:38 -05:00
Sam Steingold
359d4caabc avoid compilation warnings about unused lexicals and fix minor typos 2018-05-29 17:20:54 -04:00
Sam Steingold
3f970319fe every defcustom must have :type 2018-05-29 17:20:31 -04:00
Sam Steingold
b6e6dff7ba avoid unnecessary `eval' 2018-05-29 10:01:25 -04:00
Sam Steingold
58a199e1c6 code cleanup: remove ein:min and ein:do-nothing (ELisp has min and ignore) 2018-05-27 12:04:13 -04:00
Sam Steingold
264f355081 make timestamp format customizable and default to ISO 8601
add ein:format-time-string and use it for both ein:timestamp-format
and ein:notebooklist-date-format
2018-05-25 11:43:39 -04:00
John Miller
6e9fa64bb0 Fix #260.
See new interactive function `ein:notebooklist-refresh-kernelspecs'. Maybe I
will document it by the next commit.
2018-05-20 08:42:42 -05:00
John Miller
f39ff47571 ob-ein: Fix for #300 2018-05-16 16:11:14 -05:00
Adrian Kretz
4bc4e54999 Fix token authentication 2018-05-15 02:24:03 +02:00
John Miller
1e70df87d0 ein-timestamp:
Small change to how metadata is stored so notebook will save without erroring.
2018-05-12 17:50:49 -05:00
John Miller
4e0deb86ae Implementing ExecuteTime in ein.
If you want to try this in your installation of ein then place a call
to (require 'ein-timestamp) in your init file after loading ein.
2018-05-12 17:37:21 -05:00
John Miller
9ad9b4f4e6 Hooks to customize behavior during kernel execution.
New hooks `ein:pre-kernel-execute-functions', `ein:on-execute-reply-functions'
and `ein:on-shell-reply-functions'. See variable documentation for more
information.
2018-05-12 17:32:32 -05:00
John Miller
b6bd6bdb82 ob-ein.el: Fix for #298.
if-let* is not available in versions of emacs prior to 26.
2018-05-12 07:45:26 -05:00
John Miller
5f0921ea96
Merge pull request #302 from nealsid/master
Add overlay to output area with new faces.
2018-05-12 07:39:16 -05:00
John Miller
49a6ddda96
Merge pull request #301 from jflatow/warn-not-die-on-images
dont fail on image insertion failure, just warn
2018-05-12 07:17:16 -05:00
Neal
56e72c11d3 Add overlay to output area with new faces.
Similar to having an input area face, we now have faces for errors &
normal output in the output area. They're currently empty to preserve
existing appearance.
2018-05-11 23:24:33 -06:00
Jared Flatow
229303a45c dont fail on image insertion failure, just warn 2018-05-11 15:34:11 -07:00
colehaus
d99039c3dc
Used fixed case too 2018-05-08 21:06:56 -07:00
colehaus
74cbd99fd3
Make replace in async update literal
Without this, async updates choke on text which includes (for example) `\`
2018-05-08 20:46:33 -07:00
Sam Steingold
b0bc1b2293 make default notebooklist sorting customizable
(ein:notebooklist-sort-field): New custom var, replaces `ein:%item-sort-param%'.
(ein:notebooklist-sort-order): New custom var, replaces `ein:%item-sort-order%'.
(ein:make-sorting-widget): New macro.
(ein:nblist--sort-group): Fix the meaning of :ascending & :descending.
(render-directory): Use `ein:make-sorting-widget' to define widgets;
use the new custom vars instead of the internal %% vars.
2018-05-04 15:07:32 -04:00
Sam Steingold
5bf4afb33b Make date format in notebooklist mode customizable.
(ein:notebooklist-date-format): New user variable.
(ein:format-nbitem-data): Use it.
2018-04-23 17:33:13 -04:00
John Miller
be5792da8d ein-notebooklist: More featureful sorting of directory listing.
Not much of a UI at the moment, but notebooklist entries can now be sorted
either by name or by date last modified. Jupyter does not provide size
of each item, that I can see (for the moment), so currently not possible to sort
by that parameter.
2018-04-22 20:57:01 -05:00
John Miller
d1c3464583 Formatting cleanup, sort notebooklist entries by name.
Taking some initial steps to implement features requested in #293 by @sam-s.
2018-04-22 10:22:11 -05:00
John Miller
fcf9bff0af ein-cell: Bugfix to keep everything from turning into hy cells.
Fix bug that was turning all the cells in a notebook without the ein.hycell
metadata tag present into hy-codecells.
2018-04-14 20:38:22 -05:00
John Miller
376f263ea9 Documentation fixes. 2018-04-14 13:53:50 -05:00
John Miller
847f7ca5a1 Prepare for v0.14, properly save and load hy codecells. 2018-04-14 13:29:16 -05:00
John Miller
94d7c7820d Merge branch 'jupyter-server-no-popup-286' 2018-04-04 20:47:19 -05:00
John Miller
c35b4f80f7 ein-connect: Fix for #287.
Defer the deferred...

A bit less cryptically - wrap call to ein:shared-output-eval-string in a
deferred construct to ensure proper sequential execution of autoexec cells.
2018-04-04 20:13:26 -05:00
Patrick
ccd43f857b This version works 2018-03-31 14:38:25 -07:00
Patrick
6eb1c100a3 Revert "Starting to split render functions for ipy2"
This reverts commit bd3f41d683.
2018-03-31 13:58:01 -07:00
Patrick
42ff34d82a This assumes ipy-version is globally accessible 2018-03-31 13:06:26 -07:00
Patrick
2099e7cd1c Not sure where ipyversion is accessable 2018-03-31 13:03:40 -07:00
Patrick
b775732e4e Add notes so I can combine the two render-directory funcs 2018-03-31 12:58:32 -07:00
Edward Banner
3564ef3196 Add no-popup to lexical-let
I don't know enough about lexical-let to know why this works.
2018-03-29 11:15:35 -07:00
Patrick
bd3f41d683 Starting to split render functions for ipy2
There's still a lot of repeated code that could be shared b/w the ipy2
and ipy3 functions.  Need to make sure I understand it first.
2018-03-27 22:34:19 -07:00
Edward Banner
e17819f918 Add no-popup option to ein:jupyter-server-start 2018-03-26 19:54:34 -07:00
Patrick
3466d0f87d Cleanup - undo unrelated changes
I had made a few other changes to satisfy my linter.  This removes
those changes so it's more clear what I was editing to change the
rendering order.
2018-03-25 13:42:35 -07:00
Patrick
e2734c9749 You can now customize order with ein:notebook-list-render-order 2018-03-25 13:30:50 -07:00
Patrick
adc85796e4 Works, puts open notebooks above directory 2018-03-25 12:32:31 -07:00
John Miller
115c16eb9f ein-hy: Support executing hy code from notebook running a python kernel.
It's magic! If you have hy installed in your environment, you can run code in a
notebook running a python kernel. Just set the cell type to hy-code!
2018-03-11 12:29:54 -05:00
John Miller
73747d86d9 ein-shared-output: Queue up requests ala deferred:$
Try to gracefully handle multiple calls to `ein:shared-output-eval-string' by
wrapping calls to deferred:$. The deferred chain will not call
`ein:cell-execute' if the cell is already running.

Also did a bit of refactoring in ob-ein.
2018-03-10 07:53:49 -06:00
John Miller
a8fc712ca8 ob-ein: Wrap if-let* var list properly.
Make async work a little better, but can still have problems if one tries to
execute several source blocks at once.
2018-03-10 07:07:37 -06:00
John Miller
baec3d8577 ein-notebooklist: Fix #278. 2018-03-08 14:08:45 -06:00
John Miller
4ce1a31793 ein-cell: Fix for #268.
User can now ask ein to truncate long outputs in a worksheet. Use the
customizable variable `ein:truncate-long-cell-output' to control this behavior.
Set to nil to have no truncation, otherwise an integer value specifying the
number of lines to keep before truncating.
2018-03-08 13:36:09 -06:00
John Miller
607e73a125 Merge branch 'master' of github.com:millejoh/emacs-ipython-notebook 2018-03-08 09:09:11 -06:00
John Miller
af45786726 ob-ein: Enable asynchronous execution of source blocks.
Can be enabled or disabled via `ein:org-async-p'.

Greatly inspired by ob-ipython-async and scimax (see the source code, Luke!).
2018-03-08 09:07:31 -06:00
John Miller
7a4d58ea36 ein-notebook: Try to suspend GC operations when loading notebooks.
Loading large notebooks (>1M) can be slow. At least some of this is due to
downloading from the jupyter server, but this operation is asynchronous and
should not block emacs. My suspicion is that when Emacs blocks it is when it is
generating the internal data structures used to represent the notebook in emacs.
This is somewhat unavoidable, but part of the slow down may be due to reaching
the cons threshold. These changes try to temporarily increase the cons threshold
while loading the notebook. We'll see if it helps at all.
2018-03-08 09:03:09 -06:00
Miller
710a5a6b91 ein-kernel: Handle generic stdin channel requests
That is, stdin requests that are generated by calls to `input' in Python (and
whatever is equivalent in other kernels).
2018-03-05 15:56:16 -06:00
John Miller
9083cfc891 ein-traceback: Maybe use tramp to find remote files.
In tracebacks, we detect if ein is connected to a remote host, and if so try to
create a TRAMP friendly path when jumping to files from a traceback.

In response to #263.
2018-02-28 06:32:14 -06:00
John Miller
acb79501f0 ein-notebook: Fix ein:get-kernelspec when name is "default"
Passing "default" to `ein:get-kernelspec' would cause it to return a string
naming the actual kernelspec, which just won't do. So we look for that case and
then look for the real kernelspec.
2018-02-27 16:08:46 -06:00