* server-start and server-name doesn't seem to work
@ 2009-10-16 18:07 Harry Putnam
2009-10-16 18:25 ` Óscar Fuentes
2009-10-16 20:34 ` Stefan Monnier
0 siblings, 2 replies; 9+ messages in thread
From: Harry Putnam @ 2009-10-16 18:07 UTC (permalink / raw)
To: emacs-devel
Looking thru emacs manual for a way to start a server and name it from
a running emacs session like one can do from command line with
emacs --daemon=name
I found a section of the manual under Using Emacs as a Server
(info "(emacs)Emacs Server")
The last paragraph that says:
You can run multiple Emacs servers on the same machine by giving
each one a unique "server name", using the variable `server-name'. For
example, `M-x set-variable <RET> server-name <RET> foo <RET>' sets the
server name to `foo'. The `emacsclient' program can specify a server by
name, using the `-s' option (*note emacsclient Options::).
But that doesn't appear to work here. (Running yesterdays CVS of
emacs)
After M-x server-start
If I do M-x set-variable <RET> server-name <RET> foo <RET>
I get an error saying:
set-variable: Value `foo' does not match type string of server-name
Here is the debugger output:
Debugger entered--Lisp error: (error "Value `foo' does not match type string of server-name")
signal(error ("Value `foo' does not match type string of server-name"))
error("Value `%S' does not match type %S of %S" foo string server-name)
set-variable(server-name foo nil)
call-interactively(set-variable t nil)
execute-extended-command(nil)
call-interactively(execute-extended-command nil nil)
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: server-start and server-name doesn't seem to work
2009-10-16 18:07 server-start and server-name doesn't seem to work Harry Putnam
@ 2009-10-16 18:25 ` Óscar Fuentes
2009-10-16 18:49 ` Harry Putnam
2009-10-16 20:34 ` Stefan Monnier
1 sibling, 1 reply; 9+ messages in thread
From: Óscar Fuentes @ 2009-10-16 18:25 UTC (permalink / raw)
To: emacs-devel
Harry Putnam <reader@newsguy.com> writes:
[snip]
> After M-x server-start
>
> If I do M-x set-variable <RET> server-name <RET> foo <RET>
>
> I get an error saying:
> set-variable: Value `foo' does not match type string of server-name
As the error message says, it expects a string. Try
M-x set-variable <RET> server-name <RET> "foo" <RET>
_________________________________________^___^
See the documentation for `set-variable'.
[snip]
--
Óscar
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: server-start and server-name doesn't seem to work
2009-10-16 18:25 ` Óscar Fuentes
@ 2009-10-16 18:49 ` Harry Putnam
0 siblings, 0 replies; 9+ messages in thread
From: Harry Putnam @ 2009-10-16 18:49 UTC (permalink / raw)
To: emacs-devel
Óscar Fuentes <ofv@wanadoo.es> writes:
> As the error message says, it expects a string. Try
>
> M-x set-variable <RET> server-name <RET> "foo" <RET>
> _________________________________________^___^
>
> See the documentation for `set-variable'.
Thanks. It might be good to make that clear in the manual too, buy
the addition of double quotes, to the existing documentation.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: server-start and server-name doesn't seem to work
2009-10-16 18:07 server-start and server-name doesn't seem to work Harry Putnam
2009-10-16 18:25 ` Óscar Fuentes
@ 2009-10-16 20:34 ` Stefan Monnier
2009-10-16 23:47 ` Harry Putnam
1 sibling, 1 reply; 9+ messages in thread
From: Stefan Monnier @ 2009-10-16 20:34 UTC (permalink / raw)
To: Harry Putnam; +Cc: emacs-devel
> After M-x server-start
> If I do M-x set-variable <RET> server-name <RET> foo <RET>
BTW, even if you use "foo", you'll bump into the limitation that a given
Emacs instance can only run a single Emacs server at a time. So you
need to change server-name *before* calling server-start.
Stefan
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: server-start and server-name doesn't seem to work
2009-10-16 20:34 ` Stefan Monnier
@ 2009-10-16 23:47 ` Harry Putnam
2009-10-17 2:12 ` Stefan Monnier
2009-10-17 2:32 ` Juanma Barranquero
0 siblings, 2 replies; 9+ messages in thread
From: Harry Putnam @ 2009-10-16 23:47 UTC (permalink / raw)
To: emacs-devel
Stefan Monnier <monnier@IRO.UMontreal.CA> writes:
>> After M-x server-start
>> If I do M-x set-variable <RET> server-name <RET> foo <RET>
>
> BTW, even if you use "foo", you'll bump into the limitation that a given
> Emacs instance can only run a single Emacs server at a time. So you
> need to change server-name *before* calling server-start.
From what I see... server-name is not available as a variable *until*
you do `server-start'. At least in a freshly started emacs the cmd
M-x set-variable <RET> server-name <RET> shows `no match'
But becomes available if I do M-x server-start. (or M-x server-mode).
But no matter how I go at it... it appears not to work if I name the
server.
at least `emacsclient -s name -c' fails.
How do you recommend I acquire a named server from a running emacs?
I mean aside from the shell cmdline. The manual is pretty clear in
saying it is something I should be able to do:
You can run multiple Emacs servers on the same machine by giving
each one a unique "server name", using the variable `server-name'.
For example, `M-x set-variable <RET> server-name <RET> foo <RET>'
sets the server name to `foo'. The `emacsclient' program can
specify a server by name, using the `-s' option (*note emacsclient
Options::).
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: server-start and server-name doesn't seem to work
2009-10-16 23:47 ` Harry Putnam
@ 2009-10-17 2:12 ` Stefan Monnier
2009-10-17 5:41 ` Harry Putnam
2009-10-17 2:32 ` Juanma Barranquero
1 sibling, 1 reply; 9+ messages in thread
From: Stefan Monnier @ 2009-10-17 2:12 UTC (permalink / raw)
To: Harry Putnam; +Cc: emacs-devel
> From what I see... server-name is not available as a variable *until*
> you do `server-start'. At least in a freshly started emacs the cmd
> M-x set-variable <RET> server-name <RET> shows `no match'
You don't need to M-x server-start, but you do need to load server.el
before you can use set-variable on that var.
So either do
M-x load-library RET server RET
M-x set-variable RET server-name RET "foo" RET
M-x server-mode RET
or do
M-: (setq server-name "foo") RET
M-x server-mode RET
I prefer this latter one, personally.
> But no matter how I go at it... it appears not to work if I name the
> server.
> at least `emacsclient -s name -c' fails.
I can only say that it works for me.
Stefan
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: server-start and server-name doesn't seem to work
2009-10-17 2:12 ` Stefan Monnier
@ 2009-10-17 5:41 ` Harry Putnam
0 siblings, 0 replies; 9+ messages in thread
From: Harry Putnam @ 2009-10-17 5:41 UTC (permalink / raw)
To: emacs-devel
Stefan Monnier <monnier@iro.umontreal.ca> writes:
> M-x load-library RET server RET
> M-x set-variable RET server-name RET "foo" RET
> M-x server-mode RET
>
> or do
>
> M-: (setq server-name "foo") RET
> M-x server-mode RET
>
> I prefer this latter one, personally.
>
>> But no matter how I go at it... it appears not to work if I name the
>> server.
>> at least `emacsclient -s name -c' fails.
>
> I can only say that it works for me.
Me too, when done in the sequence you showed.... thanks.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: server-start and server-name doesn't seem to work
2009-10-16 23:47 ` Harry Putnam
2009-10-17 2:12 ` Stefan Monnier
@ 2009-10-17 2:32 ` Juanma Barranquero
2009-10-17 5:44 ` Harry Putnam
1 sibling, 1 reply; 9+ messages in thread
From: Juanma Barranquero @ 2009-10-17 2:32 UTC (permalink / raw)
To: Harry Putnam; +Cc: emacs-devel
On Sat, Oct 17, 2009 at 01:47, Harry Putnam <reader@newsguy.com> wrote:
> The manual is pretty clear in
> saying it is something I should be able to do:
Not so clear, apparently.
> You can run multiple Emacs servers on the same machine by giving
> each one a unique "server name", using the variable `server-name'.
> For example, `M-x set-variable <RET> server-name <RET> foo <RET>'
> sets the server name to `foo'. The `emacsclient' program can
> specify a server by name, using the `-s' option (*note emacsclient
> Options::).
That means that you can have several simultaneous instances of Emacs,
each one running its own server (with different server-name's of
course), and emacsclient can be used to connect with any of them.
Juanma
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: server-start and server-name doesn't seem to work
2009-10-17 2:32 ` Juanma Barranquero
@ 2009-10-17 5:44 ` Harry Putnam
0 siblings, 0 replies; 9+ messages in thread
From: Harry Putnam @ 2009-10-17 5:44 UTC (permalink / raw)
To: emacs-devel
Juanma Barranquero <lekktu@gmail.com> writes:
> On Sat, Oct 17, 2009 at 01:47, Harry Putnam <reader@newsguy.com> wrote:
>
>> The manual is pretty clear in
>> saying it is something I should be able to do:
>
> Not so clear, apparently.
>
>> You can run multiple Emacs servers on the same machine by giving
>> each one a unique "server name", using the variable `server-name'.
>> For example, `M-x set-variable <RET> server-name <RET> foo <RET>'
>> sets the server name to `foo'. The `emacsclient' program can
>> specify a server by name, using the `-s' option (*note emacsclient
>> Options::).
>
> That means that you can have several simultaneous instances of Emacs,
> each one running its own server (with different server-name's of
> course), and emacsclient can be used to connect with any of them.
The `something' I was talking about was the ability to acquire a named
server, so ... I meant in the sense that you can have a named
server... I wasn't concerned with multiple servers.
Stefan has cleared up how its done... thanks
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2009-10-17 5:44 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-16 18:07 server-start and server-name doesn't seem to work Harry Putnam
2009-10-16 18:25 ` Óscar Fuentes
2009-10-16 18:49 ` Harry Putnam
2009-10-16 20:34 ` Stefan Monnier
2009-10-16 23:47 ` Harry Putnam
2009-10-17 2:12 ` Stefan Monnier
2009-10-17 5:41 ` Harry Putnam
2009-10-17 2:32 ` Juanma Barranquero
2009-10-17 5:44 ` Harry Putnam
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.