Put the fix next to the doctor's diagnosis - #2133
Merged
Merged
Conversation
The doctor told you what was wrong and then described, in prose, what to type about it. Flycheck's verify buffer does better: a disabled checker renders with an [enable] button right there. Findings are plists now rather than (SEVERITY . MESSAGE) conses, so one can carry an action and a label for it. The four that Projectile can actually do something about get a button - enabling the mode, enabling caching, opening the dirconfig, editing .dir-locals.el - and pressing it regenerates the report, so the finding that prompted the action answers for itself. A missing fd still gets prose, because there's nothing to press. The button goes on its own line under the finding: findings run long, and at the end of one the button lands past the window edge where nobody would find it. The doctor also gained button navigation and a fold key, now that it has buttons worth moving between.
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.
The last idea from the prior-art dig in #2132. Flycheck's
verify-setuprendersa disabled checker as
(manually disabled) [enable]- the fix sits next to thediagnosis instead of being described in a sentence. The doctor was doing the
sentence version.
Findings become plists rather than
(SEVERITY . MESSAGE)conses, so one cancarry an action and a label. Four of them can be acted on:
projectile-modeis off ->[enable][enable caching]+keep entries ->[open dirconfig][edit .dir-locals.el]Pressing one runs it and regenerates the report, so the finding that prompted
the action visibly answers for itself. Findings Projectile can't do anything
about - a missing
fd, a missingrg- deliberately stay plain advice ratherthan growing a button that would only explain.
Two things came out of looking at it rendered rather than just tested:
invisible - findings are long and that's well past the window edge. It's on
its own indented line now.
M-x outline-toggle-childrenbecausenothing was bound to it. The doctor now binds
ffor that, andTAB/nformoving between the action buttons it has acquired.
Setting an option goes through
customize-set-variableand says it's for thissession unless saved, rather than quietly setting a variable the user would then
find mysteriously changed.