Question

I use Emacs for many things (the list seems to be growing every day). I like to have several frames open (so I can keep them in separate workspaces), so I first start it with emacs --daemon and then connect various clients to it with emacsclient -t.

One thing I have recently added to that list is writing papers. I write in Markdown, which allows easy version tracking with Git. In order to make it more readable, I usually split the frame into 3 or 4 windows vertically, and use follow-mode to split the paper between them.

I recently ran into a problem with this setup. Emacs would randomly stop accepting connections, and any time I ran emacsclient -t it would hang, never opening the frame. It took me a while to figure out why it happened, but I finally did. To reproduce:

  1. Start emacs with emacs --daemon
  2. Connect the first client with emacsclient -t <file> where <file> is some plaintext file.
  3. Activate follow-mode with M-x follow-mode
  4. Attempt to connect another client with emacsclient -t. This client will hang and never connect.

Deactivating follow-mode after that point had no effect, clients were still unable to connect. If I never activate follow-mode, I never have a problem.

I also tried it without loading any init files (emacs --daemon --no-init-file --no-site-file), with the same result.

I'm running GNU Emacs 23.4.1, from the Ubuntu software repositories.

Why does this happen?

Was it helpful?

Solution

Looks like a bug in follow-mode (I cannot reproduce it with with emacs 24.3). Upgrading emacs would be a solution for fixing the problem.

This seem to be the official thread for this problem, which provides some adittional information and a workaround for those unable or unwilling to upgrade emacs.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top