Giter Club home page Giter Club logo

emacs-ipython-notebook's Issues

Rethink how EWOC is used for stream output area

By 6f3fb3b, I started using (comint-carriage-motion START END). This function removes character of the outside of the given region if the START point is not at the beginning of line. This probably causes something wrong in EWOC side because this means comint-carriage-motion may remove some characters from previous EWOC node.

Possible fix is to treat continuous output stream as one EWOC node, like what HTML client in IPython does.

Use headlines to overview notebook structure

IPython notebook 0.13 supports headline cells. Overview buffer using something like direx should be useful. Maybe this feature should be extensible for more than two worksheets because IPython might support it in 0.14 (or later).

Error on opening notebook

I just discovered ein by accident, and love the idea. I installed it on Emacs 24.1 (WIndows and OS X), fired up the iPython notebook, and tried to open a notebook I'd previously created in my Web browser. Unfortunately, opening the file (on both systems) gives me the following error (here I'm copying what's shown in my Messages buffer):

Contacting host: 127.0.0.1:8888
Opened notebook list at 8888
Open notebook analyze.
Contacting host: 127.0.0.1:8888
ein: [error] Wrong number of arguments: #[... "p�\306 ���\307\310
�\311\211 \311&�+`��p� \211��\312H��>\204)

Actually, the error message is a lot longer than this, but I think it contains binary control characters that screw up my ability to paste it here... The only recognizable text in the error message is at the end,

[pretty-printer dll buffer pos new-ewoc old-buffer ewoc--dll-create vector cl-struct-ewoc nil ...] 9 ...], 4

Any idea what's going wrong? I'd love to get this running.

Thanks.

How to get titles displaying in a different font?

I see various customize options in ein for what fonts to use to display different level titles, but my titles just display in Emacs as plain text, e.g.,

Header 1

Header 2

I'm probably missing something trivial, but how do I get them to display properly?

Repo organization

Two notes on the repo:

  • No COPYING or LICENSE file included, and it's not mentioned in the readme. Personally I'd love it if you could license it BSD as the rest of IPython, but it's your choice (or not, if you have GPL dependencies). In any case, you should have a license file and put a note of what the license is in the readme.
  • I suggest you move all the top-level code into a subdir, so the main repo is a smaller directory with just the README, LICENSE and other necessary top-level files, plus subdirs.

mumamo compatibility problems with emacs-for-python

Hi! I'm the mantainer of https://github.com/gabrielelanaro/emacs-for-python I'd really like to make my package compatible with ein.

Right now I'm having problems setting ein up, what I obtain is an "invalid file name" error message my mumamo when I open a notebook and head over a cell. The problem disappears when i manually load python-mode.

the relevant part of the initialization file is something like this:

(load-file "~/workspace/emacs-for-python/epy-init.el")

(add-to-list 'load-path "~/workspace/emacs-websocket/")
(add-to-list 'load-path "~/workspace/emacs-ipython-notebook/")
(add-to-list 'load-path "~/workspace/ein/zeroein/markdown-mode/")
(require 'markdown-mode)
(load-file "~/workspace/ein/zeroein/nxhtml/autostart.el")
(require 'ein)

If you comment emacs-for-python loading all is ok. I suspect this is something related to other things that gets loaded with python-mode (rope, other stuff..). There's a way I can disable them when loading python-mode in the mumamo environment?

Url encoding error gives a 404 for ein:notebooklist-open

In emacs using

python zeroein/zeroein.py --emacs `which emacs-snapshot`

I get this:

Contacting host: 127.0.0.1:8888
ein: [error] Error (error) while opening notebook list at the server 8888.
Contacting host: 127.0.0.1:8888

The terminal running ipython notebook reports

WARNING:root:404 GET /notebooks%3f_%3d1341211357 (127.0.0.1) 0.43ms

Interestingly if I decode the url and go to http://127.0.0.1:8888/notebooks?_=1341211357 in my browser I get the json response that I assume ein is expecting:

[{"name":"test","notebook_id":"1c7fc74f-4037-4f47-823e-ef6fbea4d5c9"}]

emacs version: GNU Emacs 24.1.50.1
ipython version: 0.13.dev

Organize directory

Putting many files in top level directory is a bit ugly.
But how to do it properly?

relevant: #5

Directory organization in other projects

Just a quick lookup.

Lisp code lies under lisp/ (no subdirectories under it):

% cd ~/.emacs.d/el-get/el-get/recipes
% grep '"lisp"' *.rcp                          
ess.rcp:       :load-path ("lisp")
jdee.rcp:  :load-path ("lisp" "elib"))
nognus.rcp:       :load-path ("lisp")
org-mode.rcp:       :load-path ("." "lisp" "contrib/lisp")
reftex.rcp:       :load-path ("lisp")
session.rcp:       :load-path ("lisp")

Flat (like current EIN):

Tab-completion (C-c TAB) not working with remote kernal.

EIN is fantastic, and it is working perfectly with my local notebook.

However, I often connect to a remote notebook. To do this I set up a ssh tunnel, such that I can still access the remote notebook on the localhost (e.g. http://127.0.0.1:9999). The setup works perfectly in my broswer (including tab complete, inline plotting, etc).

Within EIN I can still connect to the remote notebook, execute cells, view output, etc... but I'm unable to do any tab complete using C-c TAB. Doing so returns the following error message:

Error found in callback `on-message': nil

Any insight?

Thanks,
Aaron

Sage support

I'd really to be able to use something like this with sage. I gave it a try with Sage 5.2, running with IPython 0.13, but it just said ein: [error] Error (error) while opening notebook list at the server 8092. I'm unfamiliar with the IPython notebook but does it require a username and password to log in? I think that might be why it wasn't working.

Make ein-kernel.el work without notebook

This allows kernel to be used in any buffer. It will provide good completion, annotation and evaluation backend. I need to add more test for ein-kernel.el and then refactor it.

Example usage:

  • Completion, annotation and evaluation in Python buffer.
  • Matplotlib interface for Emacs Lisp.

Pressing tab to ident sometimes gives tracebacks

The following sequence reliably produces an error (running zeroein on Emacs 23):

  1. Type for i in xrange(10): in an empty cell.
  2. Press Enter.
  3. Press Tab.

No tab is inserted, the cursor leaves the cell, and the following traceback is produced:

part 2 [python-mode]: chu-min=32 chu-max=33 chu-last-bol=nil
apply: Wrong length inserted in mirror [python-mode]: change-beg=10 part=3, chu-max=33, pm=34
Toggling font-lock-mode off; better pass an explicit argument.

Specify logging level package-by-package basis

This makes easy to log one sub-package (e.g., ein-kernel.el) without contaminating log buffer by debugging messages from other sub-packages (e.g., ein-mumamuo.el, which sends a lot of messages).

kernel is not ready yet

I get this message when I try to execute anything in a newly opened notebook.

On opening a notebook, the following appears in Messages:

error in process filter: if: Wrong number of arguments: #[(name buffer host service) "ÄÅ�Æ   Ç
�&��" [name buffer host service make-network-process :name :buffer :host :service] 9 "Open a TCP connection for a service to a host.
Returns a subprocess-object to represent the connection.
Input and output work as for subprocesses; `delete-process' closes it.

NAME is the name for the process.  It is modified if necessary to make
 it unique.
BUFFER is the buffer (or buffer name) to associate with the
 process.  Process output goes at end of that buffer.  BUFFER may
 be nil, meaning that this process is not associated with any buffer.
HOST is the name or IP address of the host to connect to.
SERVICE is the name of the service desired, or an integer specifying
 a port number to connect to.

This is a wrapper around `make-network-process', and only offers a
subset of its functionality."], 8
error in process filter: Wrong number of arguments: #[(name buffer host service) "ÄÅ�Æ   Ç
�&��" [name buffer host service make-network-process :name :buffer :host :service] 9 "Open a TCP connection for a service to a host.
Returns a subprocess-object to represent the connection.
Input and output work as for subprocesses; `delete-process' closes it.

NAME is the name for the process.  It is modified if necessary to make
 it unique.
BUFFER is the buffer (or buffer name) to associate with the
 process.  Process output goes at end of that buffer.  BUFFER may
 be nil, meaning that this process is not associated with any buffer.
HOST is the name or IP address of the host to connect to.
SERVICE is the name of the service desired, or an integer specifying
 a port number to connect to.

This is a wrapper around `make-network-process', and only offers a
subset of its functionality."], 8

After attempting to execute print "something" in a cell, the tail of ein:log-all looks like this:

[debug] Opening notebook at http://127.0.0.1:8888/notebooks/8c2b1350-c164-4dc3-a061-b163d6eda191 @#<buffer *ein:notebooklist 8888*>
[debug] EIN:QUERY-AJAX @#<buffer *ein:notebooklist 8888*>
[debug] Start querying: http://127.0.0.1:8888/notebooks/8c2b1350-c164-4dc3-a061-b163d6eda191 @#<buffer *ein:notebooklist 8888*>
[debug] Start timer: timeout=60000 ms @#<buffer *ein:notebooklist 8888*>
[debug] EIN:QUERY-AJAX-CALLBACK @#<buffer  *http 127.0.0.1:8888*>
[debug] status = nil @#<buffer  *http 127.0.0.1:8888*>
[debug] url-http-response-status = 200 @#<buffer  *http 127.0.0.1:8888*>
[debug] (buffer-string) =
HTTP/1.1 200 OK
Content-Length: 103
Content-Disposition: attachment; filename="Untitled0.ipynb"
Server: TornadoServer/2.3
Last-Modified: Sat, 28 Jul 2012 02:11:07 GMT
Etag: "d0196f981d8ca623e6efb94f20048a11aa7bfe93"
Content-Type: application/json
Set-Cookie: username=; expires=Fri, 29 Jul 2011 02:28:22 GMT; Path=/

{
 "metadata": {
  "name": "Untitled0"
 }, 
 "name": "Untitled0", 
 "nbformat": 2, 
 "worksheets": []
} @#<buffer  *http 127.0.0.1:8888*>
[debug] EIN:QUERY-AJAX-CANCEL-TIMER @#<buffer  *http 127.0.0.1:8888*>
[debug] data = (:worksheets nil :nbformat 2 :name Untitled0 :metadata ...) @#<buffer *scratch*>
[debug] canceled = nil @#<buffer *scratch*>
[debug] Executing success/error callback. @#<buffer *scratch*>
[debug] URL-RETRIEVE nodtebook-id = "8c2b1350-c164-4dc3-a061-b163d6eda191", status = nil @#<buffer *scratch*>
[verbose] Start logging. @#<buffer *ein: 8888/Untitled0*>
[debug] EIN:QUERY-AJAX @#<buffer *ein: 8888/Untitled0*>
[debug] Start querying: http://127.0.0.1:8888/kernels?notebook=8c2b1350-c164-4dc3-a061-b163d6eda191 @#<buffer *ein: 8888/Untitled0*>
[debug] Start timer: timeout=1000 ms @#<buffer *ein: 8888/Untitled0*>
[info] Notebook Untitled0 is ready @#<buffer *ein: 8888/Untitled0*>
[debug] Executing status-code callback. @#<buffer *scratch*>
[debug] EIN:QUERY-AJAX-CALLBACK @#<buffer  *http 127.0.0.1:8888*>
[debug] status = nil @#<buffer  *http 127.0.0.1:8888*>
[debug] url-http-response-status = 200 @#<buffer  *http 127.0.0.1:8888*>
[debug] (buffer-string) =
HTTP/1.1 200 OK
Content-Length: 83
Content-Type: text/html; charset=UTF-8
Location: /907511d6-c6a5-4eb2-a0f8-7bc51246a340
Server: TornadoServer/2.3
Set-Cookie: username=; expires=Fri, 29 Jul 2011 02:28:22 GMT; Path=/

{"kernel_id":"907511d6-c6a5-4eb2-a0f8-7bc51246a340","ws_url":"ws://127.0.0.1:8888"} @#<buffer  *http 127.0.0.1:8888*>
[debug] EIN:QUERY-AJAX-CANCEL-TIMER @#<buffer  *http 127.0.0.1:8888*>
[debug] data = (:ws_url ws://127.0.0.1:8888 :kernel_id 907511d6-c6a5-4eb2-a0f8-7bc51246a340) @#<buffer *scratch*>
[debug] canceled = nil @#<buffer *scratch*>
[debug] Executing success/error callback. @#<buffer *scratch*>
[info] Kernel started: 907511d6-c6a5-4eb2-a0f8-7bc51246a340 @#<buffer *scratch*>
[info] Starting WS: "ws://127.0.0.1:8888/kernels/907511d6-c6a5-4eb2-a0f8-7bc51246a340" @#<buffer *scratch*>
[warn] Kernel is not ready yet! (or closed already.) @#<buffer *ein: 8888/Untitled0*>

Reconnect to new server instance

It should be possible to reconnect to different server/notebooks. Reconnecting to different notebook is effectively as same as "Save as" functionality.

Pressing tab twice to deident sometimes causes error from MuMaMo

Enter the following in code cell ([] is the cursor position) then hit TAB twice:

def f():
    pass
    []

causes the following error:

part 2 [python-mode]: chu-min=34 chu-max=35 chu-last-bol=nil
apply: Wrong length inserted in mirror [python-mode]:
change-beg=10 part=3, chu-max=35, pm=36

See also:

Cell highlighting using pygmentize and ansi-color

MuMaMo is nice but it takes a little bit too much CPU power and I need some hack to use it with auto-complete. So, maybe it's better to have alternative.

This is a proof of concept snippet:

(defun my-pop-to-pygmentized (string lexer)
  (with-current-buffer (get-buffer-create "*my pygmentized*")
    (erase-buffer)
    (insert string)
    (shell-command-on-region
     (point-min) (point-max)
     (format "pygmentize -l %s" lexer)
     nil t)
    (ansi-color-apply-on-region (point-min) (point-max))
    (pop-to-buffer (current-buffer))))

(my-pop-to-pygmentized "\
import numpy
numpy.arange(0, 10)" "python")

zeroein load path

In order to get zeroein.el to load the ein elisp files, I had to change the load list from

'("ein" "markdown-mode" "websocket" "python" "auto-complete" "popup" "fuzzy" "pos-tip" "smartrep")

to

'("ein/lisp" "markdown-mode" "websocket" "python" "auto-complete" "popup" "fuzzy" "pos-tip" "smartrep").

I don't know whether this issue is specific to my configuration (Emacs 23 on Debian).

ein: [error] Cannot open load file: mumamo-cmirr

I'm attempting to install EIN. The ein:notebooklist opens fine, but when I attempt to open a notebook, i receive the following error:
" Cannot open load file: mumamo-cmirr"

and the Notebook opens in the Fundamental mode.

Any suggestions?

Thanks,
Aaron

Connecting to EIN Notebook with password security...

When I attempt to connect to a notebook with password security, I receive an error.

Are notebooks with password security (set up using ipython config variable c.NotebookApp.password) accessible with EIN?

Thanks.

EIN menu

Is an EIN menu planned? I think a menu would help users to explore the various commands in the EIN package.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.