-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tab-completion (C-c TAB) not working with remote kernal. #42
Comments
I think location of the server (remote or local) does not matter as long as you have http connection. My guess is that this is due to difference in IPython version. Can you tell me the version IPython installed in remote (and local, if the locally installed on works)? |
Both the remote and local ipython are version 0.13. The local ipython notebook works perfectly with EIN. I could try install EIN on the remote machine, and see if work locally on Any other ideas? On Sat, Jul 21, 2012 at 4:33 PM, Takafumi Arakaki <
|
How can I get more details on the error that occurs? I'm not a emacs lisp -Aaron On Sat, Jul 21, 2012 at 4:46 PM, Aaron Andalman nerduno.list@gmail.comwrote:
|
Hmm... that's strange. Can you try to log the error? Here is the instruction: |
Here is the log, don't see much there: { {"kernel_id":"525001bd-f57e-40e3-bf6d-4fac3e0279c6","ws_url":"ws://127.0.0.1:8890"} @#<buffer http 127.0.0.1:8890> |
Thanks for pasting very long log (I should have made the log from MuMaMo shorter...). Indeed, it looks like that I didn't put any useful log messages.... I'm not sure if it helps, but let's try websocket.el's logging.
Ideally, the same log from local server would make it better. |
BTW, you better use backquotes ` instead of double quotes ", if you want to make a code block. |
When I tab complete on the line "import IP" (C-c TAB) I get the following in the websocket debug log.... it looks like it worked to me... ' the following characters in the above text were hightlighted in brown and could not be copied in the clipboard: \201~^A\324 -Aaron |
Completing the same text ("import IP" C-c TAB) with my local notebook works and yields the following websocket log: (can't get the code block to work) """ |
You wrote You can check it with evaluating it this and see the message buffer after the completion error:
|
The newest commit of websocket.el introduced debugging support for callbacks, so you can now use the Emacs debugger! If you are interested in helping debugging, please update both websocket.el and EIN to the head of master and do See also: http://tkf.github.com/emacs-ipython-notebook/#debugging |
Regarding "You wrote \201~^A\324 and \201^A\324 is that on purpose?" No, the tilde was present in both cases. |
I followed your instructions using M-x ein:dev-start-debug, and then attempting completion, but no Backtrace buffer appeared. Do I need to open it somehow? I still get the following message when attempting to tab-complete with the remote notebook. "Error found in callback `on-message': nil" |
Is that error message meaningful? Do you know what the 'on-message' callback is? |
Yes, I should have explained. That error message means a callback function which receives reply from the IPython server fails somehow. But it doesn't provide information at all; usually there are some error message instead of Normally you don't need to open |
Ah! Sorry, you need the prefix argument |
I did C-u M-x ein:dev-start-debug... but still no backtrace. I used C-h v to verify that following variables had the correct values: Perhaps the error is being caught in some way? (what does C-u M-x do compared to M-x?) On Sun, Jul 22, 2012 at 1:17 PM, Takafumi Arakaki
|
When I did M-x ein:dev-pop-debug-shell I got the following in a Backtrace buffer. I don't think it is related. """ |
Initiating the remote completion causes ein:log-all to add the first two lines, but don't get to the third "finished" line: [info] Starting WS: "ws://127.0.0.1:8890/kernels/d1e05f29-3542-4d2b-8d96-35d5ba1bd5ff" @#<buffer GNU Emacs> Not sure why no backtrace occurs... seems like the error must be caught somewhere. |
Also thanks for explaining the error... I tried to use edebug to stop Thanks, On Sun, Jul 22, 2012 at 3:23 PM, Aaron Andalman nerduno.list@gmail.com wrote:
|
Okay, I put a breakpoint in The problem appears to be related to text being READONLY. The arguments ein:completer-finish-completing receives are: After the let call, (funcall completer matched-text matches) is invoked with: Within the function: ein:completer-finish-completing-ac Perhaps there is a write permission problem because the notebook is remote? Doesn't seem likely since I can tab complete using the browser version of the notebook. Or is this because I'm in the debugger? The notebook's buffer is not listed as readonly in the buffer list (ie there is no % in the R column). Any ideas? I hope this is helpful. -A On Sun, Jul 22, 2012 at 8:46 PM, Aaron Andalman nerduno.list@gmail.com wrote:
|
The notebook's buffer is not read only but parts of it are read only. You can't type outside of the cell input area. Probably you are invoking completion outside of the input area? (I guess not; just asking to be sure). Temporal variables including ac-source-ein-direct looks fine. re: on-message defun, |
C-u gives "prefix argument" to the following command. It acts like a switch or modifier to the following command. For example, the document of
I guess you invoke the command in non-notebook buffer. The websocket log buffer is associated with the notebook, so it works only in the notebook buffer. Here is the other suggestion: Here is another suggestion: BTW, thank you very much about debugging EIN. I appreciate your patience. |
I'm tab completing in the input area. So that isn't the problem. How -aaron On Jul 23, 2012, at 5:37 AM, Takafumi Arakaki
|
Good suggestions. I will try both. On Jul 23, 2012, at 6:34 AM, Takafumi Arakaki
|
Normally you can use BTW, your phone number is on the message. Is it OK? |
I think the current point of the cursor is used in auto-complete. So it could be the problem if you moved the cursor in the notebook buffer during debugging. |
It seems the error occurs after the completion is cached. So you can do normal auto-completion after that:
It's not cool, but better than nothing... |
So I tried step 1-4 above, and I realize that auto-complete simply is not working in the remote notebook (but it does in the local notebook). In other words, nothing autocompletes in the remote notebook. Even words that appear earlier in the same notebook. Regarding your other suggestion, I tried adding (setq ein:use-auto-complete nil) and (setq ein:use-auto-complete-superpack) to my .emacs file, but this didn't seem to change anything in either the remote or local notebook. Am I doing something wrong? |
I think I can reproduce your problem using debug-ein.el script. I still don't why it works in my Emacs environment though. It looks like the problem is that auto-complete (more specifically, popup.el) cannot make enough space in the end of buffer because it is read-only. Some (maybe) relative discussions are on the auto-complete issue tracker. Can you do the completion if you insert new five cells under the current cell? |
Ah, I see. I was using older auto-complete/popup version when debugging. Can you update auto-complete and popup to the latest ones and try again? |
I checked with m2ym/auto-complete@91f97c5b60187413be917e960959ac716a3b8cd3 (the version just before popup.el is moved to the separate repository) that the completion doesn't work when at the bottom of the buffer. This means you need at least auto-complete 1.4 beta and popup.el 0.5 beta. |
that solves the problem! strange... I will update my version. On Mon, Jul 23, 2012 at 12:15 PM, Takafumi Arakaki <
|
What did you try? new version or appending cells? Please close the issue if updating AC and popup solves your problem. |
I appended cells. I just tried updating AC and popup, which didn't work, but I'm not sure I I did:
How can I check that auto-complete has been updated? Do I perhaps need to recompile EIN??? -Aaron On Mon, Jul 23, 2012 at 2:54 PM, Takafumi Arakaki <
|
I did M-x byte-recompile-directory ~/.emacs.d/ , but it reported 0 files On Mon, Jul 23, 2012 at 3:17 PM, Aaron Andalman nerduno.list@gmail.comwrote:
|
I don't know what etc/install.el does, but I assume it installs auto-complete under The easiest way is probably to start Emacs by If you want to make it bit more persistent, you can add something like the following in your dotfile:
The easiest way to check the place where the library is loaded is to do something like |
I just found out that you can do |
BTW, I strongly recommend installing library using el-get or package.el. EIN supports both: |
You can try this also https://github.com/tkf/zeroein to see how the setup works. EIN in zeroein is a bit outdated though. |
I was not familiar with el-get or package, so I choose to install manually. Which do you recommend? And what exactly do they do? Will they install If I've already installed manually can I still use el-get or package? -Aaron On Mon, Jul 23, 2012 at 3:55 PM, Takafumi Arakaki <
|
Based on M-x locate-library both popup and auto-complete are pointing to -Aaron On Mon, Jul 23, 2012 at 4:55 PM, Aaron Andalman nerduno.list@gmail.comwrote:
|
I wrote ~/.emacs.d/list/auto-complete/ but that should be "lisp" instead of "list". If you are copying that without modifying it, please change. If they point to the new elc files, the completion should work. It doesn't? Re: el-get vs package.el, I prefer el-get because you can do more (e.g., specifying version by a git revision). I guess it's better to search articles comparing them. If you want to try el-get, probably you should wait a little bit because they are preparing new major release.
yes, both does
no, both does not
If you don't specify the directory you used for manual install in |
Okay, I complete cleared out my init.el file (literally empty) Is el-get installed the latest ein, or perhaps an older version. Note sure -Aaron On Mon, Jul 23, 2012 at 5:45 PM, Takafumi Arakaki <
|
Try: The last part:
makes sense if you did not restart Emacs after uninstalling, because (I guess) el-get won't "unload" the code. |
I'm now installing everything with el-get, but I still have the bug that AC From a clean install I did: Then added the following to init.el: Looking auto-complete.el, the version is 1.4 (and the popup version 0.5). Can you replicate this? Thanks, On Mon, Jul 23, 2012 at 6:22 PM, Takafumi Arakaki <
|
No I can't. Strange. cd ~/.emacs.d/el-get/ein/lisp/ Replace 8888 with your IPython server port number. |
Yes! I can reproduce the problem. And it's due to the very latest change in the popup.el. This is how to fix:
Then you should be fine. |
This will fix the problem with EIN: tkf/emacs-ipython-notebook#42 See also the discussions in m2ym/auto-complete#115
The problem in popup.el is fixed. You can just do |
that fixed the problem! thanks. issue closed. I have noticed that sometimes ein performance is not as good as the browser On Tue, Jul 24, 2012 at 3:19 AM, Takafumi Arakaki <
|
I feel EIN is too slow to use when ein-mumamo.el is not compiled. But as you are installing it from el-get and el-get compiles modules automatically, it is not the problem I think. You can check if ~/.emacs.d/el-get/ein/lisp/ein-mumamo.elc exists to make sure. If you find another performance issue, please open another issue. I am closing this issue. |
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
The text was updated successfully, but these errors were encountered: