Hot answers tagged

21

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


18

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


11

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

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


7

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


6

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.


6

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

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


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


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


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

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) '(...


3

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 first correction it will go to the next occurrence and query you with the menu of query-replace-regexp. The most important menu choices are: ! replace all ...


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

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 argument contains the dictionary to use; the default is ‘ispell-alternate-dictionary’, overridden by ‘ispell-complete-word-dict’ if defined." Step 3, check ...


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)


2

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 than 1."


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

The trouble seems to be with ispell. I managed to get around it by using hunspell instead. Install Hunspell and its Norwegian dictionary sudo apt install hunspell hunspell-no Configure Emacs to use Hunspell for spell checking Set the variable Ispell program name to hunspell Use the Norwegian dictionary M-x ispell-change-dictionary then nb_NO


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


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