I have an emacs daemon on another machine running Ubuntu. I am sitting at a Windows machine with Cygwin/X. I’ve launched “startxwin” to get a local X server and pulled up an xterm. I connect to the remote machine with ssh –X and attempt to run “emacsclient –n –c”. The error I get is “X11 connection rejected because of wrong authentication.” No luck.
I found this page to fix the problem. For some reason $XAUTHORITY is blank, but it needs to be set to the same value that emacs has. To fetch that value, run: emacsclient –e “(getenv \”XAUTHORITY\”)”. Follow the directions in that email. Now you can open new emacs frames on your machine that is connected to a remote instance of an emacs daemon. You can’t do that with Visual Studio!