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 13:27:46 +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 1225456095 13157 80.91.229.12 (31 Oct 2008 12:28:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 31 Oct 2008 12:28:15 +0000 (UTC) Cc: emacs-devel@gnu.org To: "Eli Zaretskii" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Oct 31 13:29:16 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 1Kvt7n-0005Oh-4l for ged-emacs-devel@m.gmane.org; Fri, 31 Oct 2008 13:29:11 +0100 Original-Received: from localhost ([127.0.0.1]:41475 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kvt6f-0003rv-71 for ged-emacs-devel@m.gmane.org; Fri, 31 Oct 2008 08:28:01 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Kvt6c-0003rq-IV for emacs-devel@gnu.org; Fri, 31 Oct 2008 08:27:58 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Kvt6a-0003re-74 for emacs-devel@gnu.org; Fri, 31 Oct 2008 08:27:57 -0400 Original-Received: from [199.232.76.173] (port=43780 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kvt6Z-0003rb-V8 for emacs-devel@gnu.org; Fri, 31 Oct 2008 08:27:56 -0400 Original-Received: from rn-out-0910.google.com ([64.233.170.185]:50459) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Kvt6W-0004V0-Hj; Fri, 31 Oct 2008 08:27:52 -0400 Original-Received: by rn-out-0910.google.com with SMTP id k32so1004591rnd.7 for ; Fri, 31 Oct 2008 05:27:46 -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=UKNI6oBKleUYaWrizBy/ojCazF1ICc2yOlLfUhZbhpI=; b=AQX0k+EuiBJEIXOvgWmuTl4LvQ4K931bQzIK3py6tgHJbBQM9d8jbWScWito3P/14E GmePGD66GC4Ys5hqMpBzlQZzt/Gz7vqHCxbS2AYblD99+IPQJUafjUVsYyOSCZTglZ4k awXdtx6/0O100lzkPuTTdj7x7VooXEzcjoXWk= 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=aEHYiDrfwTQaMbM16dx8C7ShUM1l0p9mjFT5bFDZa/OkN6x6LVKDchCJOI7v2c4Z6M 85J6zS8tWzo8ONUYawrhBj/38ZvQfpUQXyuNT+2ua41tkPCCyrKDYhDY4QB+kl23RPdv xiuWikeez9rp4cMvBxD5SoZpFI8SijC74dFmk= Original-Received: by 10.100.196.17 with SMTP id t17mr1821800anf.84.1225456066189; Fri, 31 Oct 2008 05:27:46 -0700 (PDT) Original-Received: by 10.100.13.13 with HTTP; Fri, 31 Oct 2008 05:27:46 -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:105191 Archived-At: On Fri, Oct 31, 2008 at 12:15, Eli Zaretskii wrote: > Can you please explain why is this a problem on Windows? I understand > that the addition of current_frame to the `if' clause causes it to be > entered on Windows, whereas it wasn't before, but how does that, and > the fact that tty_name is NULL, cause emacsclient failure reported by > dhruva? I don't know why dhruva got the "connect" error message. My guess is that they are two different problems: 1.- emacsclient opened the socket (so no INVALID_SOCKET), but couldn't connect 2.- emacsclient couldn't get the terminal name, and it didn't have alternate-editor though I don't know how or why 2) would happen, unless there were two different emacsclients involved, called through alternate-editor (and even so, it doesn't make much sense). But anyway, my point was just that the very next code after the if() is char *type = egetenv ("TERM"); char *tty_name = NULL; #ifndef WINDOWSNT tty_name = ttyname (fileno (stdout)); #endif if (! tty_name) { message (TRUE, "%s: could not get terminal name\n", progname); fail (); } so entering the if() is *always* going to fail(). I'm unable to see how that be useful on Windows. > Agreed (to the ``ugly'' part). Glad we agree on this :) Have you any comment about the other part? ("Are there legitimate uses of tty == 1 on Windows?") > I'd like to try to find a less ugly fix. It's Chong's patch, perhaps he can shed a bit of light. Juanma