Imagine selecting a paragraph and having ChatGPT automatically correct grammar and spelling errors, then seamlessly replacing it in your buffer. Well, imagine no more - it’s now a reality!
Here’s what it does:
- Selects the current paragraph in Emacs.
- Sends it to ChatGPT for a grammar and spelling check.
- Replaces the original text with the corrected version, all within Emacs.
Inception:
The other night I read a post on X that said LLMs would be used to enhance word prediction for texting on phones. I thought another interesting application would be to easily bring spelling and grammar fixes to whatever I’m editing in emacs.
It’s not flawless, but in my experience, it’s all I need.
Here’s a video example: https://youtu.be/hrhoNE2M9Qw
Here’s the gist: https://gist.github.com/ckopsa/c55bf8cc25df8a4a87c6993bdce3573e
Leverages chatgpt-shell found here: https://github.com/xenodium/chatgpt-shell
On most Chromebooks are very weak hardware. I don’t think it will work fast enough to be useful.