4 ms·
On the topic of Emacs. I have long struggled to learn emacs and use it effectively. Just for the fun it, If I were to use claude as I my teacher, how can I ask
by orsenthil 5mo ago
On the topic of Emacs.
I have long struggled to learn emacs and use it effectively. Just for the fun it, If I were to use claude as I my teacher, how can I ask it to teach me to use Emacs? I don't like to ask questions and go back to try it. I want it to be a drive that will assist me with the usage. Has anyone tried such an approach to learn emacs?
- kstrauser 5mo agoThere's a nice built-in tutorial for actually editing text with it. Press control-h then t to launch it. But that's just for using the editor. For actually configuring it, I've found that Opus 4.6 (inside Droid) is exceptionally good at tweaking my init.el. Yesterday I typed "Set the default YAML indentation to 2 spaces." It came up with (use-package yaml-mode :defer t :config (setq yaml-indent-offset 2)) (add-hook 'yaml-ts-mode-hook (lambda () (require 'yaml-mode) (setq-local indent-line-function #'yaml-indent-line))) Now I can hit tab to indent YAML by 2 spaces, and I learned a little in the process. I'm delighted with this setup.
- orsenthil 5mo ago> I've found that Opus 4.6 (inside Droid) What does (inside Droid) mean ? Do you use any package to integrate to claude code in emacs?
- kstrauser 5mo agoDroid is my employer's alternative to Claude Code, which I personally prefer. But the general point is that LLMs are really good at Emacs Lisp these days. I've started using Droid inside Emacs via the agent-shell package I learned about here a few days ago (https://news.ycombinator.com/item?id=45561672 https://news.ycombinator.com/item?id=45561672). It handles quite a few other agents, too.
- kqr 5mo agoMy advice is to use a base, vanilla Emacs for a little while to learn where its boundaries go, before installing a bunch of modes. That makes it easier to troubleshoot problems later.
- iLemming 5mo agoDon't try to "learn Emacs". Grok the foundational layer - Lisp. Emacs is not an editor - it's first and foremost Lisp interpreter with a built-in editor. You need to get two things: REPL (evaluating Lisp expressions in-place) and structural editing (moving, expanding, transposing expressions). You can start with vanilla Emacs with zero config and Claude/Copilot/Codex/etc, running separately. Your first goal is to have the LLM running inside Emacs - ask the LLM how. It probably will recommend gptel - as one of the most popular and robust choices, go with it. Once you get LLM tools to modify Emacs state from within, you can just go crazy. You can tell it to change colors, fonts, ask any stupid questions, whatever. It will do it without losing a beat - no restarts, no waiting, no copy pasting - just flow.
- zingar 5mo agoHow do you have the “modify LLM state from within” working? I can have it modify my config but I don’t know how to get it to eval and improve arbitrary elisp.
- iLemming 5mo agogptel has the built-in tool to eval elisp, prompt the LLM to make changes in the active Emacs session and watch it do it.