From 3ac5d6d51a90e4fbdde15b6cda93ff0e02cd6dc6 Mon Sep 17 00:00:00 2001 From: Artem Smaznov Date: Tue, 21 Jun 2022 12:30:20 -0400 Subject: [PATCH] docs(spell): can't add word to personal dict Adding `Cannot add [word] to any active dictionary` error to the troubleshooting section. I have had this problem multiple times now when I break my emacs and wipe the `~/.config/emacs` directory and I can never remember what file to create to get my spell check working properly. Even though this is a bug and might be fixed in the future, I feel like having it documented can be helpful in the short term and in the future. Ref: #6246 --- modules/checkers/spell/README.org | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/modules/checkers/spell/README.org b/modules/checkers/spell/README.org index 73000581e..aeae5a7e3 100644 --- a/modules/checkers/spell/README.org +++ b/modules/checkers/spell/README.org @@ -208,6 +208,24 @@ installed, it will generate an empty word list, causing it to highlight all words as incorrect. Delete its cache files in =$EMACSDIR/.local/etc/spell-fu/= to fix this. +** Cannot add [word] to any active dictionary +*** Aspell +If ~M-x +spell/add-word~ results in the above error this mean that the +personal dictionary file was not created for some reason. This can be +fixed by creating the required file manually. +#+begin_example shell +mkdir -p ~/.emacs.d/.local/etc/ispell +echo personal_ws-1.1 en 0 > ~/.emacs.d/.local/etc/ispell/.pws +#+end_example + +Where ~personal_ws-1.1 en 0~ is the required header format for the personal +dictionary file. ~en~ is the language you're writing in and have a dict +installed and ~0~ is the number of added words in the dictionary. If you are +planning of updating the file with the list of words, update the number +accordingly. + +After the file is created, restart emacs and adding words should work. + * Frequently asked questions /This module has no FAQs yet./ [[doom-suggest-faq:][Ask one?]]