Hacker News new | ask | show | jobs
by MikeTheGreat 2071 days ago
This is gonna sound dumb (because it is :) ) but it took me a while to realize that on Windows there's no daemon process so you gotta keep the emacs window open.

I kept closing emacs and expecting the next startup to be super quick and it wasn't. It was clearly starting up from scratch again.

I think the server stuff on Linux / MacOS does start a daemon, but I spent a bunch of time trying to get it to work (quick startup with no visible instances) before I happened to read that one needs to keep the first instance open on Windows.

Separately but related, sometimes emacs doesn't remove the text file that it uses to figure out if there's already a server running or not when it exits. Any further instances assume that another instance is the server and they don't take over as the server themselves. Thus, the zombie text file ensures that the server functionality stops working until you delete the file yourself, manually. I was half thinking about writing an emacs function to check if the pid identified in that text file is legit (i.e., is there a running process with that pid?) and if not then delete the marker file. Somewhere around there is when I decided I didn't want to fiddle _that_ much with my editor :)

1 comments

Yeah, on macOS and Linux it starts a proper daemon. On Windows, I used org-mode so heavily that the idea of closing it during the workday usually meant I was preparing to reboot for IT's 25th update push of the day.

I actually do recall the lock file not being deleted properly a couple times. It didn't happen often, probably why I had mostly forgotten about it.