Live data from Hacker News

Claude Code IDE integration for Emacs

github.com

151–160 of 281 posts

Re: Claude Code IDE integration for Emacs

#151

I wonder if this can work with OpenCode (Claude Code fork which allows for other model providers: https://github.com/sst/opencode )? I really don't like being tied to a particular provider or model, switching models has been really helpful to get past blocks and save money (especially with Deepseek!). And, of course, I need to use Github Copilot's Open AI-compatile API at work...

Note that there are several projects on GitHub that let you proxy an openai compatible server and set it as ANTHROPIC_BASE_URL

Got some good success with GLM-4.5-Air running locally recently. Still mainly using claude code max though.

Re: Claude Code IDE integration for Emacs

#152

This is great, and I need it and will use it, but what I need even more is some kind of integration with org mode (or just note taking generally). I found out the hard way that github/copilot deletes conversations after 30 days! So much for building a knowledge base with an AI assistant! I really need something a bit like Goog's `notebookllm` for capturing research, except I'd like to control it locally.

Try gptel-mode - your chats are in org buffers, and you can save/restore sessions easily. Also plays nicely with mcp.el for more tooling access.

gptel-mode (I have it at C-c L) is great!

Re: Claude Code IDE integration for Emacs

#154
post #149

Earlier quoted context omitted.

Sure. I'm experimenting like everyone else, but I mostly use gptel as the primary interaction surface and Claude Code for a range of refactorings and other "more than mechanical, less than creative" edits. Both of these are very (!!!) well complimented by magit, which is so good at AI supervision it seems designed for it, by a genius. For Claude Code I'm rapidly switching anything I want "vibe coded" into Hadkell for…

Share your dotemacs/gptel config? I'm not in love with emacs eider integration. Wondering how to put direct editing/control to the model. Still very cludgy with gptel though I've been using it for months

This is the fairly "cut down" one I alluded to without my mixed-results heavyweight AI integration stuff, this is like a gist of my open dev box session so it's got random shit commented out and stuff, but I think most people's config looks like that point in time:

https://gist.github.com/b7r6/84c6ab80c0b8bd5267b8c436e4d00a8...

https://gist.github.com/b7r6/23cfacbf181c9b0447841c798345a79...

The AI stuff doesn't work without this running:

https://gist.github.com/b7r6/449faab9b5be00867f2e8053c610bdb...

That lets me publish my API vendor keys without issues:

https://gist.github.com/b7r6/fe96bd0cc37d72c1991d84d1984371b...

Re: Claude Code IDE integration for Emacs

#155

I'm really glad that emacs is integrating modern tooling like LSP and tree-sitter, now Claude Code, but this approach is showing its age. I'm an emacs user of 20 years and honestly it's getting hard to configure everything these days. Claude Code before the IDE integration was actually the easiest thing to get working (since it just worked and then auto-revert-mode keeps my buffers in sync.) I'm on a new MacOS instal…

> I'm curious what emacs users are doing these days.

Using Emacs for pretty much everything. Org (w/ babel) for most of my notes, blogs, presentations and todo lists. Magit for everything git. Gnus for keeping up with the linux kernel mailing list firehose. LSPs for C, Python, Go, Rust. Tide for typescript. I use aider and aidermacs for my AI pair programming. Haven't tried Claude Code yet but it's on my todo list because everyone raves about it. I even use mastodon.el, and Circe for IRC.

I use macOS native emacs built from source, currently 31.0.50. The largest project I work with is the Linux kernel which I edit remotely using Magit and LSP over TRAMP.

Re: Claude Code IDE integration for Emacs

#156

Earlier quoted context omitted.

> Should I be learning how to debug elisp better to understand how the commands interact with my environment? Hell yeah, you should. I just don't understand how the heck people would claim to be using Emacs for decades and still not knowing how to use the built-in profiler, edebug, apropos, macro expansion, advising system, indirect buffers, etc. They would complain how "fickle" Emacs is, without even realizing that…

> Hell yeah, you should. I just don't understand how the heck people would claim to be using Emacs for decades and still not knowing how to use the built-in profiler, edebug, apropos, macro expansion, advising system, indirect buffers, etc. Yes I'm familiar with apropos, macros/extensions, advising, indirect buffers, and a lot of stuff. I've just never debugged elisp mostly because I haven't had a hard time just iter…

> Maintaining an emacs config has always been quite annoying

I dunno, I feel it stopped being like that for me long ago. Perhaps I'm just a "tinkerer" and maybe I never even minded improving my setup. But like I said, at some point, my workflow has become purely "goal-oriented" - whenever I see a problem, I either:

- Make a todo list item and forget about it until next time

- Or start writing some Elisp (if the problem is simple enough)

Let me share some practical examples of each.

One day I got annoyed that it was taking me more than a minute to search for my own comment on HN, around some interesting conversations. I made a todo list item. Then at some point I wrote a function, then later I published a package. I can't even tell you how effing nice it feels now - takes me seconds to find relevant stuff.

The other day I was reading a pdf, while taking notes. pdf-tools has this nice feature called pdf-view-themed-minor-mode - it adjusts the colors of the document to the colors of your theme, nicely blending the pdf into your editor. I use it all the time. I also use a package called circadian.el - using Emacs' built-in solar calendar, it adjusts the color theme based on the time of day. So, my color theme changes automatically, but it doesn't get automatically reflected in pdf documents I previously had opened. Not a biggie, I still can do it manually, yet it took me a few minutes to concoct an advising function that runs after (load-theme) and sets the colors in every pdf. Of course, why do something manually that the computer is supposed to figure out without your assistance?

Now, neither pdf-tools maintainers, nor the author of circadian.el know about my customizations. If any of them make some changes that break my beautiful zen fidgets, why would I even get mad about it? I'll try to fix it, and if it takes me longer than three minutes, I'll just remove it altogether and go back to toggling it manually - not a biggie, never was.

That has become my philosophy that probably extends beyond Emacs - my terminal, my browser, my WM, etc. The world is never meant to be perfect for everyone. But you can make it perfect just for you. I learned that it's better to apply ideas that enable you to build your perfect world, than someone else's perception of what _your_ ideal world should be. That's why for an individual programmer, choosing FOSS tools almost always yields better results in the long run. In a team setting that may be a bit difficult, but if you get inventive enough, you can always find workarounds. This is what Emacs taught me that no other tool ever did - the instinct to never settle for the status quo. Whenever something bothers me, I either discover workarounds on the spot or make it a todo item.

Re: Claude Code IDE integration for Emacs

#158
post #2

Pretty cool! I love that these battle proven editors (emacs and (n)vim) seem to follow along with new technology, even though one might think overwise given their age. I hope this comes to vim as well!

magenta nvim implements a really nice integration of coding agents.

Re: Claude Code IDE integration for Emacs

#160

This is awesome. I love emacs and I love integrating AI into my coding work flow. What I really want is to be able to run something like this locally for, say, less than $2000 in computer hardware. Is this feasible now or any time soon. Anyone out there using agents with local models for coding?

1. MacMini.

or:

2. https://frame.work/es/en/desktop

3. https://marketplace.nvidia.com/en-us/developer/dgx-spark/ => https://marketplace.nvidia.com/en-us/reservations/ (cheapest is 3k)

Post reply on HN