emacs

jumar 2025-09-17T12:57:36.720609Z

With magit (or something else) I'd like to list all the commits touching given file or directory and show complete diff (that is all the changes made in those commits, all at once). What would be the best way to do that?

vemv 2025-09-17T13:01:04.228669Z

I normally use git log --follow -p -- $file_or_dir to see a continous history of changes for a file Although Magit would be better!

jumar 2025-09-17T13:03:10.364739Z

I use magit-log-buffer-file and that works for both files and directories but then I get only a list of commits. To see a diff for a specific commit, I can just press Enter, but not sure how to get a summary diff for all the commits, properly. (I could select all the commits and do magit-diff but that includes everything that changed between the first and last selected commit)

hkjels 2025-09-17T13:15:05.728409Z

magit-diff supports selecting both files and ranges

hkjels 2025-09-17T13:15:48.256029Z

to select specific files, just press - twice and then r for range if I remember correctlyu

jumar 2025-09-17T13:41:21.592569Z

Ah, yes, -- is what I wanted 🙂 Thanks!

ag 2025-09-17T16:12:24.550719Z

I'd like to list all the commits touching given file or directorymagit-file-dispatch for the current buffer file in Dired, you can mark specific files and dirs and run magit-dired-log, that will show the commits pertaining only the marked files.

ag 2025-09-17T22:02:11.963609Z

I just can't contain my excitement of how awesome it feels these days to use Emacs. We use plumatic/schema (why not spec or malli is irrelevant in this context), but check this out:

ag 2025-09-17T22:04:52.973689Z

I proposed to use metosin/tools and convert our schemas, so this:

(s/defschema error_schema
  {(s/required-key "status") s/Int
   (s/required-key "code")   s/Str
   (s/required-key "title")  s/Str
   (s/required-key "detail") s/Str})
becomes this:
(s/defschema error_schema
  (st/required-keys
   {"status" s/Int
    "code"   s/Str
    "title"  s/Str
    "detail" s/Str}))
Looks simple, but then it can get complicated with mixed keys, etc. My teammates said: "yeah, cool" Without even hesitating, I opened a gptel buffer and asked the model to make me an elisp command that translates a schema, giving it liberty to use any CLI tools if needed, etc. First, it gave me a simple Elisp fn. I immediately pointed out that it would fail for mixed keys and other cases, so it made me another "call babashka and run this clojure code to manipulate clojure code sitting in an elisp code environment" thing, additionally, I asked it to remove commas and run lsp-format-buffer at the end. That's all. Because I'm using gptel-default-mode 'org-mode, the code comes back in org-mode source blocks. I opened it in an indirect buffer and evaled the Lisp code. Then I just had to run the command. I then cider-jacked-in and evaled the Clojure buffers to make sure it's not syntactically broken. No need to run the tests - CI will do it. It took me longer to review the changes, than doing all that work. The crazy thought is that I don't even need this thing anymore - it's a throwaway code, if I ever need to do that again, I can just re-type my prompt anew. Even though I admit, all my conversations with LLMs stored automatically. So now tell me, where else, in what IDE, what editor can I pull off anything like that? Type Lisp in the Lisp-driven editor, eval that Lisp results, run that shit in the editor, produce some more Lisp, run that Lisp once more in the Lisp-connected REPL, review results using Lisp-driven VCS, merge, push, make a PR? All that within 10-20 minutes. All without ever leaving the darn Lisp-driven editor. Emacs is essentially a "tool with million buttons" where instead of clicking buttons, you use Lisp to produce desired outcomes. Code snippets that you can run immediately, without even needing to save them anywhere, without having to compile, without any ceremony. Make Lisp -> Run Lisp -> Be Happy!

ag 2025-09-17T22:09:57.555989Z

Zed (or similar) users probably would be like: "well, AI could've done that directly in the Clojure buffer", but that's not the point, innit? There are multiple ways to do that in Emacs as well. Can you ask a Zed model to change your font, colors, terminal settings? Making changes to the exact same instance it's running in?

Andrea 2025-09-17T22:27:22.278379Z

yeah it is truly fun time with Emacs these days. A mix of gptel and codex-cli has been a powerful ally for remaining productive in a sudden switch to python at my job XD

ag 2025-09-17T22:41:31.770939Z

Holy mother of Alan. You can't even make this shit up. Just when I wrote "all my conversations with LLMs get stored ...", I decided to check "what the heck have I been even storing?" Even though I don't have to do that, I typically keep one topic of a conversation per file. I have also "quick question" workflow where simple, small conversations all get stored in http://quick.org file. I can always separate the context window within different headings by narrowing. So, I was going through all my LLM log files. And remembered there is something like dired-preview mode - I don't need to open each file, then kill the buffer just for the sake of peeking into it. But I didn't have that package installed. I asked LLM and it gave me the exact instructions - I could've searched, but that was quicker. https://imgur.com/a/ZIRvQns. I decided to make permanent changes in my config, but if it was a one-time thing, I wouldn't even have to save it. It took me longer to tell you I did it, than actually doing all that. See? I just added a new feature to my editor, without restarting it, without closing anything, without losing any context, with a minimal interruption from work, just by typing some text, and all that within minutes.

1
azimpel 2025-09-19T08:24:59.653259Z

Yes, I agree 100%. It's a personal jorney. The information is omnipresent, but you only start realizing it when you reached the point of no return. Same with cars: you don't even notice how many Hyundai cars drive out there until you buy one. But I really appreciate everyone who shares and shows his tools/workflows. If an former colleague of mine hadn't shown me this weird language, I still wouldn't know about Clojure today.

azimpel 2025-09-18T08:57:21.656979Z

I almost can hear your excitement. This looks very amazing. Unfortunately it's the same with Clojure, it's almost impossible to transport this feeling to people who haven't experienced it yet by themselves. Even if you show/share it, not everyone get it.

💯 1
ag 2025-09-18T21:06:37.602199Z

> it's almost impossible to transport this feeling to people who haven't experienced it Yup, that's well-known phenomena - "tacit vs explicit" knowledge. Known since around 1960s. • Tacit: personal, context-specific knowledge we can't fully articulate (riding a bike, recognizing faces, REPL-driven code writing, etc.) • Explicit knowledge: formal, codifiable stuff that can be written and shared (equations, procedures, facts) Just like master musicians outperform novices through accumulated tacit knowledge but can't magically turn every newbie into a maestro, the same way, the excitement we feel through using a Lisp REPL cannot be taught by using words and hand-waving.

ag 2025-09-18T21:13:49.273579Z

The hard [sad] part of it all is that I can't even confirm my personal, empirical hypotheses for why I love using Lisp, yet I fail most of the time to inspire other developers to give it a try. There's no way to know what shaped my emotions and how my tacit knowledge formed. Perhaps I really needed to go through years of different programming language stacks to arrive finally, one day, at where I am.