abo-abo / function-args

C++ completion for GNU Emacs
120 stars 10 forks source link

bugs of "moo-select-method" when using "helm" to narrow down candidates #27

Closed oracleyue closed 7 years ago

oracleyue commented 9 years ago

Could you check and confirm the following bug? Any ideas to fix it? Thanks a lot!!

  1. When "moo-select-method" is "ivy", it shows candidates and narrows down to the right one correctly, as below: screen shot 2015-08-17 at 07 58 50
  2. When "moo-select-method" is "helm", it shows candidates. However, once I typed in any letters to narrow down the candidates, I got errors, as illustrated below. screen shot 2015-08-17 at 08 00 52 screen shot 2015-08-17 at 08 01 03

    (There is a pretty strange thing happened. When I tested std::string str; str., it still works well. However, when I tested others, e.g. std::ostream out; out. or others, the error reported. Is it possible that it is actually a bug of helm, instead of function-args?)

Versions: Emacs 24.4.1 Helm 2015.08.15.740 Function-args 20150731

Configurations:

       (require 'function-args)
       ;; enable case-insensitive searching
       (set-default 'semantic-case-fold t)
       ;; set selection interface
       (setq moo-select-method 'helm)  ;; ivy
       ;; enable function-args
       (add-hook 'c-mode-hook 'fa-config-default)
       (add-hook 'c++-mode-hook 'fa-config-default)
abo-abo commented 9 years ago

This is due to a change in helm. It supported alists as sources before, now it doesn't. It would require more work than I'd like to make helm work without alists. I suggest to wait, maybe it will come back. An older version of helm should work fine as well.

oracleyue commented 9 years ago

Updates: helm-fuzzy also doesn't work.

@abo-abo Many thanks for your prompt response! Hope it would be fixed later. Thanks for your confirmation.

oracleyue commented 9 years ago

@abo-abo FYI, according to https://github.com/emacs-helm/helm/issues/1133#issuecomment-132192556, the developer of helm claimed that this feature hasn't been removed. Could you locate new reasons to the bug later when you got time? Many thanks!

oracleyue commented 9 years ago

BTW, in your sample snapshot in Readme.md, the moo-complete completion windows can be at right-hand side. 68747470733a2f2f7261772e6769746875622e636f6d2f61626f2d61626f2f66756e6374696f6e2d617267732f6d61737465722f646f632f73637265656e73686f742d362e706e67 The default is to split window vertically. I briefly searched your code, and failed to find any configurations to make it split horizontally. Is it depending on helm's split-window setting?

If it were, then that's fine, it is just another tiny and indifferent bug due to changes in helm (since I have tried changing the default split-window type of helm)

(Here I made a mistake. Yes, the setting of helm works. I forgot to change the type to helm before, still using ivy.)

abo-abo commented 9 years ago

OK, I'll check again the alist thing. The window splitting config is:

(setq helm-split-window-default-side 'right)
oracleyue commented 7 years ago

@abo-abo Hi, have you removed the support helm from the latest version? I updated it recently and found that, no matter what moo-select-method is set to, it always trigger ivy to show the list. (I know the bug I reported before. Just check if you removed the support of helm directly, or it's my setting problem.) Thanks!

abo-abo commented 7 years ago

Helm support wasn't removed (moo-jump-directory still uses it), but it has heavily deteriorated. The new function rewrites just use ivy-read now. I wouldn't mind making the completion generic again, but I've got other things to invest my time in. PRs welcome.

oracleyue commented 7 years ago

@abo-abo Thanks! I may take a look at it, and see if I am able to fix it. I haven't yet have experience on developing any modes in elisp. :) Thanks a lot for your minor-mode! It's still pretty helpful~