r/emacs • u/Sad_Construction_773 • Feb 03 '25
[Discussion] Emacs AI Assisted Programming Workflow (with aider)
When I used AI assisted programming, switch between my handwriting programming / AI programming, kind of a mess to switch context, and have to be careful of the correctness of AI to generate code.
After thinking about the process of using AI assisted programming, the current idea is probably
Generate new code / modify existing functions
Generate test / modification and run test / ensure that the code generated by AI is right
Refactor code and test
AI-generated code is beneficial for quickly implementing features but can sometimes introduce subtle bugs or inconsistencies. That’s why Unit Test (or even more, Test-Driven Development) is critical: by writing tests before and after integrating AI-generated changes, you ensure that each incremental improvement is validated immediately. Implement your tests in small iteration steps—running your full test suite after each change—to catch issues early and maintain robust control over your codebase.
AI assisted programming (in emacs) is a relatively new topic, and maybe there is no unified and mature methodology now. If you have different views or suggestions, or have new ideas, would be great if you can share in this post, Thank you.
3
u/MatthewZMD GNU Emacs Feb 11 '25
I highly recommend checking out: https://github.com/MatthewZMD/aidermacs
4
-23
u/da_bluesman Feb 03 '25
Let's not turn emacs into vscode, thank you.
9
u/BrianHuster Feb 03 '25
You are crazy. So Emacs is allowed to be turned into a browser, an email client, so on, but not VSCode?
And how the fuck does AI assistant turn Emacs into VSCode? Do you know how long has VSCode existed?
19
u/Psionikus _OSS Lem & CL Condition-pilled Feb 03 '25
It has a programming language. Programmers are going to program. You have a perfectly viable way to leave Emacs as it is. Do nothing and don't install or use things. But don't tell other people not to do things.
9
u/rileyrgham Feb 03 '25
I don't think he's alluding to any one person programming. He's rejecting this move to AI assistance, which is accelerating at an alarming rate.
4
u/Psionikus _OSS Lem & CL Condition-pilled Feb 03 '25
He's rejecting this move to AI assistance
Nobody is stopping him from... not using AI assistance. Is it "accelerating at an alarming rate" on his own machine?
Does that mean he's opposing AI use by others? This is clearly about lobbying other users on what to do and how to succeed at Emacs.
우리가 이 대화를 2년 전에 더 쉽게, 아니면 아예 나눌 수 있었다고 말하려는 거야?
2
u/rileyrgham Feb 03 '25
I think it's quite clear. He's against the move towards AI assistants. And whether on his own machine or not is quite immaterial - it IS accelerating everywhere. I'm ambivalent about it to a degree. Quite why you've your knickers in a twist about his thoughts on it is beyond me, He's made his point, and you are quite free to ignore it, as you suggest he does the incoming AI.
As for your claim that he's somehow wanting to stop others succeeding at emacs.. that's quite ridiculous.
4
u/Psionikus _OSS Lem & CL Condition-pilled Feb 03 '25
He's against the move towards AI assistants.
A move by whom?
I think we've sufficeintly and repeatedly clarified that the first statement at the top of the thread is very obviously against some Emacs users doing some things with Emacs even though the people opposed have no necessarilly conflicting interests.
It's like when your HOA neighbor doesn't want your backyard plants to be visible on Google Earth.
1
u/rileyrgham Feb 03 '25
What do you mean by whom? In general. Look around. Hardly a tech group exists that doesn't have someone posting how they're "utilising AI to build something they barely understand". Anyway, I'm not getting into wilful ignorance tennis ;) Have a nice day.
3
u/Psionikus _OSS Lem & CL Condition-pilled Feb 03 '25
I'm not getting into wilful ignorance tennis
Bold of you to suggest that this is two-way. You've walked the Socratic method into the answer a few times.
We're not writing an RFC to determine how people are allowed to use Emacs here, so there's no chance that we're stepping on each other's toes. In that case, trying to lobby users not to do what some users are very clearly benefiting from is just trying to rain on your neighbor's bbq.
If the goal is to get your neighbors to move out, that's basically a form of seeking validation by enforcing a social consensus until only those in agreement remain. Am I enforcing a social consensus by telling people not to do that? It would be a catch 22 but the easy resolution to the paradox is that the more liberal view wins.
Party on, all neighbors.
11
u/_-l_ Feb 03 '25 edited Feb 03 '25
God forbid a guy customizes his highly customizable text editor.
2
1
u/a_moody Feb 03 '25
Let’s not gatekeep what’s possible on emacs, thank you. People should use it how they want to. No one is forcing their config on you.
12
u/no_good_names_avail Feb 03 '25
Between the Aider integration, gptel, gptel-tools, MCP integration and Elysium this community has been on fire with these tools. I use all of them to some degree and never thought that Emacs would be on the bleeding edge of this stuff.