overtone / emacs-live

M-x start-hacking
http://overtone.github.com/emacs-live/
Other
1.52k stars 241 forks source link

Clojure inline doc popups not working in latest version #121

Closed cap10morgan closed 11 years ago

cap10morgan commented 11 years ago

When I originally installed Emacs Live a few months ago, clojure-mode had a cool feature where inline documentation would popup after pausing on a suggested auto-completion when you had an nREPL running.

In the latest version (installed in a blank OS X 10.8.4 VM w/ Homebrew-installed Emacs 24.3 to make sure it wasn't just my environment), it no longer works.

ndrchvzz commented 11 years ago

I'm having the same problem on a fresh installation. I use vanilla Emacs 24.3 compiled from source, emacs-live 1.0beta22, running on Debian 7. This seems to be an old issues that has come back: https://github.com/overtone/emacs-live/issues/81 The doc popup always works in the repl. At times it even worked in the editor window after playing with it for a while (just editing, switching windows, simple commands), but I haven't yet figured out what fixed it. It never works after a fresh launch of Emacs.

samaaron commented 11 years ago

Unfortunately I'm unable to reproduce this. This leaves me somewhat unable to help :-(

cap10morgan commented 11 years ago

Could it be related to this? https://github.com/clojure-emacs/nrepl.el/issues/292

ndrchvzz commented 11 years ago

I found a way to replicate it. In short the problem is when the window is too small. To replicate it: start Emacs Live leave the window to its default size. According to xwininfo it is 756 630 C-x C-f (select any .clj file) C-x 3 C-c M-j Now the doc popup works only in the repl but not in the clj file window. This window is probably too small to do any serious work, but even resizing it to 1386x936 doesn't fix it. Expanding it to about 1746x1026 fixes the problem for me. Note that if you don't split vertically with C-x 3 then even the initial window size will work fine, so it seems that it is the size of the window containing the clj file that matters. The doc popup also doesn't work unless the repl has been started. I'm not sure if this is known, and if it is wanted or just necessary. One somewhat related question: is it possible to reduce/remove the delay before the doc popup window shows up ?

By the way: I'm new to Emacs Live but so far I think it's really great!

cap10morgan commented 11 years ago

Hmm, that didn't fix it for me. When I have a REPL running, I get doc completions in that buffer (on core functions like map, for example), but when I type (ma in a buffer showing a .clj file in that project, the minibuffer says "Namespace not found" when it would otherwise be showing the doc popup. This is with my Emacs frame expanded to the full size of my desktop at 1680x1050.

samaaron commented 11 years ago

Hey @cap10morgan this is expected behaviour. The doc completions only work within namespaces that have been evaluated - i.e. available in the running nREPL process. Whenever you see Namespace not found you know that the namespace for the current buffer hasn't yet been evaluated in the server process. This means that it's not able to determine the docstrings as it doesn't yet know them. The docstrings come from the nREPL server, not Emacs.

cap10morgan commented 11 years ago

Hmm, OK. Thanks for the update.