From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: dhruva Newsgroups: gmane.emacs.devel Subject: Re: emacsclient on WXP does not work (as it used to) Date: Fri, 31 Oct 2008 20:51:33 +0530 Message-ID: References: <87bpx0x36s.fsf@cyd.mit.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1225466523 17448 80.91.229.12 (31 Oct 2008 15:22:03 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 31 Oct 2008 15:22:03 +0000 (UTC) Cc: Juanma Barranquero , cyd@stupidchicken.com, emacs-devel@gnu.org To: "Eli Zaretskii" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Oct 31 16:23:04 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 1Kvvq2-0003EI-Fg for ged-emacs-devel@m.gmane.org; Fri, 31 Oct 2008 16:23:03 +0100 Original-Received: from localhost ([127.0.0.1]:35896 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kvvou-00057r-9B for ged-emacs-devel@m.gmane.org; Fri, 31 Oct 2008 11:21:52 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Kvvor-00057N-CG for emacs-devel@gnu.org; Fri, 31 Oct 2008 11:21:49 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Kvvon-00056n-Jz for emacs-devel@gnu.org; Fri, 31 Oct 2008 11:21:49 -0400 Original-Received: from [199.232.76.173] (port=35872 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kvvon-00056k-GU for emacs-devel@gnu.org; Fri, 31 Oct 2008 11:21:45 -0400 Original-Received: from ti-out-0910.google.com ([209.85.142.185]:45624) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Kvvog-0004FC-3Q; Fri, 31 Oct 2008 11:21:39 -0400 Original-Received: by ti-out-0910.google.com with SMTP id u5so674769tia.10 for ; Fri, 31 Oct 2008 08:21:33 -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=BjDln5+8XDGOf28QgpIQbRn2PsTzEy9rqBFZtIP3oI0=; b=eZIiNSMo5brsDVYg3MYWBK7hEArCFYPycshvKQETKGbG9qLFTmYLvs5m+g4IDFLpoz cXf0ao8X9XTL83fOfWmL0xy7nPuelzExPmMb/lhGMkeeuX0fcadsFmVhAdWyHMpNUI3z Q7/VbVjPNozXAEEQJ5FQEIBONQhVu7l1U2LSU= 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=AZoTLx1Ctt81sD+ZM/i2lU6mVLrXWLTHJhkyB7P6Vf78OCKrwS1ACtzqCarhiXQCH5 V7Odr5zRF6eSgNRJJ/gVd2I8hw2u8+UH9aZmsrGoDd570utDpW7w8xrtctSd+mUDg8T/ 7J69nbiL4FJPEbqaqpqshUF+XGxYd1NxU98HE= Original-Received: by 10.110.26.20 with SMTP id 20mr768929tiz.5.1225466493534; Fri, 31 Oct 2008 08:21:33 -0700 (PDT) Original-Received: by 10.110.93.2 with HTTP; Fri, 31 Oct 2008 08:21:33 -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:105216 Archived-At: Even this works! diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c index 0bbc385..6d2d2c4 100644 --- a/lib-src/emacsclient.c +++ b/lib-src/emacsclient.c @@ -1446,6 +1446,9 @@ main (argc, argv) char *tty_name = NULL; #ifndef WINDOWSNT tty_name = ttyname (fileno (stdout)); +#else + type = "CMD"; + tty_name = "CON"; #endif if (! tty_name) On Fri, Oct 31, 2008 at 8:14 PM, Eli Zaretskii wrote: >> Date: Fri, 31 Oct 2008 15:14:42 +0100 >> From: "Juanma Barranquero" >> Cc: "Eli Zaretskii" , emacs-devel@gnu.org >> >> On Fri, Oct 31, 2008 at 15:13, Chong Yidong wrote: >> >> > This was for bug#1267. >> > >> > The goal was to pass the tty to the Emacs server even if we're supposed >> > to use the current frame, because in daemon mode, if the "current frame" >> > is the fake daemon frame, we wan to be able to fall back on using that >> > tty. >> >> Yes, but that should be conditional on Windows, where tty is (I think) not used. > > What will happen if we provide an emulation of `ttyname' for Windows, > which would just return something like "CONOUT$"? Since daemon mode > is not used on Windows, I think the tty name should never be used by > server.el on Windows. > > Can you try this and see if it works? If it does, then we can fix > this problem much cleaner, and even remove an existing ifndef. > > > -- Contents reflect my personal views only!