Spell Checking in Emacs
Spelling madness
Which spellchecker? aspell or hunspell
No doubt aspell gives better choices, while hunspell is quicker.
(defalias 'fm 'flyspell-mode) (defalias 'ss 'ispell-buffer) (use-package ispell :no-require t :config (setq ispell-dictionary "british") ;set the default dictionary (setq ispell-highlight-face (quote flyspell-incorrect)) (setq ispell-silently-savep t)) (use-package flyspell :defer t :init (add-hook 'message-mode-hook 'turn-on-flyspell) (add-hook 'org-mode-hook 'flyspell-mode) (defalias 'fm 'flyspell-mode))) ;; https://endlessparentheses.com/ispell-and-abbrev-the-perfect-auto-correct.html ;; Artur Malabarba (define-key ctl-x-map "\C-i" #'endless/ispell-word-then-abbrev) (defun endless/simple-get-word () (car-safe (save-excursion (ispell-get-word nil)))) (defun endless/ispell-word-then-abbrev (p) "Call `ispell-word', then create an abbrev for it. With prefix P, create local abbrev. Otherwise it will be global. If there's nothing wrong with the word at point, keep looking for a typo until the beginning of buffer. You can skip typos you don't want to fix with `SPC', and you can abort completely with `C-g'." (interactive "P") (let (bef aft) (save-excursion (while (if (setq bef (endless/simple-get-word)) ;; Word was corrected or used quit. (if (ispell-word nil 'quiet) nil ; End the loop. ;; Also end if we reach `bob'. (not (bobp))) ;; If there's no word at point, keep looking ;; until `bob'. (not (bobp))) (backward-word) (backward-char)) (setq aft (endless/simple-get-word))) (if (and aft bef (not (equal aft bef))) (let ((aft (downcase aft)) (bef (downcase bef))) (define-abbrev (if p local-abbrev-table global-abbrev-table) bef aft) (message "\"%s\" now expands to \"%s\" %sally" bef aft (if p "loc" "glob"))) (user-error "No typo at or before point"))))
Another option for minimalists
spell [filename] spell -b --dictionary=/home/red/.spell misspelled.txt aspell check [filename]