14

The inbuilt flyspell-auto-correct-previous-word works like a charm for me. I have bound it to F12 and I haven't looked back. It has consistently correctly words for me not matter how many words back the incorrect word was. From the function documentation: flyspell-auto-correct-previous-word is an interactive compiled Lisp function in `flyspell.el'. (...


12

;; NO spell check for embedded snippets (defadvice org-mode-flyspell-verify (after org-mode-flyspell-verify-hack activate) (let* ((rlt ad-return-value) (begin-regexp "^[ \t]*#\\+begin_\\(src\\|html\\|latex\\|example\\|quote\\)") (end-regexp "^[ \t]*#\\+end_\\(src\\|html\\|latex\\|example\\|quote\\)") (case-fold-search t) ...


10

After a bit of digging, I found a hint in [this Superuser.com answer: you need to set flyspell-mode-predicate to a function that will decide whether words should be checked or not. Here's a way to get Flyspell to ignore anything starting with "http" or "https": (defun flyspell-ignore-http-and-https () "Function used for `flyspell-generic-check-word-...


8

Yes, hunspell is THE spell-checker to use with emacs 26.1, as there's no windows binary of aspell 0.6 for the time being, and no one can foretell when there will be one. I tried hunspell this morning with emacs 26.1 on Windows 10 and it ran perfectly well. You will find some very useful tips on how to configure your .emacs file for hunspell here. Have a ...


7

Put this in your .emacs: (add-hook 'markdown-mode-hook 'flyspell-mode) It will enable flyspell-mode whenever markdown-mode is entered; i.e. when you open markdown files.


7

Sounds like you are being bitten by the fact that one command is bound to mouse-2, another command is bound to down-mouse-2, and the two commands do not play well together. Do C-h k and then click mouse-2 on text (e.g. mistaake). The help should tell you what mouse-2 and down-mouse-2 are bound to. If I'm right in my guess, you can try doing one of these ...


7

You can install aspell or hunspell with https://www.msys2.org/. MSYS2 has native binaries for aspell available which are compatible with Emacs 26.1. Note you can also install emacs using MSYS2 as well. After installing, MSYS2 MinGW 64-bit should be in your start menu. Launch that, which brings up a terminal, and search for packages using pacman -Ss aspell. ...


6

The accepted answer for org-mode is written by me. org-mode is tricky because its own check-word-predicate is already defined. markdown is simpler because it uses default predicate provided by flyspell-mode, (defun flyspell-generic-textmode-verify () "Used for `flyspell-generic-check-word-predicate' in text modes." ;; (point) is next char after the ...


6

I'm pretty sure other people will come up with different solutions that will be useful for future readers. However, here is how I currently handle this. I think flyspell-correct-word-before-point is a good place to start, because it at least can be invoked with key pressing and it displays menu of possible corrections. To fix the menu I've written package ...


6

Let me refer you to my post on this. I've found that abbrevs are the best way to do correction on SPC, you only need to define the corrections that you want. For that, I take the following approach: Add the code below to your init file. Whever you type something wrong, hit C-x C-i and choose one of the corrections offered. That's it! The correction will be ...


5

There are already some different ways to show ispell correction candidates, I guess you just meant correcting misspelled word in a popup menu, not company-mode itself. To correct misspelled word at point, both built-in M-$ (ispell-word) and C-c $ (flyspell-correct-word-before-point) works great, the former uses a buffer to show correction choices, while the ...


5

With helm-flyspell you can choose from the list of corrections efficiently. I use the following code to jump to the errors and correct them with it, it saves the position of the point to the mark-ring so you can jump back to the position where you started or corrected words previously: (defun flyspell-goto-previous-error (arg) "Go to arg previous spelling ...


5

Here's a quick trip down the flyspell source code rabbit hole. (Try C-h l flyspell to get to it.) flyspell-prog-mode uses flyspell-generic-progmode-verify. That function uses text properities to decide whether or not to fire based on whether or not the text property of the previous character is a member of flyspell-prog-text-faces. Now, the flyspell-prog-...


4

https://github.com/rolandwalker/flyspell-lazy Besides, you can turn off flyspell-mode completely and use M-x flyspell-buffer instead.


4

The patches (referred to below) were created by @lawlist from select portions of the Aquamacs: https://github.com/davidswelt/aquamacs-emacs To enable native spellchecking on OSX in the vanilla/generic version of Emacs, it is necessary to patch the C-source-code prior building, and a few lisp files also need to be modified. The patch is too big to post in ...


3

I use enchant in wcheck-mode, which lists "the" as the first suggested correction (though with wcheck you don't have to scroll through corrections to select the one you want, you just type the number or letter of the correction you want). For example, if I type the following: To be or not to be, that is hte question. and then M-x wcheck-actions with point ...


3

As mentioned before, you can try aspell. I've also tried hunspell, but I had the same problems as you. I found this answer. (if (file-exists-p "/usr/bin/aspell") (progn (setq ispell-program-name "aspell") (eval-after-load "ispell" '(progn (defun ispell-get-coding-system () 'utf-8)))))


3

The package name is flyspell instead of flyspell-mode, so the 1st argument of use-package is flyspell.


3

Ispell and flyspell are two packages. Setup of ispell has no effect on flyspell. (flyspell does use very limited ispell APIs but it should be invisible to users). In your case, "iostream" is checked because its font face is font-lock-string-face. By default, flyspell-prog-mode is used for any major-mode inherits from prog-mode (for example, c++-mode ...


3

You can temporarily disable message with the following advice for ispell-init-process. That is a general approach which also works for other functions emitting unwanted messages. (defun message-off-advice (oldfun &rest args) "Quiet down messages in adviced OLDFUN." (let ((message-off (make-symbol "message-off"))) (unwind-protect (progn ...


2

Here's a simple attempt: (defun my-flyspell-correct-on-space () (interactive) (when flyspell-mode (flyspell-auto-correct-word)) (self-insert-command 1)) (local-set-key " " 'my-flyspell-correct-on-space) It behaves strangely when you insert more than one space in a row, and sometimes it splits off part of the word being corrected. Thus this post ...


2

The error appears if you have an empty file or no file in place. You need at least a header line in your dictionary file. following the format personal_ws-1.1 lang num [encoding] like personal_ws-1.1 en 0 as described in aspell documentation See also:https://blog.samat.org/2008/11/02/creating-your-own-personal-aspell-dictionary/


2

Calling a (set (make-local-variable 'abbrev-file-name) 'My-current-abbrev-file) preceding this read-abbrev-file should help.


2

Thanks to chen bin, I have added a flyspell-generic-check-word-predicate function to Markdown mode. If you're using the latest development version, or use the next release version, then you won't have to use local modifications to achieve this. For those curious, perhaps to implement a predicate for another mode, the current function is below. It checks ...


2

It suffices to properly choose and trickily chain hooks. (add-hook 'text-mode-hook #'flyspell-mode) (add-hook 'flyspell-mode-hook #'flyspell-local-vars) (defun flyspell-local-vars () (add-hook 'hack-local-variables-hook #'flyspell-buffer)) text-mode-hook: executed by text major-modes hooks like those of all TeX variants, e.g. latex-mode-hook. flyspell-...


2

I compiled Emacs today (March 14, 2016) from git, version 25.1.50.1 for Windows 8.1, 64-bit. Run into the same issue. Found this answer by the indefatigable Eli Zaretskii and shortened the code for hunspell to this lines in my .emacs: (add-to-list 'exec-path "C:/cygwin64/usr/local/bin") (setq ispell-program-name (executable-find "hunspell")) (ispell-change-...


2

Insert below code into ~/.emacs or ~/.emacs.d/init, (setq ispell-program-name "hunspell") (setq ispell-local-dictionary "de_DE") (setq ispell-local-dictionary-alist '(("de_DE" "[[:alpha:]]" "[^[:alpha:]]" "[']" nil nil nil utf-8))) AFTER above setup, you need turn on flyspell-mode by (flyspell-mode 1). Please make sure your dictionary is loaded ...


2

The non-flying ispell-buffer will search the buffer for errors and then prompt for a correction when it finds one.


2

Flyspell is unfortunately slow and that is just life when using Emacs. The minor-mode does, however, have a few built-in optimizations that are customizable. The variables flyspell-default-deplacement-commands and flyspell-deplacement-commands are used to prevent flyspell from checking a word. Essentially, if this-command (the current command) is the same ...


2

Building upon lawlist's answer, I've applied the necessary changes for Emacs 26 (as of 7th April 2018). The patched source code can be found here: https://github.com/dangom/emacs/tree/ns-spellchecker


Only top voted, non community-wiki answers of a minimum length are eligible