X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=-1.0 required=5.0	tests=AWL,BAYES_00,SPF_NEUTRAL,T_RP_MATCHES_RCVD
X-Spam-Check-By: sourceware.org
Message-ID: <4F60BE94.6010104@cornell.edu>
Date: Wed, 14 Mar 2012 11:51:48 -0400
From: Ken Brown <kbrown@cornell.edu>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0.1) Gecko/20120208 Thunderbird/10.0.1
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: Re: emacsclient from cygwin distro does not work with Cygwin emacs
References: <0867FF21-B46F-4ED7-A30B-8EA91FF22D71@letterboxes.org> <20120313090412.Horde.2VnFEElCcOxPXv98TKmSKOA@webmail.df.eu> <D64A6C94-C90A-46A7-985D-0ECE6C55AE8A@letterboxes.org> <20120313140418.Horde.aYp9Q0lCcOxPX0XSwV9FhDA@webmail.df.eu> <4F5F4D47.2010500@cornell.edu> <2D0EDE2D-9BF2-440F-A26D-9FBA3F6B6E76@letterboxes.org>
In-Reply-To: <2D0EDE2D-9BF2-440F-A26D-9FBA3F6B6E76@letterboxes.org>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-PMX-CORNELL-SPAM-CHECKED: Pawpaw
X-Original-Sender: kbrown@cornell.edu - Wed Mar 14 11:51:52 2012
X-PMX-CORNELL-REASON: CU_White_List_Override
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

On 3/14/2012 6:19 AM, Leo wrote:
> emacsclient works fine when I unset the environment variable
> "EMACS_SERVER_FILE". This holds true regardless what server-auth-dir is
> set to.
>
> In order to produce the error, do the following:
>
> (1) start emacs -Q.
> (2) execute in the scratch buffer
> (require 'server)
>
> (setq server-auth-dir "~/")
>
> (server-start)
>
> (3) go to a cygwin bash (outside emacs)
>
> (4) set EMACS_SERVER_FILE to "~/server"
>
> (5) run the command
>
> emacsclient ~/.emacs
>
> and you get the error message from the original post, but you'd expect
> to get in emacs a buffer displayed with the .emasc file.

You forgot to provide the pointers to the documentation that I 
requested, explaining why you would expect this.  The documentation for 
`server-auth-dir' says "We only use this if `server-use-tcp' is non-nil. 
  Otherwise we use `server-socket-dir'."

You didn't set `server-use-tcp' in your instructions above.  If I insert

   (setq server-use-tcp t)

before

   (server-start)

in your step (2), evaluating (server-start) gives me the error message 
"The directory `~' is unsafe".  So it looks like emacsclient is working 
as expected.

Is there a reason you want emacsclient to use TCP instead of (the 
default) local sockets?  I suspect this is due to your previous use of 
native Windows emacs.  Here's a quote from the emacsclient info file:

      An Emacs server usually uses an operating system feature called a
      "local socket" to listen for connections.  Some operating systems,
      such as Microsoft Windows, do not support local sockets; in that
      case, Emacs uses TCP instead.

BTW, I'm working in a test build of emacs-24.1.  I haven't checked to 
see what happens in emacs-23.4, but it doesn't seem relevant at this point.

Ken

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

