Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Protecting anzu-query-replace and anzu-query-replace-regexp #155

Open
okamsn opened this issue Aug 15, 2022 · 3 comments
Open

Protecting anzu-query-replace and anzu-query-replace-regexp #155

okamsn opened this issue Aug 15, 2022 · 3 comments

Comments

@okamsn
Copy link
Contributor

okamsn commented Aug 15, 2022

Anzu is a package to preview replacements in the buffer before finalizing the input. It breaks if Aggressive Indent moves text while the replacement is running. It seems that because of how Anzu reads text from the minibuffer, Agressive Indent sees this-command as exit-minibuffer instead of anzu-query-replace.

Adding exit-minibuffer to aggressive-indent-protected-current-commands seems to correctly prevent indentation so that Anzu can correctly replace the text, but I don't know whether that would break anything else.

@Malabarba
Copy link
Owner

Adding exit-minibuffer seems safe enough. At most, it'll make the package a little bit less aggressive.
Care to make a PR?

okamsn added a commit to okamsn/aggressive-indent-mode that referenced this issue Aug 15, 2022
This prevents indentation while running `anzu-query-replace` and
`anzu-query-replace-regexp`, for which `last-command` is `exit-minibuffer` after
reading text from the minibuffer.  See Malabarba#155.
@okamsn
Copy link
Contributor Author

okamsn commented Aug 15, 2022

Done in #156.

@Malabarba
Copy link
Owner

Thanks! Let's see if it works.

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

No branches or pull requests

2 participants