reddit / emacs

Overwhelming spellchecking

wWA5RnA4n2P3w2WvfHq · 2022-08-11 12:38
Puh, I tried to understand spell checking in Emacs and got overwhelmed by the possibilities I can find on the internet. I don't know what to choose. After reading around I can define this minimals. - Spellchecking of by default. - shortcut for toggeling on/off - Switching between languages English and German - Choose between suggested corrections - Save "new" words As and addon it would be nice but doesn't have to: - Use German and English in the same buffer at the same time - Spell check docstrings in Python code Sidenote: I am not sure if this is relevant but in Python I use eglot as LSP which checks my code (via flycheck8 or flymake8 or something with fly...). Sidenote2: In some web source I saw that ivy and custom also are relevant here. I use both of them in my init.el. Sidenote3: 95% of time I use Emacs in terminal via SSH and not in gui mode.
_viz_ · 2022-08-11 14:09
Spell checking should just work as long as you have a spell checker and the dictionaries installed. Emacs automatically picks the dictionary based on your locale. If you want on-the-fly spell checking, then use flyspell-mode. If you prefer to check the spell explicitly, then M-$ does the job. M-$ interface can also save the word to your personal dictionary. Personally I turn on flyspell and use a function to invoke ispell (M-$) on the last misspelt word. As for combining dictionaries, I did what this article does https://200ok.ch/posts/2020-08-22_setting_up_spell_checking_with_multiple_dictionaries.html. For programming languages, use flyspell-prog-mode.
wWA5RnA4n2P3w2WvfHq · 2022-08-11 18:06
ispell or flyspell? What is the difference?
Soupeeee · 2022-08-11 20:27
flyspell checks for mistakes *on the fly* (as you type), which is where the name comes from. ispell only makes checks when you specifically ask for them. ispell is also the tool that provides suggested fixes, while flyspell just detects errors. So after turning flyspell on, you will see squiggly lines underneath words that are spelled incorrectly, but to actually fix them, you either call `ispell` to run spellcheck on the whole buffer, or word by word by moving the point to the word and running `ispell-word`.