There are a few packages and libraries that are being built to use ChatGPT along with Emacs.
- Emacs OpenAI has a collection of packages for using ChatGPT and dall-e
- ChatGPT.el was one of the first, but hasn’t been updated to use the official API yet
- ChatGPT Shell is an
eshellfor ChatGPT and dall-e
- ChatGPT Arcana is a more integrated approach including prompt from region
- GPTel focuses on a chat client session within an Emacs buffer
- org-ai combines OpenAI whisper and GPT so you can talk to Emacs (also has a nifty
begin_aiblock for org-mode)
- leafy-mode adds completions to
Links to this note
Sometimes I want to see how many headings are in an org-mode file I’m working in. For example, I like to know the number of items I have to refile.
I use org-mode for taking notes and keeping track of tasks. I use Notion for work as an internal wiki.
I’m messing around with ChatGPT in Emacs and I want to capture the results of a session in org-mode. Since
chatgpt-shellis just a buffer (like everything else in emacs), we can write an elisp source block to grab the contents of buffer. Even better, we can tell org-mode to export the results as a markdown block since the code examples all use code fences (the triple backtick).