all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* emacsclientw not working
@ 2007-09-20 15:51 Ted Dennison
  2007-09-21  7:54 ` Juanma Barranquero
       [not found] ` <mailman.1098.1190361299.18990.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 7+ messages in thread
From: Ted Dennison @ 2007-09-20 15:51 UTC (permalink / raw)
  To: help-gnu-emacs

I'm running on Window XP, and recently upgraded to emacs 22.1. I
downloaded the binary edition from ftp://ftp.gnu.org/gnu/emacs/windows/
.  I made extensive use of gnuclientw in the past, and am now trying
to switch over to emacsclientw. I'm not having much luck.

I put (server-start) at the top of my .emacs, and it appears to be
starting correctly. The only message I see in messages is:
Loading server...done

However, when I run emacsclientw on a file, I get the following:
---------
emacsclient: No socket or alternate editor.  Please use:

        --server-file      (or environment variable EMACS_SERVER_FILE)
        --alternate-editor (or environment variable ALTERNATE_EDITOR)
---------

I can of course add "-a emacs", but that just starts a new emacs for
every file (even if I leave the first one up).

Does anyone have any idea what I may be doing wrong here?

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: emacsclientw not working
  2007-09-20 15:51 emacsclientw not working Ted Dennison
@ 2007-09-21  7:54 ` Juanma Barranquero
       [not found] ` <mailman.1098.1190361299.18990.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 7+ messages in thread
From: Juanma Barranquero @ 2007-09-21  7:54 UTC (permalink / raw)
  To: Ted Dennison; +Cc: help-gnu-emacs

On 9/20/07, Ted Dennison <dennison@telepath.com> wrote:

> However, when I run emacsclientw on a file, I get the following:
> ---------
> emacsclient: No socket or alternate editor.  Please use:
>
>         --server-file      (or environment variable EMACS_SERVER_FILE)
>         --alternate-editor (or environment variable ALTERNATE_EDITOR)
> ---------

server.el creates a file with information that emacsclient needs. By
default that place is ~/.emacs.d/server and the file name is "server"
(both can be modified).

Try doing:

 C:\> SET EMACS_SERVER_FILE=%HOME%\.emacs.d\server\server
 C:\> emacsclient MY_FILE

or

 C:\> emacsclient --server-file=%HOME%\.emacs.d\server\server MY_FILE

(with %HOME% pointing to Emacs' home dir, of course).

             Juanma

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: emacsclientw not working
       [not found] ` <mailman.1098.1190361299.18990.help-gnu-emacs@gnu.org>
@ 2007-09-21 10:58   ` Jason Rumney
  2007-09-21 12:47     ` Ted Dennison
  2007-09-21 13:30     ` Juanma Barranquero
  2007-09-21 12:03   ` Ted Dennison
  1 sibling, 2 replies; 7+ messages in thread
From: Jason Rumney @ 2007-09-21 10:58 UTC (permalink / raw)
  To: help-gnu-emacs

On 21 Sep, 08:54, "Juanma Barranquero" <lek...@gmail.com> wrote:

> Try doing:
>
>  C:\> SET EMACS_SERVER_FILE=%HOME%\.emacs.d\server\server
>  C:\> emacsclient MY_FILE

Since that is what Emacs does by default, the most likely cause of
problems is that emacsclient's idea of HOME differs from Emacs. This
is likely from a bash shell, where HOME will be set up for Cygwin
programs. I'm not sure what emacsclient does when HOME is not set, but
that could be another source of problems.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: emacsclientw not working
       [not found] ` <mailman.1098.1190361299.18990.help-gnu-emacs@gnu.org>
  2007-09-21 10:58   ` Jason Rumney
@ 2007-09-21 12:03   ` Ted Dennison
  1 sibling, 0 replies; 7+ messages in thread
From: Ted Dennison @ 2007-09-21 12:03 UTC (permalink / raw)
  To: help-gnu-emacs

Juanma Barranquero wrote:
> Try doing:
>
>  C:\> emacsclient --server-file=%HOME%\.emacs.d\server\server MY_FILE
>
> (with %HOME% pointing to Emacs' home dir, of course).

I have no %HOME% variable, but I did it with C:\.emacs.d\server
\server  (C: seems to be where emacs thinks "~" is when I start it
up), and that did the trick. Thanks!

I guess that info was right in the error message. I just had no clue
what --server-file was, or how to use it.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: emacsclientw not working
  2007-09-21 10:58   ` Jason Rumney
@ 2007-09-21 12:47     ` Ted Dennison
  2007-09-21 13:44       ` Juanma Barranquero
  2007-09-21 13:30     ` Juanma Barranquero
  1 sibling, 1 reply; 7+ messages in thread
From: Ted Dennison @ 2007-09-21 12:47 UTC (permalink / raw)
  To: help-gnu-emacs


Jason Rumney wrote:
> Since that is what Emacs does by default, the most likely cause of
> problems is that emacsclient's idea of HOME differs from Emacs. This
> is likely from a bash shell, where HOME will be set up for Cygwin
> programs. I'm not sure what emacsclient does when HOME is not set, but
> that could be another source of problems.

I'm trying this from a cmd.exe shell, and have no %HOME% env variable,
so I'm guessing the issue is the latter.

I did run the addpm.exe from emacs's bin directory, but I guess it
didn't set this up.

I just tried setting it locally in my command shell, and now it works
without needing the --server-file argument.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: emacsclientw not working
  2007-09-21 10:58   ` Jason Rumney
  2007-09-21 12:47     ` Ted Dennison
@ 2007-09-21 13:30     ` Juanma Barranquero
  1 sibling, 0 replies; 7+ messages in thread
From: Juanma Barranquero @ 2007-09-21 13:30 UTC (permalink / raw)
  To: Jason Rumney; +Cc: help-gnu-emacs

On 9/21/07, Jason Rumney <jasonrumney@gmail.com> wrote:

> I'm not sure what emacsclient does when HOME is not set, but
> that could be another source of problems.

On Windows XP (which the OP is using), when HOME is not set Emacs
defaults to %APPDATA%, as does emacsclient.c.

To be precise, the Emacs code (which is yours) use

  get_folder_path (NULL, CSIDL_APPDATA, NULL, 0, default_home);

while the less sofisticate emacsclient code does:

  getenv ("APPDATA")

but the results should match.

What I don't understand is why Ted's Emacs thinks that HOME points to
C:\. Emacs 22.1 running on XP should default to "C:\Documents and
Settings\User\Application Data" or somesuch.

             Juanma

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: emacsclientw not working
  2007-09-21 12:47     ` Ted Dennison
@ 2007-09-21 13:44       ` Juanma Barranquero
  0 siblings, 0 replies; 7+ messages in thread
From: Juanma Barranquero @ 2007-09-21 13:44 UTC (permalink / raw)
  To: Ted Dennison; +Cc: help-gnu-emacs

On 9/21/07, Ted Dennison <dennison@telepath.com> wrote:

> I did run the addpm.exe from emacs's bin directory, but I guess it
> didn't set this up.

What is the value of the registry key HKLM\SOFTWARE\Gnu\Emacs\HOME (if any)?

             Juanma

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2007-09-21 13:44 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-20 15:51 emacsclientw not working Ted Dennison
2007-09-21  7:54 ` Juanma Barranquero
     [not found] ` <mailman.1098.1190361299.18990.help-gnu-emacs@gnu.org>
2007-09-21 10:58   ` Jason Rumney
2007-09-21 12:47     ` Ted Dennison
2007-09-21 13:44       ` Juanma Barranquero
2007-09-21 13:30     ` Juanma Barranquero
2007-09-21 12:03   ` Ted Dennison

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.