2

My Spacemacs help ispell-personal-dictionary says:

ispell-personal-dictionary is a variable defined in ‘ispell.el’.
Its value is nil

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

But there is no "~/.ispell_DICTNAME" or "~/.aspell_DICTNAME" on my system:

$ ls -A .isp*
ls: cannot access '.isp*': No such file or directory
$ ls -A .asp*
ls: cannot access '.asp*': No such file or directory

ispell is working and I accidentaly added a misspelled word to it. Now I want to remove the entry from my ispell private dictionary.

How to find the ispell private dictionary location?

System Info :computer:
  • OS: gnu/linux
  • Emacs: 25.3.1
  • Spacemacs: 0.200.10
  • Spacemacs branch: master (rev. 4bb4cb46)
  • Graphic display: t
  • Distribution: spacemacs
  • Editing style: vim
  • Completion: ivy
  • Layers: elisp (c-c++ emacs-lisp evil-snipe git ivy org shell spell-checking)
  • System configuration features: XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND DBUS GCONF GSETTINGS NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 MODULES XWIDGETS

UPDATE 1:

aspell doesn't seem to be on my system:

$ aspell -h
bash: aspell: command not found.

UPDATE 2:

I found aspell, but it's unresponsive:

$ pwd
/usr/share/bash-completion/completions
$ ls aspell
aspell
$ aspell --lang=en dump config
bash: aspell: command not found...
Install package 'aspell' to provide command 'aspell'? [N/y] n
$ aspell -h
bash: aspell: command not found.
$ sudo ./aspell -h
sudo: ./aspell: command not found

UPDATE 3:

To uninstall aspell, I commented spell-checking in ~/.spacemacs, and restarted Emacs.

Then I reinstalled as described in https://github.com/syl20bnr/spacemacs/tree/master/layers/+checkers/spell-checking#install and restarted Emacs again. Emacs opening page said:

Found 3 new package(s) to install...
--> refreshing package archive: melpa-stable... [2/2]
--> installing package: flyspell-correct-ivy@spell-checking... [3/3]

Still have same result with absolute path:

$ sudo /usr/share/bash-completion/completions/aspell -h
sudo: /usr/share/bash-completion/completions/aspell: command not found

UPDATE 4:

From Spacemacs help - SPC SPC h d v ispell-program-name:

ispell-program-name is a variable defined in ‘ispell.el’.
Its value is "/usr/bin/hunspell"

From command line:

$ hunspell -v
@(#) International Ispell Version 3.2.06 (but really Hunspell 1.5.4)
$ hunspell -h

I googled: emacs private dictionary location

Still not finding the location of my private dictionary.

8
  • This is not a spacemacs thing-a-majig. It is an aspell configuration setting, which can be changed with aspell.conf. To dump the current configuration, open the terminal and type: aspell --lang=en dump config or use the absolute path if so desired: /path/to/aspell --lang=en dump config. Dumping the configuration will tell you where the aspell.conf needs to go, and there are several threads on Google with sample settings.
    – lawlist
    Commented Mar 23, 2018 at 21:18
  • @lawlist, aspell doesn't seem to be on my system (see UPDATE 1 at end of question).
    – wolfv
    Commented Mar 24, 2018 at 4:08
  • 1
    If you have searched your hard drive and cannot locate aspell, then you will need to install it if that is the utility you wish to use in conjunction with flyspell / ispell in Emacs. Emacs does not come with the utility known as aspell. Be aware that some people may prefer hunspell over aspell ... See this helpful blog: blog.binchen.org/posts/… See also this related thread for users of OSX: stackoverflow.com/questions/19022015/…
    – lawlist
    Commented Mar 24, 2018 at 5:18
  • @lawlist, I found aspell but it's unresponsive (see UPDATE 2 at end of question).
    – wolfv
    Commented Mar 24, 2018 at 8:14
  • It appears as though you may need to learn, by Googling and reading, how to add a program to your $PATH and depending upon the platform that Emacs is being used, it will be necessary to set the $PATH within Emacs also (e.g., Emacs for OSX does not automatically use the system $PATH). If you do not wish to play around with setting the $PATH for certain utilities, you can always use the absolute path. See the first comment above of what this looks like. If aspell is broken somehow, then you may need to reinstall it -- using the absolute path should be sufficient if it is working.
    – lawlist
    Commented Mar 24, 2018 at 16:09

3 Answers 3

1

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 using, and each backend will store your private dictionary in a different place:

  • Aspell: ~/.aspell.??.pws
  • Enchant: ~/.config/enchant/*.dic
  • Hunspell: ~/.hunspell_*

In each case, the exact file used will vary based on the language youʼre using.

0

I never found the Emacs private dictionary on Debian 9. But when I installed Fedora 28, it was easily found at ~/.hunspell_en_US

0

On my Ubuntu system, it's located at ~/.aspell.en.pws

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.