Welcome to the world of org-ai, a minor mode for Emacs that transforms your writing and coding experience by tapping into generative AI models. Whether you’re looking to generate eye-popping images with DALL-E or engage your thoughts with ChatGPT, this guide will walk you through everything you need to know.
Table of Contents
Demos
Before diving in, let’s see what’s possible:
ChatGPT in org-mode
org#+begin_ai
Is Emacs the greatest editor?
#+end_ai
With this block, you can generate responses to your questions using ChatGPT directly within your Emacs setup.
DALL-E in org-mode
org#+begin_ai :image :size 1024x1024
Hyper realistic sci-fi rendering of a super complicated technical machine.
#+end_ai
Generate stunning images just by typing a prompt!
Image Variations
Want variations of an already generated image? Simply use the command provided and watch the magic happen.
Features and Usage
org-ai harnesses the power of AI within your org-mode buffer through specialized blocks. Here’s how to make the most of it:
Special Blocks
The following syntax allows you to interact with AI models:
org#+begin_ai
Your AI prompt here
#+end_ai
Each block defines the roles and interactions with the AI. You can customize these blocks for text, image generation, and other commands.
Analogy: The AI Chat Room
Think of each #+begin_ai...#+end_ai block as your own chat room with the AI. When you enter a prompt, it’s like sending a message to the AI, and when it replies, it’s as if the AI is sharing its insights within the same chat room—keeping the context intact. Each new message you send can evolve from the previous one, allowing for a fluid and dynamic conversation.
Global Commands
Beyond just org-mode, many commands can be run globally:
C-c M-a r– Prompt the AI using selected text.C-c M-a s– Summarize the selected text.C-c M-a p– Run prompts across multiple files.
Installation
Here’s how to get the org-ai up and running:
- Add to your package archives in Emacs:
(add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/") t) - Install the package:
(package-install 'org-ai) - Set up your API keys following the guidelines in the README.
FAQ
If you have questions like “Is this OpenAI specific?” or “How can I use local models?” you’ll find answers scattered throughout this guide.
Troubleshooting
Here are some common issues and solutions:
- Problem: I can’t generate texts or images.
- Solution: Ensure that you have set your API keys correctly. Review the installation guide for OpenAI or Azure configurations.
- Problem: The AI isn’t responding properly.
- Solution: Check your input format and syntax, especially your prompts within the
#+begin_aiblocks. - Problem: Speech input/output isn’t working.
- Solution: Follow the detailed instructions for setting up speech recognition tools like Whisper or greader. Make sure your dependencies are correctly installed.
For more insights, updates, or to collaborate on AI development projects, stay connected with fxis.ai.
Conclusion
At fxis.ai, we believe that such advancements are crucial for the future of AI, as they enable more comprehensive and effective solutions. Our team is continually exploring new methodologies to push the envelope in artificial intelligence, ensuring that our clients benefit from the latest technological innovations.
Ready to unleash the power of AI in your workflows? Dive into org-ai and let your creativity soar!

