I recently started using emacsclient, and I like it a lot. Until now I haven't had any problems, but I just made a new tab in my terminal and tried opening another file, but emacs gets stuck on "Waiting for Emacs...". How do I run two emacsclients so I can edit two files? I'm on Ubuntu 13.04 with emacsclient 23.4 and emacs 23.4.1.

In order to start emacsclient and emacs server, I have the following bash function:

function emacs {
    if [[ $# -eq 0 ]]; then
        emacsclient -c -nw -a ""
        emacsclient "$@" -a ""

So for example I could start a terminal and emacs server would not be running. Then I would type emacs file.txt which would start an emacs server and connect with an emacs client. Then I would make a new tab and type emacs file2.txt and I wouldn't be able to connect.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.