Skip to content

Conversation

rgemulla
Copy link

guess-language rechecks a paragraph's language whenever an incorrect word is found and, if necessary, changes the language and reruns ispell. When quickly navigating through a buffer that uses many languages (such as large org files), these somewhat time-consuming process disrupts navigation.

This patch adds an option to run guess-language after a short idle delay, which fixes this problem. It also enables this option by default, using a short but sufficient idle delay.

@rgemulla
Copy link
Author

Addition: A main reason for the disruption when navigating fast seems to be that guess-language rechecks ALL paragraphs navigated over. This can be 10s of paragraphs, all in different languages, leading ultimately to a large blocking time. The patch avoids this by only checking the paragraph the point is in (and ignoring paragraphs "moved over"). The "run-with-idle-delay" that's currently used in guess-language is probably not needed anymore in case this patch is accepted, but it also doesn't hurt.

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

Successfully merging this pull request may close these issues.

1 participant