Hot answers tagged

28 votes
Accepted

In Emacs, where is ispell's personal dictionary stored?

C-h v ispell-personal-dictionary "File name of your personal spelling dictionary, or nil. If nil, the default personal dictionary, (\"~/.ispell_DICTNAME\" for ispell or \"~/.aspell.LANG.pws\" for ...
Lompik's user avatar
  • 1,214
21 votes
Accepted

Spell check with multiple dictionaries

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 ...
Divinenephron's user avatar
16 votes

Where is ispell?

This isn't an Emacs problem. You need to have the ispell program installed on your machine. ispell is available on homebrew, so you can do: $ brew install ispell That's probably all you need. If ...
Wilfred Hughes's user avatar
15 votes
Accepted

call interactive function from elisp code without worrying about arguments

If you want to call an interactive function from within elisp, but call it as if you invoked it interactively (e.g., via M-x some-command), you can wrap it in the call-interactively function. The ...
Dan's user avatar
  • 32.7k
7 votes
Accepted

What is the relationship between Emacs and various spellcheckers (ispell, etc.)?

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 ...
Arash Esbati's user avatar
  • 1,830
6 votes
Accepted

Automatically run ispell on magit COMMIT_MSG buffer

There is no need to hack anything - just add git-commit-turn-on-flyspell to git-commit-setup-hook. If you use the Custom interface to do so, then that is even one of the suggested functions for that ...
tarsius's user avatar
  • 25.3k
5 votes

how to install Aquamacs' OSX spellchecker (NSSpellChecker) in GNU Emacs?

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/...
lawlist's user avatar
  • 18.9k
5 votes

The format of ispell personal dictionary

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 ...
Crest's user avatar
  • 51
4 votes

How to move back to a previous typo in ispell?

You can temporary exit from ispell (not kill it) just hitting arrow keys. Then you can edit as you like or move back before the previous typo. To resume ispell just type M-x ispell-continue. to re-...
giuseppe's user avatar
4 votes

Spell check with multiple dictionaries

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 ...
chen bin's user avatar
  • 4,801
4 votes
Accepted

How to use an ispell dictionary in company mode?

You need provide a "plain word-list dictionary". Step 1, Check the code of company-ispell, it actually calls ispell-lookup-words. Step 2, check ispell-lookup-words documentation: "Optional second ...
chen bin's user avatar
  • 4,801
4 votes

Using company-ispell with large text dictionary?

It turns out the word list needs to be sorted (case insensitive), at least sorting it makes it work for me. Assuming you use company mode and have a shortcut to activate it. (use-package company :...
ideasman42's user avatar
  • 8,406
4 votes
Accepted

How can I replace all instances of a mispelled word during ispell?

If you switch on ispell-query-replace-choices by M-x customize-option ispell uses query-replace if it finds multiple occurrences of the miss-spelled word after you choose a replacement. After the ...
Tobias's user avatar
  • 32.6k
4 votes
Accepted

Marking as safe all possible lists of strings

C-hig (elisp)File Local Variables says: You can specify safe values for a variable with a ‘safe-local-variable’ property. The property has to be a function of one argument; any value is safe if the ...
phils's user avatar
  • 49k
3 votes
Accepted

How to quiet "Starting new Ispell process" on opening every file?

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-...
Tobias's user avatar
  • 32.6k
3 votes

Detect language in buffer

As for the first question, there is a package guess-language that you can use. See also this post by Manuel Uberti http://manuel-uberti.github.io/emacs/2017/02/04/guess-language/
andrej's user avatar
  • 983
3 votes
Accepted

Can I instruct ispell to insert LocalWords in a different file?

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"...
Sean Allred's user avatar
  • 6,851
3 votes

Error: No word lists can be found for the language "en_US"

Package aspell comes with Debian 11, but evidently lacks dictionaries. sudo apt-get install aspell-en Installs the English spelling dictionary for aspell.
Paul's user avatar
  • 183
3 votes

Ispell + Hunspell recognizes everything after the apostrophe a different word

This can stem from using Unicode apostrophes (U+2019, ’) instead of ASCII single quotes ('), which certain Emacs major/minor modes might substitute automatically. Have a look at http://www....
Ryan Riegel's user avatar
3 votes
Accepted

flyspell and ispell give too many spelling suggestions

Emacs is invoking aspell as: aspell -a -m -B --encoding=utf-8 -a is “pipe mode”. Given this information, I can reproduce the behavior in the terminal: $ echo dbux | aspell -a -m -B --encoding=utf-8 @(...
Reid's user avatar
  • 161
3 votes
Accepted

Changing language with ispell

When you run ispell, Emacs actually calls an external program that usually requires additional dictionaries to be installed separately. One such program you can use (which is well established and ...
Arch Stanton's user avatar
  • 1,555
2 votes

Pure elisp spell checking in Emacs

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 votes

How to move back to a previous typo in ispell?

No, ispell just works in batch mode AFAICT. I recommend using the built-in flyspell. This will give you on-the-fly feedback and provide commands like flyspell-check-next-higlighted-word and flyspell-...
expez's user avatar
  • 381
2 votes

how to install Aquamacs' OSX spellchecker (NSSpellChecker) in GNU Emacs?

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-...
Daniel's user avatar
  • 3,563
2 votes
Accepted

Setting a new location for ispell/aspell dictionaries

Create and customize the aspell.conf in the ../etc directory of the root directory where aspell is installed. Inside the aspell.conf file, set the home-dir /desired/path/here. And, spelling ...
lawlist's user avatar
  • 18.9k
2 votes
Accepted

Creating a macro to change dictionary and run ispell

Maybe something like this: (defun change-dict-and-ispell () (interactive) (ispell-change-dictionary "en_GB") (ispell-message)) (global-set-key (kbd "C-c s e") 'change-dict-and-ispell)
StarBug's user avatar
  • 479
2 votes
Accepted

Ispell suggested word window too small

Customize the variable ispell-choices-win-default-height, which has a default value of 2. The doc-string states: "The default size of the `*Choices*' window, including the mode line. Must be greater ...
lawlist's user avatar
  • 18.9k
2 votes

Flyspell and Ispell find different incorrect words

Flyspell tries to respect Ispell as much as possible (e.g., ispell-program-name and ispell-dictionary), but does not use the functionalities exposed by Ispell to do the spell checking. ispell-buffer ...
d125q's user avatar
  • 1,433
1 vote

Where is ispell private dictionary located on Spacemacs?

First, look at the variable ispell-personal-dictionary. If itʼs set, thatʼs your answer. Next, look at the variable ispell-program-name. This is the spell-checking backend that Emacs is currently ...
mavit's user avatar
  • 211

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