Commit graph

35 commits

Author SHA1 Message Date
dickmao
234cf391f9 Polymode
M-x customize-group RET ein
Toggle Ein:Polymode

Avoid trying to emulate jump-to-definition, eldoc, and autocompletion
functionalities that Elpy will always do better.

Fixes #497 #482 #418
2019-04-02 09:35:17 -04:00
dickmao
ed6482096e Add ob-ein tests
Also, speed up login and other cleanups
2019-02-19 10:06:15 -05:00
John Miller
fcb4040850 ein-completer: Robuster oinfo
By covering our ears and ignoring as much as possible. Apparently SyntaxError is
not a subtype of Exception. Also need to send raw strings otherwise unicode
characters will cause fits.

Also added new command, `ein:pytools-reinject` to reinject ein's pytools code.
The name could probably use some work.
2018-11-05 17:05:38 -06:00
John Miller
134b77c3be ein-pytools: Setuphook for add sys path no longer needed.
Since we inject the pytools python code directly into the kernel we no longer
need to hack on the python system path.
2018-11-02 15:57:10 -05:00
John Miller
dd8a1607cd ein-pytools: Make pytools work over remote connections.
Python running on a remote connection doesn't know how to find files on the
local machine, apparently, so we take the route instead of sending the contents
of a temporary buffer loaded with the pytools python code to the running kernel.
2018-11-02 06:32:10 -05:00
John Miller
6e7d3dd158 ein-pytools: Don't request tooltips for magic functions.
Someone wants ein to get tooltip information for magic functions - we don't
currently support this so will skip these situations.
2018-11-01 20:13:45 -05:00
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)