Commit graph

29 commits

Author SHA1 Message Date
John Miller
ad86e606ca
Merge pull request #349 from xor-xor/bugfix/pytools-export-buffer
Fix ein:pytools-export-buffer
2018-10-15 09:31:12 -05:00
Tomasz Mieszkowski
80cf9808a9 Fix ein:pytools-export-buffer 2018-10-13 19:59:41 +02:00
dickmao
bc10cea743 Normalize url-or-port
```
"http://localhost:8888"
"http://localhost:8888/"
"http://127.0.0.1:8888"
"http://127.0.0.1:8888/"
"8888"
8888
```

Ideally these should converge to the same thing.  Since many hash
tables are keyed off `url-or-port`, forgetting to
normalize `url-or-port` with `ein:url` leads to missed cache hits and
general malaise.  So we try to do that.

Address a FIXME: apply callbacks to `ein:notebook-list-login-and-open`.

Removed py3.5 from travis build matrix to reduce developer strain.
2018-10-12 21:55:33 -05: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
5c2f34ceeb Implement company locate command.
ein company backend now dutifully looks for the file and line where an object is
defined when company so asks it. When ein fails in its duty it fails silently
and I am not sure yet if that is the correct behavior. For now it will stand,
until I think of something better.
2017-04-21 19:07:16 -05:00
Sam Steingold
ac74ff8868 extract ein:pytools-jump-to-source-1 from ein:pytools-jump-to-source
Check that `filename` actually exists before jumping to it.
Without this patch M-. on an arbitrary word ZZZ creates two empty buffers,
one named "None" and the other named (yes, this is the actual buffer name):
"code.py:456: UserWarning: Argument given (ZZZ) can't be found as a variable or as a filename."
2017-02-22 11:03:24 -05:00
John Miller
e226b30139 Follow redirects, numerous other fixes.
Content api tries to handle redirects, pointing new content towards the
redirected url instead of the one supplied by the user. Login with redirects not
working, though.

Other fixes:

 - Fixed bug in ein-ac that was generating errors outside of ein buffers.
 - New function `ein:pyools-set-figure-size` as shortcut for modifying
   matplotlib figsize rcParam.
 - ob-ein will output tracebacks when ein source block generates an error.
2017-01-11 07:42:06 -06:00
John Miller
a752e45772 Undo buffer-file-name madness.
No longer set buffer-file-name for ein:notebook buffers. This was
causing unexpected and potentially disastrous (as in data corruption)
behavior.

Some updates to travis configuration and testing. Still a long ways
from having that working, though.
2016-03-03 08:31:05 -06:00
John Miller
a4c6892551 Support set-buffer-file-name
In support of fixing issues #46 and #47.
2015-05-15 23:23:56 -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
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
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
f39c57a633 Directory bugfix. First steps in IPython 3.0 support.
Fixed bug in accessing directories a depths greater than 1 level.

Some initial support for IPython 3.0 and IPEP 27. Can open notebooklists
and notebooks, but having some issues connecting to websocket.
2014-10-17 16:44:04 -05:00
Takafumi Arakaki
ca8c1678fe (require 'ein-utils) -> (require 'ein-core) 2012-08-28 15:26:32 +02:00
Takafumi Arakaki
32f6aaba6d Simplify ein:connect-to-default-notebook
... by modifying ein:pytools-jump-to-source a bit.
2012-08-26 21:50:05 +02:00
Takafumi Arakaki
f32a169920 Move tooltip and help command to pytools
ein-notebook.el and ein-connect.el can share same command thanks to
the generic getter function.
2012-08-19 21:48:28 +02:00
Takafumi Arakaki
f4f116b26f Replace ein:pytools-eval-string-internal
with ein:shared-output-eval-string
2012-08-16 01:59:23 +02:00
Takafumi Arakaki
f0a4888c90 Remove ein:get-notebook-buffer 2012-08-14 21:05:08 +02:00
Takafumi Arakaki
fa5ec1b070 Refactor ein-pytools to get rid of declare-function 2012-08-14 21:05:06 +02:00
Takafumi Arakaki
73cadcaaa4 Use generic getters in ein-pytools.el 2012-08-14 21:05:05 +02:00
Takafumi Arakaki
c798f7d143 Adapt to new kernel-execute API
This is required to avoid wrong-number-of-arguments error,
unlike javascript.
2012-08-08 21:30:14 +02:00
Takafumi Arakaki
c4924efdbd Refactor ein:filename-to/from-python functions 2012-08-04 02:13:14 +02:00
Takafumi Arakaki
51992efe5b ein:pytools-jump-to-source works with tramp now
ein:filename-translations is added.
2012-08-03 23:05:23 +02:00
Takafumi Arakaki
c58d16d12a Use destructuring-bind in ein:pytools-jump-to-source 2012-08-03 22:21:17 +02:00
Takafumi Arakaki
10820048f8 Integrate pandas DataFrame with Simple Emacs Spreadsheet 2012-07-19 21:23:57 +02:00
Takafumi Arakaki
c104a0b19d Rename ein:kernel-ready-p to ein:kernel-live-p 2012-07-19 00:37:30 +02:00
Takafumi Arakaki
96cb9076f3 Connect to not-yet-opened notebook
fixes #16

Note that this change introduces another problem:
ein:connect-to-notebook popups notebook buffer (opens notebook buffer
and change focus to it).  Fixing this requires change in
ein:notebook-open.
2012-07-12 02:04:50 +02:00
Takafumi Arakaki
d1031fd61e mv *ein*.el ein.py lisp/
fixes #6
2012-07-02 16:47:20 +02:00
Renamed from ein-pytools.el (Browse further)