From b6611d215f369d2d4b85cb2500190bc719733078 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 14 Apr 2019 13:36:56 -0400 Subject: [PATCH] Fix wrong-num-of-args error on SPC * Adds QUERY and DIRECTORY args to +{ivy,helm}/project-search --- modules/completion/helm/autoload/helm.el | 17 +++++++++-------- modules/completion/ivy/autoload/ivy.el | 19 +++++++++++-------- 2 files changed, 20 insertions(+), 16 deletions(-) diff --git a/modules/completion/helm/autoload/helm.el b/modules/completion/helm/autoload/helm.el index 312820e53..21a60525b 100644 --- a/modules/completion/helm/autoload/helm.el +++ b/modules/completion/helm/autoload/helm.el @@ -178,30 +178,31 @@ order. return (intern (format format tool)))) ;;;###autoload -(defun +helm/project-search (&optional arg query) +(defun +helm/project-search (&optional arg initial-query directory) "Performs a project search from the project root. Uses the first available search backend from `+helm-project-search-engines'. If -ALL-FILES-P (universal argument), include all files, even hidden or compressed -ones, in the search." +ARG (universal argument), include all files, even hidden or compressed ones, in +the search." (interactive "P") (funcall (or (+helm--get-command "+helm/%s") #'+helm/grep) arg - query)) + initial-query + directory)) ;;;###autoload -(defun +helm/project-search-from-cwd (&optional arg query) +(defun +helm/project-search-from-cwd (&optional arg initial-query directory) "Performs a project search recursively from the current directory. Uses the first available search backend from `+helm-project-search-engines'. If -ALL-FILES-P (universal argument), include all files, even hidden or compressed -ones." +ARG (universal argument), include all files, even hidden or compressed ones." (interactive "P") (funcall (or (+helm--get-command "+helm/%s-from-cwd") #'+helm/grep-from-cwd) arg - query)) + initial-query + directory)) ;; Relative to project root diff --git a/modules/completion/ivy/autoload/ivy.el b/modules/completion/ivy/autoload/ivy.el index 055a64ea0..741bf7ae7 100644 --- a/modules/completion/ivy/autoload/ivy.el +++ b/modules/completion/ivy/autoload/ivy.el @@ -350,28 +350,31 @@ order. return (intern (format format tool)))) ;;;###autoload -(defun +ivy/project-search (&optional all-files-p) +(defun +ivy/project-search (&optional arg initial-query directory) "Performs a project search from the project root. Uses the first available search backend from `+ivy-project-search-engines'. If -ALL-FILES-P (universal argument), include all files, even hidden or compressed -ones, in the search." +ARG (universal argument), include all files, even hidden or compressed ones, in +the search." (interactive "P") (funcall (or (+ivy--get-command "+ivy/%s") #'+ivy/grep) - (or all-files-p current-prefix-arg))) + arg + initial-query + directory)) ;;;###autoload -(defun +ivy/project-search-from-cwd (&optional all-files-p) +(defun +ivy/project-search-from-cwd (&optional arg initial-query directory) "Performs a project search recursively from the current directory. Uses the first available search backend from `+ivy-project-search-engines'. If -ALL-FILES-P (universal argument), include all files, even hidden or compressed -ones." +ARG (universal argument), include all files, even hidden or compressed ones." (interactive "P") (funcall (or (+ivy--get-command "+ivy/%s-from-cwd") #'+ivy/grep-from-cwd) - (or all-files-p current-prefix-arg))) + arg + initial-query + directory)) ;; Relative to project root