emacs-devel
[Top][All Lists]
Advanced

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

emacsclient doesn't find server with non-standard name


From: Michael Heerdegen
Subject: emacsclient doesn't find server with non-standard name
Date: Fri, 28 Dec 2012 19:45:28 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.91 (gnu/linux)

Hi,

today I tried this:

(progn
  (require 'server)
  (let ((server-name (concat "server_" (format-time-string  "%H:%M:%S"))))
    (server-start)))

This is on Debian with an Emacs compiled from the emacs-24 branch.  If I
then invoke emacsclient, it complains that it didn't find any server:

| bash-4.2:micha:~$ emacsclient ~/.bashrc
| emacsclient: can't find socket; have you started the server?
| To start the server in Emacs, type "M-x server-start".
| emacsclient: No socket or alternate editor.  Please use:
| 
|         --socket-name
|         --server-file      (or environment variable EMACS_SERVER_FILE)
|         --alternate-editor (or environment variable ALTERNATE_EDITOR)
| bash-4.2:micha:~$ 

When I explicitly specify the server name with the -s option,
emacsclient succeeds.  However, I wonder why it is necessary to specify
a name, because the man page of emacsclient says:

| `-s SERVER-NAME'
| `--socket-name=SERVER-NAME'
|      Connect to the Emacs server named SERVER-NAME.  The server name is
|      given by the variable `server-name' on the Emacs server.  If this
|      option is omitted, `emacsclient' connects to the first server it
|      finds.  (This option is not supported on MS-Windows.)

So, why doesn't emacsclient "find" any server?  The socket is existent
in /tmp/emacs$UID/.  Why doesn't emacsclient just look there and use
any of the sockets, as the doc seems to describe?


Thanks,

Michael.



reply via email to

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