d12frosted / flyspell-correct

Distraction-free words correction with flyspell via selected interface.
Other
203 stars 14 forks source link

Add stop action to all interfaces #73

Closed d12frosted closed 4 years ago

d12frosted commented 4 years ago
WorldsEndless commented 4 years ago

Having stop on the option list is very useful to me (helm user here); thanks! It would be very nice if I had a shortcut for it (one of my sessions yesterday had me hurriedly replace some words with "stop" by accident, rather than actually stopping). Personally, I'd love it if C-g did stop instead of aborting the changes, but a different shortcut would be fine too.

d12frosted commented 4 years ago

one of my sessions yesterday had me hurriedly replace some words with "stop" by accident, rather than actually stopping

oh, doesn't sound pleasing :(

Personally, I'd love it if C-g did stop instead of aborting the changes, but a different shortcut would be fine too.

Wait, it doesn't abort any changes, it just restores your cursor position. And you still can reach the word which you abandoned by calling flyspell-correct-wrapper again. I find point restoration one of the main features of this wrapper/dwim function :) Since most of the interfaces (not sure about helm) allow to type any word (e.g. even if you mistyped frend, you can change that to mozzarella using the interface without stopping) I don't see how 'stop' command can be used that often. Unless you want to retype more than one word 🤔 So that's why it was only natural for me to make C-g restore the point.

Ok, enough with my reasoning. What I want to understand - how often do you need to stop at the point of the misspelled word and for what reasons? :) And how often do you rely on point restoration? I am asking because allowing to configure C-g might be a good solution.

WorldsEndless commented 4 years ago

My mistake -- it doesn't abort changes, but does reset cursor, as you mentioned. The usecase here is similar to that mentioned in other issues: sometimes the error needs several corrections in the area, not all of which are facilitated by flyspell-correct. I need this multiple times per spell-checking session, typically. Example string of corrections:

Johannas' thingg h appene dhere

(Johanna's thing happened here)

I would previous to this good library hit the first error, "dhere", C-g to stop, and press C-t to transpose the "d" character which hopped the space. This also occurs quite a bit with apostrophes, which are rarely handled nicely with hunspell. Also single-char, which might be skipped by the spellchecker. I often need to go change something around them.

d12frosted commented 4 years ago

Thanks for the explanations! I will take your use case into consideration. Not promising to get something fast, though :(