emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: emacsclient on WXP does not work (as it used to)


From: Juanma Barranquero
Subject: Re: emacsclient on WXP does not work (as it used to)
Date: Fri, 31 Oct 2008 12:02:12 +0100

On Fri, Oct 31, 2008 at 11:35, dhruva <address@hidden> 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");




reply via email to

[Prev in Thread] Current Thread [Next in Thread]