Don't tug on that, you never know what it might be attached to This is a story about a very interesting bug that I tracked down yesterday. It was causing a bad effect very far from where the bug actually was. emacsclient The emacs text editor comes with a separate utility, called emacsclient, which can communicate with the main editor process and tell it to open files for editing. You have your main emacs running. Then somewhere else you run the command emacsclient some-files... and it sends the main emacs a message that you want to edit some-files. Emacs gets the message and pops up new windows for editing those files. When you're done editing some-files you tell Emacs, by typing C-# or something, it it communicates back to emacsclient that the editing is done, and emacsclient exits. This was more important in the olden days when Emacs was big and bloated and took a long time to start up. (They used to joke that “Emacs” was an abbreviation for “Eight Megs And Constantly Swapping”. Eight megs!) But even today it's still useful, say from shell scripts that need to run an editor. Here's the reason I was running it. I have a very nice shell script, called also, that does something like this: Interpret command-line arguments as patterns Find files matching those patterns Present a menu of the files Wait for me to select files of interest Run emacsclient on the selected files It is essentially a wrapper around menupick, a menu-picking utility I wrote which has seen use as a component of several other tools. I can type also Wizard in the shell and get a menu of the files related to the wizard, select the ones I actually want to edit, and they show up in Emacs. This is more convenient than using Emacs itself to find and open them. I use it many times a day. Or rather, I did until this week, when it suddenly stopped working. Everything ran fine until the execution of emacsclient, which would fail, saying: emacsclient: can't find socket; have you started the server? (A socke...
First seen: 2025-11-28 16:41
Last seen: 2025-11-29 12:43