Hot answers tagged

18

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 aspell) is used, where DICTNAME is the name of your default dictionary and LANG the two letter language code."


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


9

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 Emacs can't find ispell after you've installed it: $ which ispell will tell you the path to the ispell executable. Alternatively, aspell and hunspell are ...


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


5

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 first part of the docstring reads: (call-interactively FUNCTION &optional RECORD-FLAG KEYS) Call FUNCTION, providing args according to its interactive ...


5

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


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

I remember having this problem. It seems that hunspell picks up the language to use for spell-checking from the LANG environmental variable. It appears that the variable is set to 'ENG' in your emacs. What hunspell is saying is that it cannot find dictionaries associated with that language. You have two options either download the dictionaries that ...


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


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

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-enter a second time ispell just type M-x and up arrow (to list the command history). This is not a perfect replacement of the functionality you asked for but I ...


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

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

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

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


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

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-check-previous-highlighted-word to jump around.


2

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/


2

There's (M-x) ispell-buffer which checks entire buffer word by word and prompts on every misspelled word.


2

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)


1

The following is an adaption of ispell-word. It also allows to specify the dictionary for the spell checking of the string. (require 'ispell) (defun ispell-string (string &optional dictionary quietly) "Ispell STRING with DICTIONARY. DICTIONARY defaults to `ispell-local-dictionary' if that is set in the current buffer and to `ispell-dictionary' ...


1

See Hunspell flyspell and Emacs on windows Please figure out the version of hunspell you use. It supports either Windows style path or Unix style path but not both. Then setup environment variable DICTPATH properly.


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

Adding following to my initialisation file solved my problem: ;; aspell setup (setq ispell-russian-dictionary "russian" ispell-english-dictionary "english") (custom-set-variables ;; i like aspell, and you? '(ispell-program-name "aspell") ; my dictionary-alist, using for redefinition russian dictionary '(ispell-dictionary-alist '(("russian" ;; ...


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

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