[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Calling emacsclient
From: |
Thorsten Jolitz |
Subject: |
Calling emacsclient |
Date: |
Mon, 12 Nov 2012 01:51:18 +0100 |
User-agent: |
Gnus/5.130002 (Ma Gnus v0.2) Emacs/24.0.93 (gnu/linux) |
Hi List,
with one emacs-daemon (named 'emacs1') running, the following external
call to emacsclient succeeds:
,-----------------------------
| (call 'emacsclient
| "-s" "emacs1"
| "-a" ""
| "-c" "file...")
`-----------------------------
But what I really would need is a more generic version that does not use
the server-name. The manual 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.)
`------------------------------------------------------------------
This does not work in my case. If I use
,-----------------------------
| (call 'emacsclient
| "-c" "file...")
`-----------------------------
I get:
,-----------------------------------------------------------------------
| 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)
`-----------------------------------------------------------------------
while
,-----------------------------
| (call 'emacsclient
| "-a" ""
| "-c" "file...")
`-----------------------------
starts a new emacs-daemon (although emacs-server 'emacs1' is running).
Question:
How do I get the behaviour described in the manual: "If this
option [-s] is omitted, emacsclient connects to the first server it
finds." ?
I would need a generic call to emacsclient that first looks for a
running server (which ever it encounters) and only starts a new daemon
if there is no server running already.
I'm on Arch Linux.
--
cheers,
Thorsten
- Calling emacsclient,
Thorsten Jolitz <=
- Message not available