Malabarba / aggressive-indent-mode

Emacs minor mode that keeps your code always indented. More reliable than electric-indent-mode.
850 stars 36 forks source link

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

Open okamsn opened 2 years ago

okamsn commented 2 years ago

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 commented 2 years ago

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

okamsn commented 2 years ago

Done in #156.

Malabarba commented 2 years ago

Thanks! Let's see if it works.