delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2012/03/14/22:44:42

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-1.4 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MIME_QP_LONG_LINE,RCVD_IN_DNSWL_LOW
X-Spam-Check-By: sourceware.org
Subject: Re: emacsclient from cygwin distro does not work with Cygwin emacs
References: <0867FF21-B46F-4ED7-A30B-8EA91FF22D71 AT letterboxes DOT org> <20120313090412 DOT Horde DOT 2VnFEElCcOxPXv98TKmSKOA AT webmail DOT df DOT eu> <D64A6C94-C90A-46A7-985D-0ECE6C55AE8A AT letterboxes DOT org> <20120313140418 DOT Horde DOT aYp9Q0lCcOxPX0XSwV9FhDA AT webmail DOT df DOT eu> <4F5F4D47 DOT 2010500 AT cornell DOT edu> <2D0EDE2D-9BF2-440F-A26D-9FBA3F6B6E76 AT letterboxes DOT org> <4F60BE94 DOT 6010104 AT cornell DOT edu>
From: Leo <leoslists AT letterboxes DOT org>
In-Reply-To: <4F60BE94.6010104@cornell.edu>
Message-Id: <0245A784-A7EA-4D7C-958A-1C4B9884CDA9@letterboxes.org>
Date: Thu, 15 Mar 2012 13:44:01 +1100
To: "cygwin AT cygwin DOT com" <cygwin AT cygwin DOT com>
Mime-Version: 1.0 (1.0)
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id q2F2icVw015723

On 15/03/2012, at 2:51 AM, Ken Brown <kbrown AT cornell DOT edu> wrote:

> 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. 

Hi Ken

Thanks a lot for your explanation. That exactly seems to happen!

Now I was able to set it up, so that it works under Cygwin/X as well. 

Cheers, Leo

--
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


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019