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" . "#\\...
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.
brew install hunspell
Download Hunspell dictionaries from LibreOffice and OpenMedSpel.
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-...
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 ...
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 ...
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.
@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:
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-...
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 ...
The patches (referred to below) were created by @lawlist from select portions of the Aquamacs:
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 ...
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):
(setq ispell-program-name "hunspell")
You can use ispell-buffer-session-localwords for this purpose. In your .dir-locals.el, configure the variable for org-mode as follows:
"my" "special" "words" "here")))
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 ...
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")
(setq ispell-program-name "aspell")
'(progn (defun ispell-get-coding-system () 'utf-8)))))
After several attempts, I found the following solution. The code uses the ideas from aspell - special characters and math mode and My .emacs
@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:
(when (equal (minibuffer-prompt) "Replacement for: ")
I compiled Emacs today (March 14, 2016) from git, version 18.104.22.168 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"))
Insert below code into ~/.emacs or ~/.emacs.d/init,
(setq ispell-program-name "hunspell")
(setq ispell-local-dictionary "de_DE")
'(("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 ...
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 ...
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-...
There's a variable called ispell-dictionary, whose docstring you can see with C-h v ispell-dictionary (note that you can use completion there, so this is a way to find variables named ispell-something).
ispell-dictionary is a variable defined in ‘ispell.el’.
Its value is "francais"
Original value was nil
Default dictionary to use ...
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 ()
(setq ispell-buffer-local-name (buffer-name)))
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)
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 ...
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."
(push-mark (point) t nil)
(let ((pos (point))
(while (and (&...