From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Juanma Barranquero" Newsgroups: gmane.emacs.devel Subject: Re: emacsclient on WXP does not work (as it used to) Date: Fri, 31 Oct 2008 12:02:12 +0100 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1225450963 30772 80.91.229.12 (31 Oct 2008 11:02:43 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 31 Oct 2008 11:02:43 +0000 (UTC) Cc: Emacs Devel To: dhruva Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Oct 31 12:03:39 2008 connect(): Connection refused Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Kvrmt-0003PX-U1 for ged-emacs-devel@m.gmane.org; Fri, 31 Oct 2008 12:03:32 +0100 Original-Received: from localhost ([127.0.0.1]:47052 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kvrll-0005Cu-6U for ged-emacs-devel@m.gmane.org; Fri, 31 Oct 2008 07:02:21 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Kvrlf-0005Cp-AF for emacs-devel@gnu.org; Fri, 31 Oct 2008 07:02:15 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Kvrle-0005CW-Bv for emacs-devel@gnu.org; Fri, 31 Oct 2008 07:02:14 -0400 Original-Received: from [199.232.76.173] (port=38893 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kvrle-0005CT-7d for emacs-devel@gnu.org; Fri, 31 Oct 2008 07:02:14 -0400 Original-Received: from yw-out-1718.google.com ([74.125.46.155]:47665) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Kvrld-0001u5-Nq for emacs-devel@gnu.org; Fri, 31 Oct 2008 07:02:13 -0400 Original-Received: by yw-out-1718.google.com with SMTP id 9so487377ywk.66 for ; Fri, 31 Oct 2008 04:02:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=+JC0tqDPl5jMdMctDD8R3CX029gPfRaB9rUCRc8hkkw=; b=ga5+pGboYVcSGO1oQX4DmFFWp4omoBWDhQXju2npqHmlPEp6t9xqKlng7C45eFHbf9 0K5FdtcODRsPC+2MeZLC8c0Gomdx62uMgzlhgwwhTiMiW7eLMQXdfTGxvDYBOgF9tnNW 4MyKoZa4vsIWPXIQjx9NckpswtJ3ARETWyqhs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=rFQWOLWYD2DX9vB1zzuuvJffSUdFNyY38y0KHHPIFtY7hiarcRhqVoEFUF8UnSmEMG HWyVfAWhHhTDZstpTnnd70n8GQUG8Vc2O9358TxszAPKx0RCtyXVhDilJTWl7P6pAK9G 3dEUjo/iuhosXbcxxsqTnbQZbwLPtjJuB+Z6I= Original-Received: by 10.100.46.10 with SMTP id t10mr1791855ant.136.1225450932262; Fri, 31 Oct 2008 04:02:12 -0700 (PDT) Original-Received: by 10.100.13.13 with HTTP; Fri, 31 Oct 2008 04:02:12 -0700 (PDT) In-Reply-To: Content-Disposition: inline X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:105186 Archived-At: On Fri, Oct 31, 2008 at 11:35, dhruva wrote: > When I run 'emacsclient some_file' I get the following error even > though I have a session of emacs running (in window mode) > > emacsclient: connect: No connection could be made because the target > machine actively refused it. Yes, this change: http://cvs.savannah.gnu.org/viewvc/emacs/emacs/lib-src/emacsclient.c?r1=1.135&r2=1.136&pathrev=MAIN is wrong, because on Windows, once inside the if(), tty_name is always going to be NULL. I wonder why the whole if isn't just #ifdef'd out. Are there legitimate uses of tty == 1 on Windows? The attached patch fixes the problem, but it's ugly as hell. Juanma Index: lib-src/emacsclient.c =================================================================== RCS file: /sources/emacs/emacs/lib-src/emacsclient.c,v retrieving revision 1.136 diff -u -2 -r1.136 emacsclient.c --- lib-src/emacsclient.c 30 Oct 2008 15:54:38 -0000 1.136 +++ lib-src/emacsclient.c 31 Oct 2008 11:00:45 -0000 @@ -1441,5 +1441,9 @@ In daemon mode, Emacs may need to occupy this tty if no other frame is available. */ - if (tty || current_frame) + if (tty +#ifndef WINDOWSNT + || current_frame +#endif + ) { char *type = egetenv ("TERM");