doomemacs / doomemacs/core

+spell/add-word does not create a personal dictionary file anymore

Open
#6,246 12 comments 13 reactions 0 assignees View on GitHub
:checkers spell is:bug
Dominant language
Emacs Lisp
Stars
22.7k
Forks
3.1k
Avg merge
10h 46m
Merged PRs (30d)
4

Description

### What did you expect to happen?

When I add a new word to my personal dictionary, Doom will create a personal dictionary file and `spell-fu` happily adds the word to this new dictionary file.

### What actually happened?

When I add a new word to my personal dictionary, spell-fu tells me
```
Cannot add "fooo" to any active dictionary.
```

### Describe your attempts to resolve the issue

I believe this is the current fix for the problem [modules/checkers/spell/config.el#L149-157](https://github.com/hlissner/doom-emacs/blob/master/modules/checkers/spell/config.el#L149-L157).

However, since https://gitlab.com/ideasman42/emacs-spell-fu/-/commit/00af362af3e4bb673cd08ed57df107296eaf6076,
`spell-fu-word-add` and `spell-fu-word-remove` no longer call `spell-fu--word-add-or-remove`. In fact, `spell-fu--word-add-or-remove` was removed entirely.

Now, `spell-fu-word-add` (and similarly `spell-fu-word-remove`) calls a function stored in the dictionary object itself: [spell-fu.el#l970](https://gitlab.com/ideasman42/emacs-spell-fu/-/blob/8185467b24f05bceb428a0e9909651ec083cc54e/spell-fu.el#L970), which comes from [spell-fu.el#L1414](https://gitlab.com/ideasman42/emacs-spell-fu/-/blob/8185467b24f05bceb428a0e9909651ec083cc54e/spell-fu.el#L1414).

I'm not sure if there is a real way to obtain the dictionary filename from the dict object, so I'm not sure if the same approach will work for a fix.

My current workaround is to directly run [modules/checkers/spell/config.el#L154-157](https://github.com/hlissner/doom-emacs/blob/2df6a2e28abd366193e9c5351ac98663077eaa9e/modules/checkers/spell/config.el#L154-L157) in my `config.el`.

### Steps to reproduce

1. Make sure the personal dictionary file does not exist yet
2. Open Emacs
3. Add fooo to the personal dictionary (`+spell/add-word`)

### System Information

https://pastebin.com/4niVxGwU

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.