bbatsov / helm-projectile

Helm UI for Projectile
327 stars 71 forks source link

Wrong number of arguments #51

Closed nitingupta910 closed 7 years ago

nitingupta910 commented 7 years ago

I'm getting this weird error in Messages when selecting a file after search using projectile with C-c p h.

apply: Wrong number of arguments: #[nil "…Á …ÂÃ!‡" [projectile-mode projectile-project-p run-hooks projectile-find-file-hook] 2 "Run `projectile-find-file-hook' if using projectile."], 1

emacs --version GNU Emacs 26.0.50.2

cjk commented 7 years ago

Same here, could be related to #25 ? I'm using emacs 25.1.50.1

FrancisMurillo commented 7 years ago

Same here, what I did is add &rest _ to the argument list of line 374 to get rid of the pesky message.

(advice-add 'helm-find-file-or-marked :after
            (lambda (&rest _) ;; HACK: Ignore whatever is passed
              "Run `projectile-find-file-hook' if using projectile."
              (when (and projectile-mode (projectile-project-p))
                (run-hooks 'projectile-find-file-hook))))

Using Emacs 25.1.50.1