Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When opening a file in GNU Emacs GUI, I use gnuserv to attach to an already running emacs. I use 'gnuserv' only because the first documentation I read on the subject suggested it.

Today I was looking for a way to open a file at a specific line number, and found a reference to using emacsclient -c +4:3 FILE... When I ran the command, it complained about needing to start the server...
gnuserv was running, so gnuserv and emacsclient are apparently not complementary components..

What is the relationship between these two client-server systems?
eg. Can they co-exist?.. Is one more 'up-to-date'?... Is one for the terminal only? .. Do they perform similar functions?..

share|improve this question
up vote 5 down vote accepted

For a while, there were two major implementations of Emacs: GNU Emacs and XEmacs. XEmacs typically had more features, with GNU Emacs playing catch-up but offering a more polished product¹. XEmacs hasn't had any serious development in the last few years; I think GNU Emacs 23 has caught up with all the major features of XEmacs 21 (the last version).

Amongst the features that GNU Emacs and XEmacs did differently was emacsclient/gnuclient. Up to GNU Emacs 22, emacsclient could only open a file in an existing Emacs, where as gnuclient could execute arbitrary code in the remote Emacs process. Since GNU Emacs 23, emacsclient and gnuclient have similar capabilities.

The protocols used by gnuclient/gnuserv and emacsclient/emacsserver are different. So you need to pick one and stick to it. (It should be possible to run both gnuserv and emacsserver in your Emacs instance; this may require some minor Lisp tweaking to avoid name conflicts).

I used to use gnuserv/gnuclient wherever available back when emacsclient didn't support anything but opening files, but since Emacs 23 I use the built-in server with emacsclient.

¹ There were additional political differences between the projects which I won't go into here.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.