Skip to content

Add configuration for grep-edit-mode - #944

Open
hiecaq wants to merge 1 commit into
emacs-evil:masterfrom
hiecaq:grep-edit
Open

Add configuration for grep-edit-mode#944
hiecaq wants to merge 1 commit into
emacs-evil:masterfrom
hiecaq:grep-edit

Conversation

@hiecaq

@hiecaq hiecaq commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Brief summary of what the package does

grep-edit-mode is Emacs 31's built-in alternative to wgrep. Wgrep is more feature-complete, so I bind it as a fallback when wgrep is not available.

Direct link to the package repository

https://github.com/emacs-mirror/emacs/blob/emacs-31/lisp/progmodes/grep.el#L1125

Checklist

Assume you're working on mpc mode:

  • byte-compiles cleanly
  • M-x checkdoc is happy. Don't manually write (provide 'evil-collection-mpc), M-x checkdoc can do it automatically for you
  • define evil-collection-mpc-setup with defun
  • define evil-collection-mpc-mode-maps with defconst
  • All functions should start with evil-collection-mpc-


;; `wgrep' integration
(when (fboundp 'wgrep-setup)
(cond

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to use both wgrep and grep-edit-mode in the same emacs session?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically yes, they implement a similar grep-mode <-> editable grep-mode behavior. But I believe the reason most people installed wgrep is for this editing grep result feature, which precedes grep-edit-mode by far (as it implements atomic updates, could be reverted, etc). The most benefit of grep-edit-mode is that it's built-in, so I consider it as a fallback as for now.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets split them then. I use wgrep most with dired, not grep.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants