Drive the reviewable search/replace from the dispatch switches#2091
Merged
Conversation
The two reviewable-search entries (sR literal, sX regexp) collapse into a single sR that reads the --regexp switch, the same way --regexp already drives the ag/ripgrep search. A new --case-sensitive switch seeds the reviewable search/replace case-sensitive by binding case-fold-search around the call; both can still be flipped with x/c in the results buffer. Classic external-tool backends (grep/ag/rg) keep their own case handling and aren't touched here; whole-word matching is a separate follow-up.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of the search UX work. Wires the reviewable search/replace into the
projectile-dispatchModifiers.sRliteral,sXregexp) become a singlesR"search (review)" that reads the--regexpswitch, matching how--regexpalready drives the ag/ripgrep search. Same for theRreplace reviewer.--case-sensitiveswitch - seeds the reviewable search/replace case-sensitive by bindingcase-fold-searcharound the call. Both flags can still be toggled withx/cin the results buffer.Scope note: the classic external-tool backends (
grep/ag/rg) delegate to third-party Emacs packages with their own baked-in case handling (ag --ignore-case,rg -i, grep case-sensitive), so a uniform case switch there would be a fragile per-tool affair - they're intentionally left alone. Whole-word matching is a genuine new matching feature (elisp scan word-boundaries + rg-w+ a buffer toggle), so it's the next PR rather than bolted on here.903 specs green (5 new dispatch specs), clean
--warnings-as-errors, relint clean.