←back to thread

460 points flykespice | 2 comments | | HN request time: 0.414s | source
Show context
kqr ◴[] No.44329872[source]
> It's somewhere between a curl script and Postman

Sounds a lot like Emacs' restclient-mode, and I can absolutely see the appeal for those which don't already have an Emacs session open.

replies(1): >>44351380 #
dotancohen ◴[] No.44351380[source]
As a Postman user, who uses Org Mode with Evil, can you sell me on Emacs' restclient-mode?
replies(1): >>44359822 #
iLemming ◴[] No.44359822[source]
You don't need to "buy" restclient, want you want is to understand Org-mode. Org-mode is a literate programming environment, you can run code snippets and "pipe" the results into one another. So, this is how I usually test my API endpoints - I would use ob-http, or verb.el, or restclient (although iirc this one no longer maintained) and then make a simple call to an endpoint, then I can pipe the results into a Clojure source block passing the data in, where I can easily parse the json and slice, dice, group and filter on the data. You can do the same thing in Python or Javascript or R (or whatever) source block. Then you can spit it out as is or pipe into another block for further tranformation. Very often I have to query a SQL DB to retrieve the payload I need to send to the API, that all I also do right there, in the same context.

What's great is that all my experimentation is "reproducible", and all of it is in my notes. Notes that are easily searchable, exportable (e.g. for a blog content), etc.

I can easily add links to some relevant PDFs, and youtube vids right there. I can start annotating those pdfs, where my notes will be interwoven with my API research. I can watch videos while controlling playback from Emacs, without having to switch to the app - it's very nice when taking notes. I can retrieve the transcript, send it to LLM, get the summary of the video and add it to my notes.

If I come up with something that I'd like to memorize better, I can easily export chunks as Anki cards. That information is also within my notes. I can easily find it, edit it, etc. I don't need to navigate multiple different apps to get this work done.

replies(1): >>44361246 #
dotancohen ◴[] No.44361246[source]
Thank you. I didn't mean to literally sell me something, rather to explain it such that I would see how it could fit into my workflow. Which you did.

I do use Org mode, but only for simple personal notes. When I get home I'll explore using it as a REST client. They always told me that Emacs is a great OS, that just lacks a decent text editor.

replies(2): >>44361356 #>>44364398 #
1. kqr ◴[] No.44364398[source]
Emacs has a great text editor, and has had for a few years. If you have not given Evil mode a fair chance, you definitely should.
replies(1): >>44375574 #
2. dotancohen ◴[] No.44375574[source]
I most certainly use Evil. Thank you!