Live data from Hacker News

Ask HN: What's the weirdest/best thing you've done with Emacs?

news.ycombinator.com

21–30 of 44 posts

Re: Ask HN: What's the weirdest/best thing you've done with Emacs?

#21
I don't think it's really weird but using it as an http rest client for testing apis with restclient.el

Postman frustrated me because it was taking up all the memory on my computer to do really simple calls. I remembered the "emacs rocks" episode on restclient and gave it a shot. Such a nice package. Really unfortunate that the maintainer doesn't update the melpa package.

Re: Ask HN: What's the weirdest/best thing you've done with Emacs?

#22
Tons of weird/fun stuff. Emacs is generally my primary tool.

- I work in Incident Response and use emacs and orgmode as a second brain for case notes. I log commands in orgmode and try to build my notes to make sure the investigation is a repeatable.

- For a good while I was using emacs/gnus as my email client. It wasn't without its warts but compared to Outlook it was glorious.

- I needed something to distract me during chemotherapy sessions so I wrote an NTFS MFT parser in emacs-lisp. It was a super dumb project but I'd been ages since I'd read through Carrier's file system forensics and it was good exercise.

- For a time I was using emacs and the emacs lisp request library to track bitcoin payments made in suspected extortion cases. It was fun to map until the transfers hit bitcoin tumblers then it my laptop basically lit on fire.

Re: Ask HN: What's the weirdest/best thing you've done with Emacs?

#23
Not what I've done, but the single craziest thing I've ever seen emacs do was a mode that you could put the editor into where you could edit the Lisp atoms of the running emacs program. Using the emacs editor commands to do so.

That melts my brain.

Re: Ask HN: What's the weirdest/best thing you've done with Emacs?

#25
Currently working on a speedrun split timer written in elisp:

https://github.com/progfolio/speedo

I've also written a real-time game pad input visualizer (heavily inspired by Chris Wellon's work here:

https://nullprogram.com/blog/2016/11/05/)

I did this for a couple of reasons. I couldn't find a decent split timer that was:

- available on Linux

- not Electron/browser based (These worked well enough, but at the cost of high CPU usage, which caused hiccups when recording gameplay)

I was easily able to set up the timer so that I can feed inputs to anti-micro, which are forwarded to Emacs. This allows me to control everything from the game pad. I also have a feature that allows me to record a mistake during a run. I have commands which can then pull out mistakes for a given range across multiple runs to analyze where I need to practice most.

Still a work in progress, but it's been fun to work on.

Re: Ask HN: What's the weirdest/best thing you've done with Emacs?

#26

I use an Emacs construct called an idle timer to maintain a file of (the start and end of) every interval 7 minutes long or longer during which I did not interact with Emacs, which enables me to figure out when I started or stopped some activity. A typical use of the file is figuring out retroactively when I got out of bed even though I didn't make any record of the event at the time the event happened: specifically,…

Sounds handy. Are you interested in sharing the source?

Re: Ask HN: What's the weirdest/best thing you've done with Emacs?

#27
in the mid 90s i taught my then 75 year old grandmother on her first computer how to write LaTeX documents in emacs. i created boilerplate templates for her various document types (letters, reports, etc) and she knew how to start emacs from the commandline, load those templates and save them into new documents. and of course preview and print too, but i don't remember if she did that from emacs or from the terminal

Re: Ask HN: What's the weirdest/best thing you've done with Emacs?

#28
long before there were convenient tools like xpra to move a window from one X terminal to another i was able to connect emacs to multiple X terminals at once, and in that way switch between computers and keep using the same instance of emacs via gui.

given that emacs works just as well in a terminal, that is not a huge advantage, but it is noteworthy that emacs has this capability and had it for a long time. something any gui program could have in theory

Re: Ask HN: What's the weirdest/best thing you've done with Emacs?

#29

I use an Emacs construct called an idle timer to maintain a file of (the start and end of) every interval 7 minutes long or longer during which I did not interact with Emacs, which enables me to figure out when I started or stopped some activity. A typical use of the file is figuring out retroactively when I got out of bed even though I didn't make any record of the event at the time the event happened: specifically,…

You might be interested in a generic time tracking daemon like arbtt[1]. It takes a snapshot of your activities across all programs in much more granular and configurable interval. It stores the data in binary format which is more space efficient but ships with tools that can spit out data for further scripting.

Independent of data collection, arbtt also has a DSL that lets you tag your samples programmatically. Which means you can use logic such as conditionals and regex on data such as active program name, window title etc to mark a sample productive or distracted etc.

The weird thing I do with Emacs here is run a function every N minutes and figure out productive work ratio in that interval with help of other scripts. Then it compares the ratio to a target threshold and performs actions based on if it meets the goal or not. Usually I warn myself if I am not being productive, but when I am feeling particularly intolerant of procrastination I lock myself out of my own laptop for a few minutes, to clear up my head.

[1] https://arbtt.nomeata.de/

Re: Ask HN: What's the weirdest/best thing you've done with Emacs?

#30

The best thing in the last year was that I made a mode for my job. All of my work repos are under the same folder so the mode gets activated for any file under that folder. It's small right now but has functionality like creating a new migration and switching to the new file. I also have yas-snippets for SQL tied to the mode. Using which-key helps me not have to remember all of the commands.

IGNORE THIS COMMENT

>Using which-key helps me not have to remember all of the commands.

I think the command's name is where-is, not which-key.

Post reply on HN