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

A simpler flyspell-correct-wrapper #82

Closed
gusbrs opened this issue Aug 30, 2020 · 2 comments
Closed

A simpler flyspell-correct-wrapper #82

gusbrs opened this issue Aug 30, 2020 · 2 comments

Comments

@gusbrs
Copy link
Contributor

gusbrs commented Aug 30, 2020

I've been using flyspell-correct-wrapper as my main spell-checking interface for some time, and though I like it very much, the way it uses up to three universal-arguments, with two different behavior dimensions at play (repetition and direction) does put some cognitive load into calling it. And I admit I end up usually refraining from calling it with arguments for this reason.

Since the inclusion of the ability to skip a word on demand, independently of having called flyspell-correct-wrapper with an argument (in #58 (comment)), the rapid-mode became much less important to me. When I want do do a longer spell-checking session, I go to the hydra #69 instead.

So I came up with a simpler flyspell-correct-wrapper, which takes up only one argument, and changes the direction with the argument. I'm using it in the form:

(defun flyspell-correct-once-wrapper (&optional arg)
  "Correct spelling error once in a dwim fashion.
One \\[universal-argument] changes direction of spelling errors search."
  (interactive "P")
  (when (or (not (mark t))
	    (/= (mark t) (point)))
    (push-mark (point) t))
  (flyspell-correct-move (point) arg))

which is, of course, just a simplified version of the current wrapper, and it does not enable rapid-mode.

A single binding, up to a single argument. And it solves 95% of my relevant cases, and for the other 5% I can fall-back to a more general command. The point, of course, is to reduce friction in the most common use case.

I'm still in the phase of "getting used to it", but I like it. And I thought it might also interest other users of flyspell-correct.

@d12frosted
Copy link
Owner

Hey @gusbrs

As always, thank you very much for your feedback!

the way it uses up to three universal-arguments, with two different behavior dimensions at play (repetition and direction) does put some cognitive load into calling it

Can't agree more! To be honest, the only times I use arguments - when I want to start rapid mode. Directions? I don't remember how it works.

hydra

I understand.

So I came up with a simpler flyspell-correct-wrapper, which takes up only one argument, and changes the direction with the argument. I'm using it in the form:

Thank you for sharing it :)

@gusbrs
Copy link
Contributor Author

gusbrs commented Sep 2, 2020

Can't agree more! To be honest, the only times I use arguments - when I want to start rapid mode. Directions? I don't remember how it works.

:-D

Well, thinking of it, this little function of mine is really just useful for those with the skip binding of #58 . I'm afraid I might be the only one. So I'll close this and leave this here "for the record" and for the reference of the more curious. ;-)

@gusbrs gusbrs closed this as completed Sep 2, 2020
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