Closed notuntoward closed 2 years ago
Hey @notuntoward,
I think it might be related to overloading ispell-dictionary-alist
. Could you please try without these modifications and see if that works?
Also, does ~/.hunspell
exist? It might silently fail if that directory does not exist.
I actually never used hunspell
, maybe there is more sources of problems. I am using aspell
and it works flawlessly. Just for the record, this is my configuration.
(use-package ispell
:config
(setq ispell-dictionary "english"
ispell-program-name (executable-find "aspell"))
(when (equal (file-name-base ispell-program-name) "aspell")
(add-to-list 'ispell-extra-args "--sug-mode=ultra")))
(use-package flyspell
:defer t
:diminish flyspell-mode
:hook ((text-mode . flyspell-mode)
(prog-mode . flyspell-prog-mode)))
(use-package flyspell-correct
:defer t
:general
(leader-def
"[s" '(flyspell-correct-wrapper
:which-key "Spelling correction")))
And it stores personal dictionary in $HOME/.aspell.en.pws
by default.
Thanks for the reply. Yes, ~/.hunspell
exists, and flyspell_check
successfully uses the dictionaries installed there to correct spelling. It's just saving to the personal dictionaries that doesn't work. Too ba, because I'm having difficulty installing aspell on Windows.
However, aspell installation was easy, and a setup like yours does correctly save to a personal dictionary, both on Windows and MacOS,
So, this seems to be a hunspell problem.
Closed since it seems to be a hunspell problem, not one with flyspell_check.
@notuntoward
Hi there, i am also on windows and made it work so posting in case it will be helpful to someone. I did 2 things:
added ispell-personal-dictionary
variable where i want personal dictionary to be
(setq ispell-personal-dictionary "e:/Dropbox/Hunspell_en_US")
Manually created above file (empty). Without it after pressing "SAVE" Flyspell pop-up was saying that word is saved to personal dictionary but upon closing/opening buffer it marked it as incorrect again.
That's it.
Step 1 also can be achieved by passing "-p" in ispell-extra-args
. But i liked ispell-personal-dictionary
way better.
I'm using
flyspell-correct
andflyspell-correct-ivy
and I have a question: Should I expect the "Save" button to save to my personal dictionary?When I see that a word not in the default
hunspell
dictionary is marked as misspelled, I typeC-;
and thenM-o s
. After that, I see the squiggly misspelled error face disappear, along with a message in the mini-buffer, saying: "Personal dictionary saved."But if I kill emacs and reopen the org-file I was working on, the same word is, again, marked as misspelled.
I've already googled quite a bit, and have tried every suggested
hunspell
tweak, but saved words are still not saved.Here are the relevant parts of my config: