clojure-emacs/ac-nrepl

empty newlines getting inserted on completion popup

vemv opened this issue · 7 comments

vemv commented

Hi Steve,

if place the point at the bottom of a buffer, type "clojure.core$", and then press <UP>, 12 newlines get inserted. Only happens in clojure-mode, not emacs-lisp-mode et al.

I am able to reproduce the issue with a minimal configuration which is available here: http://github.com/vemv/emacs-minimal

The workaround I found is performing (setq ac-quick-help-height 0). If you can reproduce the issue, perhaps you'd be interested in incorporating this knowledge to the readme.

Thank you - Victor

vemv commented

I just realised that, quite logically, (setq ac-quick-help-height 0) disables the docstrings. So mine is not a fix at all.

Hi Victor! Thanks for the detailed report, and for providing the example configuration.

What an odd problem. It appears to be due to a bug in either auto-complete or popup; the docstring produced by ac-nrepl for java classes was simply "\n", and this apparently caused the problem. As a workaround, I'm now trimming the docstrings passed to auto-complete, but one of us should probably file this issue with auto-complete too.

-Steve

vemv commented

Nice, thanks for the quick feedback! Will try it out when I arrive home.

By the way, perhaps showing Clojure's generated classes is not the best default? Not sure of who should manage that option (ac-nrepl, nrepl.el, nrepl) though.

As for forwarding the issue to the auto-complete authors, surely you are best qualified for reporting it.

Victor

Yes, I'll file the bug upstream when I get chance.

It would probably be undesirable to add special-case code to filter out the generated Clojure classes, but if it were considered a good idea, the best place for it to be done would be in the core.complete library, which both nrepl and ac-nrepl use to obtain completion candidates.

There are now updated packages for ac-nrepl in both Marmalade and MELPA.

Cheers,

-Steve

vemv commented

Hi again Steve,

I'm afraid your patch disables the documentation part of the popup! I can
reproduce this both in my regular configuration, and in the minimal I
provided. Switching back to the previous ac-nrepl's repo state solves the
issue (but brings back the one I originally reported).

Thanks - Victor

On Tue, Jan 8, 2013 at 5:36 PM, Steve Purcell notifications@github.comwrote:

Yes, I'll file the bug upstream when I get chance.

It would probably be undesirable to add special-case code to filter out
the generated Clojure classes, but if it were considered a good idea, the
best place for it to be done would be in the core.complete library, which
both nrepl and ac-nrepl use to obtain completion candidates.

There are now updated packages for ac-nrepl in both Marmalade and MELPA.

Cheers,

-Steve


Reply to this email directly or view it on GitHubhttps://github.com//issues/23#issuecomment-12004754.

Gah, okay - I'm pretty sure I've fixed the fix. Sorry about that!

vemv commented

Fix working perfectly this time :) thanks so much for the quick delivery!

On Wed, Jan 9, 2013 at 8:15 PM, Steve Purcell notifications@github.comwrote:

Gah, okay - I'm pretty sure I've fixed the fix. Sorry about that!


Reply to this email directly or view it on GitHubhttps://github.com//issues/23#issuecomment-12061532.