* multiple emacs servers
@ 2007-10-18 17:55 David L
2007-10-18 18:20 ` Juanma Barranquero
0 siblings, 1 reply; 4+ messages in thread
From: David L @ 2007-10-18 17:55 UTC (permalink / raw)
To: help-gnu-emacs
[-- Attachment #1.1: Type: text/plain, Size: 344 bytes --]
The emacs manual 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'.
I can't get this to work. Am I doing something wrong or is this
documentation obsolete?
[-- Attachment #1.2: Type: text/html, Size: 440 bytes --]
[-- Attachment #2: Type: text/plain, Size: 152 bytes --]
_______________________________________________
help-gnu-emacs mailing list
help-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: multiple emacs servers
2007-10-18 17:55 multiple emacs servers David L
@ 2007-10-18 18:20 ` Juanma Barranquero
2007-10-18 18:44 ` David L
0 siblings, 1 reply; 4+ messages in thread
From: Juanma Barranquero @ 2007-10-18 18:20 UTC (permalink / raw)
To: David L; +Cc: help-gnu-emacs
On 10/18/07, David L <idht4n@gmail.com> wrote:
> The emacs manual 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'.
>
> I can't get this to work. Am I doing something wrong or is this
> documentation obsolete?
What are you doing, exactly?
I think it's a misunderstanding. You cannot have two server processes
in the same instance of Emacs (there's only one `server-process'
variable, and `server-start' kills the previous process before
starting one anew), but certainly you can start several Emacsen, each
one with a different value of server-name, and have several Emacs
servers. I do it daily.
emacs -q --eval '(progn (setq server-name "server1") (server-start))'
emacs -q --eval '(progn (setq server-name "server2") (server-start))'
and you can use:
emacsclient --server-file=server1 my-file
emacsclient --server-file=server2 my-other-file
Juanma
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: multiple emacs servers
2007-10-18 18:20 ` Juanma Barranquero
@ 2007-10-18 18:44 ` David L
2007-10-19 7:35 ` Juanma Barranquero
0 siblings, 1 reply; 4+ messages in thread
From: David L @ 2007-10-18 18:44 UTC (permalink / raw)
To: Juanma Barranquero; +Cc: help-gnu-emacs
[-- Attachment #1.1: Type: text/plain, Size: 1227 bytes --]
On 10/18/07, Juanma Barranquero <lekktu@gmail.com> wrote:
>
> On 10/18/07, David L <idht4n@gmail.com> wrote:
>
> > The emacs manual 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'.
> >
> > I can't get this to work. Am I doing something wrong or is this
> > documentation obsolete?
>
> What are you doing, exactly?
I'm trying to use M-x set-variable from an open emacs session to
set the "server-name" variable. But the only variable that emacs
will let me set that starts with "server" is "server-mode". I can't
even describe-variable "server-name" until after the server is
started and I still can't set-variable server-name even after it is
started.
<snip>
>
> emacs -q --eval '(progn (setq server-name "server1") (server-start))'
> emacs -q --eval '(progn (setq server-name "server2") (server-start))'
>
> and you can use:
>
> emacsclient --server-file=server1 my-file
> emacsclient --server-file=server2 my-other-file
This works, thanks! But I don't think the procedure in the
documentation works.?
[-- Attachment #1.2: Type: text/html, Size: 2008 bytes --]
[-- Attachment #2: Type: text/plain, Size: 152 bytes --]
_______________________________________________
help-gnu-emacs mailing list
help-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: multiple emacs servers
2007-10-18 18:44 ` David L
@ 2007-10-19 7:35 ` Juanma Barranquero
0 siblings, 0 replies; 4+ messages in thread
From: Juanma Barranquero @ 2007-10-19 7:35 UTC (permalink / raw)
To: David L; +Cc: help-gnu-emacs
On 10/18/07, David L <idht4n@gmail.com> wrote:
> I'm trying to use M-x set-variable from an open emacs session to
> set the "server-name" variable. But the only variable that emacs
> will let me set that starts with "server" is "server-mode". I can't
> even describe-variable "server-name" until after the server is
> started and I still can't set-variable server-name even after it is
> started.
Yes. `server-name' is not autoloaded, so it is not defined until you
load server.el; if you do "M-x load-library server [RET]" you'll be
able to describe-variable `server-name' before starting the server,
but it won't be useful, as server-name has no documentation string.
That's also the reason you can not use M-x set-variable with it
(variables have to be specially marked as user options to be setable
with set-variable).
I suggest you locally patch your server.el, changing this line:
(defvar server-name "server")
to this
(defcustom server-name "server"
"Name of the server process."
:group 'server
:type 'string)
recompile server.el, and try again.
> But I don't think the procedure in the
> documentation works.?
Well, certainly it should be possible to change the server name before
starting the server, yes.
Juanma
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-10-19 7:35 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-18 17:55 multiple emacs servers David L
2007-10-18 18:20 ` Juanma Barranquero
2007-10-18 18:44 ` David L
2007-10-19 7:35 ` Juanma Barranquero
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.