From a66e23c7bce9fe321d8206da5a9b084b0dc9b711 Mon Sep 17 00:00:00 2001 From: Bozhidar Batsov Date: Wed, 8 Jul 2026 12:26:21 +0300 Subject: [PATCH] Deprecate helm-projectile-ack ack has been superseded by ripgrep and the silver searcher, and Projectile itself has dropped `projectile-ack' (so helm-projectile-ack shadows a command that no longer exists upstream, and it was reachable only via M-x anyway). Mark it obsolete via `make-obsolete', pointing users at `helm-projectile-rg' / `helm-projectile-ag'. It keeps working for now; the ack machinery in `helm-projectile-grep-or-ack' and `helm-projectile--wildcard-to-ack-match' will be removed together with the command in a future release. --- CHANGELOG.md | 1 + README.md | 3 ++- helm-projectile.el | 10 +++++++++- test/helm-projectile-test.el | 6 ++++++ 4 files changed, 18 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 237faf4..4ce20fa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ * Require Emacs 28.1 and Projectile 3.1.0. Projectile 3.1.0 raised its own minimum to Emacs 28.1 (and pulls in `compat`), so helm-projectile can no longer be installed on Emacs 27. The CI matrix drops the 27.2 job accordingly. * Drop the dead "Find file in Elscreen" grep/ack action. Helm removed elscreen support (`helm-grep-jump-elscreen` no longer exists), so that action errored for anyone who still had elscreen installed. +* Deprecate `helm-projectile-ack`. ack has been superseded by ripgrep and the silver searcher, and Projectile itself dropped `projectile-ack`; use `helm-projectile-rg` or `helm-projectile-ag` instead. The command still works for now but is marked obsolete and will be removed in a future release. ### Internal diff --git a/README.md b/README.md index eab722a..d4757b1 100644 --- a/README.md +++ b/README.md @@ -101,7 +101,8 @@ these are the supported commands: * `helm-projectile-find-dir` * `helm-projectile-recentf` * `helm-projectile-switch-to-buffer` -* `helm-projectile-grep` (can be used for both grep or ack) +* `helm-projectile-grep` +* `helm-projectile-ack` (deprecated - use `helm-projectile-rg` or `helm-projectile-ag`) * `helm-projectile-ag` * `helm-projectile-rg` * Replace Helm equivalent commands in `projectile-commander` diff --git a/helm-projectile.el b/helm-projectile.el index 4d4d13e..6041ac1 100644 --- a/helm-projectile.el +++ b/helm-projectile.el @@ -1596,7 +1596,11 @@ prefix argument then ask for FILES." "Run an ack search in the current project with Helm. DIR directory where to search, if not set then current project root is used. TYPES is a list of types to include in search. When called with -a prefix argument, then ask for TYPES." +a prefix argument, then ask for TYPES. + +This command is obsolete: ack has been superseded by ripgrep and the +silver searcher, and Projectile itself has dropped `projectile-ack'. +Use `helm-projectile-rg' or `helm-projectile-ag' instead." (interactive) (let* ((project-root (or dir (projectile-project-root) (user-error "You're not in a project"))) (ignored (when (helm-projectile--projectile-ignore-strategy) @@ -1630,6 +1634,10 @@ a prefix argument, then ask for TYPES." (run-with-timer 0.01 nil #'helm-projectile-grep-or-ack project-root t ignored helm-ack-grep-executable include))) +(make-obsolete 'helm-projectile-ack + "use `helm-projectile-rg' or `helm-projectile-ag' instead." + "1.7.0") + (defvar helm-projectile--ag-input nil "The value of input to be used in a next `helm-projectile-ag' call.") diff --git a/test/helm-projectile-test.el b/test/helm-projectile-test.el index dedd514..049da8e 100644 --- a/test/helm-projectile-test.el +++ b/test/helm-projectile-test.el @@ -381,6 +381,12 @@ (expect (helm-projectile-test--ag-command "ag" "--foo") :to-equal "ag --ignore TAGS --ignore build/ --foo %s %s %s"))) +(describe "helm-projectile-ack deprecation" + ;; ack is superseded by rg/ag and Projectile dropped `projectile-ack'; + ;; the command is kept working but marked obsolete. + (it "is marked obsolete" + (expect (get 'helm-projectile-ack 'byte-obsolete-info) :to-be-truthy))) + (describe "helm-projectile-ack" (before-each (spy-on 'projectile-project-root :and-return-value "/proj/")