26

As rvf0068 suggested, ispell can be configured to skip over regions that match regexes. For example, to skip over :PROPERTIES: and :LOGBOOK: drawers as well as SRC blocks, you could put this in your .emacs file: (add-to-list 'ispell-skip-region-alist '(":\\(PROPERTIES\\|LOGBOOK\\):" . ":END:")) (add-to-list 'ispell-skip-region-alist '("#\\+BEGIN_SRC" . "#\\...


16

Hunspell can spell check with multiple dictionaries, and you can configure this to work with Emacs. This is how I do it on OS X 10.11, with Emacs 25.0. It will not work with older Emacsen. Install Hunspell brew install hunspell Download Hunspell dictionaries from LibreOffice and OpenMedSpel. cd ~/Downloads/ curl http://extensions.libreoffice.org/...


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-...


10

For general purpose spell-checking, there are quite a few popular alternatives ispell and friends: Built into emacs & typically called with ispell-buffer. Checks spelling only on demand. flyspell-mode: Also built-in and provides on-the-fly spell checking and highlights mistakes. speck-mode: Available from MELPA, it checks the spelling of the word once ...


9

If you use flyspell instead, see How does one use flyspell in org buffers without flyspell triggering on tangled code blocks? Please note: ispell-skip-region-alist is NOT used by flyspell.


7

Quote from Emacs manual: 16.4 Checking and Correcting Spelling This section describes the commands to check the spelling of a single word or of a portion of a buffer. These commands only work if the spelling checker program Aspell, Ispell or Hunspell is installed. These programs are not part of Emacs, but one of them is usually installed in ...


7

You should use recursive-edit for this. Enter recursive-edit with C-r; make your changes to the buffer and then exit again with C-M-c. This is a general mechanism in emacs for escaping to make changes whilst you are in the middle of running a query replace type operation; this includes ispell.


6

@Vamsi's answer already covers general-purpose and selective spell-checking. But what about personalized auto-correction? @Malabarba has a nice post about this topic on his blog. The basic idea is to store pairs of misspelled words and appropriate corrections as Abbrevs. Here is (a slightly modified version of) the code that lets you do this easily: (defun ...


6

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-...


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 ...


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

You can use ispell-buffer-session-localwords for this purpose. In your .dir-locals.el, configure the variable for org-mode as follows: ((org-mode (ispell-buffer-session-localwords "my" "special" "words" "here")))


3

Honestly, I don't know if this is a good way to solve this issue, but it works (though fragile) and it shows a method that is applicable in other case. Test case (since the Young Grandfather (tYG) forgot to post one): (with-temp-buffer (setq ispell-program-name "hunspell") (switch-to-buffer (current-buffer)) (insert "speling") (ispell-word)) You ...


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

After several attempts, I found the following solution. The code uses the ideas from aspell - special characters and math mode and My .emacs (add-hook 'LaTeX-mode-hook '(lambda () (setq ispell-tex-skip-alists (list (append (car ispell-tex-skip-alists) '(...


2

@rasmus provided a nice programmatic solution. Here's another solution that is more interactive - it emulates what you manually do to clear the minibuffer when it's displayed with initial input: (add-hook 'minibuffer-setup-hook (lambda () (when (equal (minibuffer-prompt) "Replacement for: ") (delete-minibuffer-contents)))...


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

Suppose you already downloaded en_US-med.dic and en_US-med.aff and installed hunspell Step 1, run hunspell -D in shell, which will tell the directory where hunspell searches for dictionaries, copy en_US-med.dic and en_US-med.aff to that directory. Step 2, insert below code into ~/.emacs, (setq ispell-program-name "hunspell") ;; you could set `ispell-...


2

From the comments, Jordon Biondo has some proof-of-concept code at https://gist.github.com/jordonbiondo see in particular se-spell.el and elisp-checker.el.


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


1

Take these functions out for a spin and use M-x *-ispell-move-buffer-words-to-dir-locals: ;; Adapted from ispell.el:ispell-buffer-local-words (defun *-ispell-buffer-local-words-list () (let (words) (or ispell-buffer-local-name (setq ispell-buffer-local-name (buffer-name))) (save-excursion (goto-char (point-min)) (while (search-...


1

You can specify what flyspell-prog considers "text to be spelled" by customizing the flyspell-prog-text-faces variable: ;; original value: '(font-lock-string-face font-lock-comment-face font-lock-doc-face) (setq flyspell-prog-text-faces '(font-lock-comment-face font-lock-doc-face)


1

It’s a bug in Speck version 2014.08.30: The function speck-restore-options was missing support for Hunspell. I added a bug fix to speck.el on EmacsWiki. The new version is 2016.07.17. For testing I assigned to speck-hunspell-dictionary-alist: (("en" . "en_US") ("de" . "de_DE") ("es" . "es_ES")) Now the German dictionary can be set at the end of the file ...


1

Using Hunspell spellchecking program First of all, you should install hunspell and after that add Greek Dictionary sudo apt install hunspell Download and Add greek dictionary to Hunspell dictionaries' path cp el_GR.dic el_GR.aff /usr/share/hunspell Let's test Hunspell at terminal: hunspell -d el_GR and then mistype a greek word. Secondly, it be ...


1

Magit does not support this and I am not aware of any third-party support. Edit: in the comments on the question there is some talk about third-party support.


1

If I understand your question correctly this should solve it. The add-false-postive command jumps back to the previous error, adds it to the dict, cleans up and jumps back. (defun goto-previous-spelling-error () "Go to previous spelling error." (interactive) (push-mark (point) t nil) (let ((pos (point)) (min (point-min))) (while (and (&...


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