Skip to content

[Feature Request] More friendly auto-correct features #21

@jimeh

Description

@jimeh

Update: I've achieved the goal of this feature request with a custom package called rubocopfmt. I will leave this issue open for others to see until @bbatsov feels it's appropriate to close it.


So due my lack of elisp skills, I have a badly hacked together set of tweaks to rubocop-mode that nearly makes the auto-correct stuff work the way I want: siren-rubocop.el

I'd love for something like these features to be available in rubocop-mode itself. The key features I'm after are:

  • Ability to automatically run auto-correct against current file on save, and have the local buffer update/revert instantly while retaining undo history.
  • Ability to trigger auto-correct for current file without the compile buffer opening. The compile buffer is annoying when auto-correcting on save, or if you manually want to quickly just auto-correct stuff and don't care for rubocop's output.
  • A way to turn auto-correct on save on/off. Maybe even with a minor-mode so it can easily be toggled on the fly rather than via a customizable variable.

As for my own hack, the only thing that's not working correctly is the instant revert/update when you run auto-correct. As far as I can figure I'm guessing compilation-start is async so the revert-buffer call fires after emacs has saved the file, but before rubocop has auto-corrected it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions