logoalt Hacker News

whacked_newtoday at 2:20 PM0 repliesview on HN

I recently sifted through a bunch of tagged entries in a text file, where each entry had a json array of image names, but the images resided on a remote server. I basically wanted a program that could detect if the cursor was on an image name, and display it on the right.

There's a bajillion ways to do this, some might even involve writing an html file and launching a remote server and tunneling and using a browser and what not. But no! ChatGPT wrote 20 lines of elisp code. I add a tramp basepath, open the text file, and got exactly what I needed. Need any behavior changes, callbacks, transformations? Modify, eval expression, new behavior!

I asked ChatGPT what other system I can use to achieve the same effect. The best answer it gave was neovim. No, neovim can't do that with the same degree of ease.

Disappointing and amazing at the same time.

The drawback of the emacs approach in my case is the tramp latency. To speed things up we'd want to add prefetch and that's gonna be much more than 20 lines and C-x e