Wizard
Wizard

Reputation: 22043

Determine which of running servers, an emacsclient attached to?

I planed to starting emacs from the the start.sh as

$ head start.sh
#! /bin/bash
{
    #starting emacs servers
    emacs --daemon=orging
    emacs --daemon=coding
    #waiting...
    #invoke emacsclients
    emacsclient -c -s "orging" &
    emacsclient -c -s "coding" &
    ......
    } &> /dev/null

Two clients run respectively under servers of orging and coding.

A problem occurred to this situation is that the invoked running clients are not labelled with appropriate server names.

So a manual steps of testing might be need to determine who is who.

As an alternative, the servers could be scheduled with one running at the top , the other at the end after starting from in the start.sh,

How could determine which server a client attached in a straightforward way on a working frame?

Upvotes: 0

Views: 180

Answers (1)

user594138
user594138

Reputation:

You can inspect the variable server-name - interactively with C-h v server-name RET.

Upvotes: 1

Related Questions