I want to log to a file the ispell replacements that get made (whether manual r
, or from a list 0
...)
Every time a "correction" is made, there are two words that are relevant:
- The word that ispell identifies as incorrect.
- The word that ends up in its place. [maybe
""
when its skipped]
I just want to log these pairs to a file for "analysis" (and possibly flashcards)
I am still browsing code to see if there is a place to wedge this in. I see ispell-update-post-hook
used in ispell-command-loop
but I'm not sure if that's what I want. I also am not sure how I'd both get the above pair of words and write them to a file, as the hook doesn't (elisp ignorance?) seem to provide access.
This code does what you've requested. It does not check for duplicates in the file that's generated, it simply appends to the existing file.
Tested with Emacs 27.2.