You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 1b59e35
Browse filesBrowse the repository at this point in the historyBrowse files
Deprecate projectile-ag and the ripgrep.el path of projectile-ripgrep
The Silver Searcher has had no commits since 2020 and ag.el is archived,
as is ripgrep.el. projectile-ag, the ag search backend and the
ripgrep.el branch of projectile-ripgrep keep working until 4.0, and
each says once per session that it is going away and what to use
instead.
The command keeps its key, dispatch entry and menu item for the same
period, hence the two suppressed obsolete warnings.
Copy file name to clipboardExpand all lines: CHANGELOG.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,6 +23,9 @@
23
23
24
24
### Changes
25
25
26
+
-[#2205](https://github.com/bbatsov/projectile/pull/2205): Deprecate `projectile-ag` and the `ag` search backend, to be removed in Projectile 4.0. The Silver Searcher has not been developed since 2020 and the `ag` package is archived; `projectile-ripgrep` and `projectile-search-review` take its place.
27
+
- Running `projectile-ripgrep` through the archived `ripgrep` package is deprecated as well, in favour of the `rg` package.
28
+
- Each warns once per session when used.
26
29
-[#2205](https://github.com/bbatsov/projectile/pull/2205): `projectile-ripgrep` now uses the `rg` package when both `rg` and `ripgrep` are installed, instead of the other way around. `ripgrep` was archived by its author in 2022.
27
30
-[#2205](https://github.com/bbatsov/projectile/pull/2205): `projectile-replace` and the replace reviewer no longer use `ag` to narrow down the files to look at; `rg`, `git grep` and `grep` do that now.
28
31
-[#2204](https://github.com/bbatsov/projectile/pull/2204): `projectile-replace` and the replace reviewer no longer use `ack` to narrow down the files to look at. It was only ever reached with `ack` installed and neither `rg` nor `ag`, where `git grep` or `grep` now do the same job.
Copy file name to clipboardExpand all lines: doc/modules/ROOT/pages/cheatsheet.adoc
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -89,11 +89,11 @@ Here's a list of the interactive Emacs Lisp functions, provided by Projectile:
89
89
90
90
| kbd:[s-p s r]
91
91
| `projectile-ripgrep`
92
-
| Runs `rg` (`ripgrep`) on the project, performing a literal search. Requires the presence of `rg.el`or `ripgrep.el`. With a prefix argument it will perform a regex search.
92
+
| Runs `rg` (`ripgrep`) on the project, performing a literal search. Requires the presence of `rg.el`(the archived `ripgrep.el` still works, but support for it is deprecated). With a prefix argument it will perform a regex search.
93
93
94
94
| kbd:[s-p s a]
95
95
| `projectile-ag`
96
-
| Runs `ag` (`the_silver_searcher`) on the project, performing a literal search. Requires the presence of `ag.el`. With a prefix argument it will perform a regex search.
96
+
| Runs `ag` (`the_silver_searcher`) on the project, performing a literal search. Requires the presence of `ag.el`. With a prefix argument it will perform a regex search. Deprecated: `ag` is no longer maintained, and the command will be removed in Projectile 4.0.
Copy file name to clipboardExpand all lines: doc/modules/ROOT/pages/index.adoc
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -47,7 +47,7 @@ Here are some of Projectile's features in no particular order:
47
47
* kill (close) all project buffers
48
48
* xref:usage.adoc#reviewing-and-applying-replacements[replace in project], with a reviewable before/after preview
49
49
* multi-occur in project buffers
50
-
* xref:usage.adoc#reviewing-search-matches[grep (search) in project] (multiple back-ends like `ag`, `rg`, and a native reviewable results UI)
50
+
* xref:usage.adoc#reviewing-search-matches[grep (search) in project] (back-ends like `grep` and `rg`, and a native reviewable results UI)
51
51
* find references in project (using `xref` internally)
52
52
* visit project in `dired`
53
53
* run xref:tasks.adoc#project-tasks[project commands and tasks] (build/test/run, your own named tasks, and the npm scripts, Make targets and justfile recipes a project already defines)
recommended to install https://github.com/BurntSushi/ripgrep[rg] (`ripgrep`).
202
201
203
-
TIP: You should also install the Emacs packages `ag`, `ripgrep` or `rg` if you want to make use of Projectile's commands `projectile-ag` and `projectile-ripgrep`.
202
+
TIP: `projectile-ripgrep` also needs the Emacs package `rg`. The reviewable search talks to `rg` directly and needs no package.
"Run an `ag' search for SEARCH-TERM in the project.
8667
8678
When REGEXP is non-nil, SEARCH-TERM is treated as a regular expression.
8668
-
Requires the `ag' Emacs package."
8679
+
Requires the `ag' Emacs package.
8680
+
8681
+
Deprecated: neither The Silver Searcher nor the `ag' package is
8682
+
maintained any longer, and this backend goes away in Projectile 4.0."
8669
8683
(unless (require 'ag nil 'noerror)
8670
8684
(user-error "Package `ag' is not available"))
8685
+
(projectile--warn-deprecated
8686
+
'ag
8687
+
"The ag search backend is deprecated and will be removed in Projectile 4.0: The Silver Searcher and the `ag' package are no longer maintained. Use `projectile-ripgrep' or `projectile-search-review' instead.")
8671
8688
(let ((ag-command (if regexp 'ag-regexp 'ag))
8672
8689
(ag-ignore-list (delq nil
8673
8690
(seq-uniq
@@ -8711,7 +8728,8 @@ alone."
8711
8728
When REGEXP is non-nil, SEARCH-TERM is treated as a regular expression.
8712
8729
Requires the `rg' Emacs package, or failing that the `ripgrep' one.
8713
8730
`rg' comes first when both are installed: it is the maintained one of
8714
-
the two, `ripgrep' having been archived by its author."
8731
+
the two, `ripgrep' having been archived by its author. Support for
8732
+
`ripgrep' is deprecated and goes away in Projectile 4.0."
8715
8733
;; we rely on the external packages rg and ripgrep for the actual search
8716
8734
(cond ((require 'rg nil 'noerror)
8717
8735
(rg-run search-term
@@ -8722,6 +8740,9 @@ the two, `ripgrep' having been archived by its author."
8722
8740
;; `rg' quotes these itself
8723
8741
(projectile--ripgrep-ignore-globs)))
8724
8742
((require 'ripgrep nil 'noerror)
8743
+
(projectile--warn-deprecated
8744
+
'ripgrep
8745
+
"Support for the `ripgrep' package is deprecated and will be removed in Projectile 4.0: the package has been archived. Install the `rg' package and `projectile-ripgrep' will use that instead.")
8725
8746
;; `ripgrep' runs its command line through the shell, so quote
0 commit comments