Subject: bug#12678: 24.2.50; emacsclient -c no longer works when emacs was started with --daemon

From: Ulrich Mueller <[email-masked]>
Date: Fri, 19 Oct 2012 01:23:06 +0200

With Emacs from BZR as of today, emacsclient -c doesn't work any more if
emacs was started as a daemon from the Linux console.

To reproduce:

On Linux console (or in a terminal with unset DISPLAY variable):

   $ emacs -Q --daemon

In X session:

   $ emacsclient -c
   Waiting for Emacs...
   *ERROR*: Wrong type argument: stringp, nil

With Emacs 24.2 everything works as expected.

In GNU Emacs 24.2.50.1 (x86_64-pc-linux-gnu, X toolkit)
 of 2012-10-19 on juno
Bzr revision: [email-masked]
Windowing system distributor `The X.Org Foundation', version 11.0.11300000
System Description:	Gentoo Base System release 2.2

Configured using:
 `configure '--prefix=/usr' '--build=x86_64-pc-linux-gnu'
 '--host=x86_64-pc-linux-gnu' '--mandir=/usr/share/man'
 '--infodir=/usr/share/info' '--datadir=/usr/share' '--sysconfdir=/etc'
 '--localstatedir=/var/lib' '--libdir=/usr/lib64'
 '--disable-dependency-tracking' '--program-suffix=-emacs-24-vcs'
 '--program-transform-name=s/emacs-[0-9].*/emacs-24-vcs/'
 '--infodir=/usr/share/info/emacs-24-vcs'
 '--enable-locallisppath=/etc/emacs:/usr/share/emacs/site-lisp'
 '--with-crt-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/../../../../lib64'
 '--with-gameuser=games' '--without-compress-info' '--without-hesiod'
 '--without-kerberos' '--without-kerberos5' '--with-gpm' '--with-dbus'
 '--without-gnutls' '--without-xml2' '--without-selinux'
 '--without-wide-int' '--with-sound' '--with-x' '--without-ns'
 '--without-gconf' '--without-gsettings' '--without-toolkit-scroll-bars'
 '--with-gif' '--with-jpeg' '--with-png' '--with-rsvg' '--with-tiff'
 '--with-xpm' '--with-imagemagick' '--with-xft' '--without-libotf'
 '--without-m17n-flt' '--with-x-toolkit=lucid' '--with-xaw3d'
 'GENTOO_PACKAGE=app-editors/emacs-vcs-24.2.9999' 'EBZR_BRANCH=trunk'
 'EBZR_REVNO=110584' 'build_alias=x86_64-pc-linux-gnu'
 'host_alias=x86_64-pc-linux-gnu' 'CFLAGS=-march=core2 -ggdb -O2 -pipe
 -O2' 'LDFLAGS=-Wl,-O1 -Wl,--as-needed' 'CPPFLAGS=''