Subject: bug#8314: 24.0.50; emacsclient -c does the wrong thing when compiled without X

From: PJ Weisberg <[email-masked]>
Date: Mon, 21 Mar 2011 18:05:50 -0700

I'm reporting this with the emacs snapshot from
http://emacs.naquadah.org/, but the problem exists in Emacs 23 as
well.

1) Build emacs with '--with-x=no'.
2) Start emacs with '--daemon'.
3) From a terminal emulator under X, such as gnome-terminal, with the
$DISPLAY environment variable set, run 'emacsclient -c'.

Expected: Same behavior as when no display is available, which is to
fall back to the tty.
Observed: "Waiting for Emacs..." is printed to the terminal, then
emacsclient exits with nothing else apparently happening.

It DOES fall back to the terminal if the DISPLAY env variable is set to ''.

In GNU Emacs 24.0.50.1 (i486-pc-linux-gnu)
 of 2011-03-16 on cigue, modified by Debian
 (emacs-snapshot package, version 1:20110316-1)
configured using `configure  '--build' 'i486-linux-gnu' '--host'
'i486-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib'
'--libexecdir=/usr/lib' '--localstatedir=/var'
'--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes'
'--enable-locallisppath=/etc/emacs-snapshot:/etc/emacs:/usr/local/share/emacs/24.0.50/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.0.50/site-lisp:/usr/share/emacs/site-lisp'
'--without-compress-info' '--with-x=no' '--without-dbus'
'--without-sound' 'build_alias=i486-linux-gnu'
'host_alias=i486-linux-gnu' 'CFLAGS=-DDEBIAN
-DSITELOAD_PURESIZE_EXTRA=5000 -g -O2' 'LDFLAGS=-g -Wl,--as-needed'
'CPPFLAGS=''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Custom

Minor modes in effect:
  show-paren-mode: t
  delete-selection-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
B ESC O B ESC O B ESC O B ESC O B ESC O B ESC O B ESC
O B ESC O B ESC O B ESC O B ESC O B ESC O B ESC O B
ESC O B ESC O B ESC O B ESC O B ESC O B ESC O C RET
ESC O B ESC O B ESC O B ESC O B ESC O B ESC O B ESC
O B ESC O B ESC O B ESC O B ESC O B ESC O B ESC O B
ESC O B ESC O B ESC O B ESC O B ESC O D ESC O D ESC
O D RET ESC O A ESC O B ESC O B ESC O B ESC O B ESC
O B ESC O B ESC O B ESC O B ESC O B ESC O B ESC O B
ESC O B ESC O B ESC O B ESC O B ESC O B ESC O B ESC
O B ESC O B ESC O B ESC O B ESC O B ESC O B ESC O B
ESC O B ESC O B ESC O B ESC O B ESC O B ESC O B ESC
O B ESC O B ESC O B ESC O B ESC O B ESC O B ESC O B
ESC O B ESC O B ESC O B ESC O B ESC O B ESC O B ESC
O B ESC O B ESC O B ESC O B ESC O B ESC O B ESC O B
ESC O B ESC O B ESC O B ESC O B ESC O B ESC O B ESC
x r e p o r TAB RET

Recent messages:
Resetting customization items...done
Creating customization setup...done
To install your edits, invoke [State] and choose the Set operation
Creating customization items...
Creating group...
Creating group entries...done
Creating customization items ...done
Resetting customization items...done
Creating customization setup...done
byte-code: End of buffer [5 times]
byte-code: End of buffer

Load-path shadows:
/usr/share/emacs-snapshot/site-lisp/css-mode/css-mode hides
/usr/share/emacs/site-lisp/css-mode/css-mode
/usr/share/emacs-snapshot/site-lisp/html-helper-mode/visual-basic-mode
hides /usr/share/emacs/site-lisp/html-helper-mode/visual-basic-mode
/usr/share/emacs-snapshot/site-lisp/html-helper-mode/hhm-config hides
/usr/share/emacs/site-lisp/html-helper-mode/hhm-config
/usr/share/emacs-snapshot/site-lisp/html-helper-mode/html-helper-mode
hides /usr/share/emacs/site-lisp/html-helper-mode/html-helper-mode
/usr/share/emacs-snapshot/site-lisp/html-helper-mode/tempo hides
/usr/share/emacs/site-lisp/html-helper-mode/tempo
/usr/share/emacs/24.0.50/site-lisp/debian-startup hides
/usr/share/emacs/site-lisp/debian-startup
/usr/share/emacs-snapshot/site-lisp/html-helper-mode/tempo hides
/usr/share/emacs/24.0.50/lisp/tempo
/usr/share/emacs-snapshot/site-lisp/css-mode/css-mode hides
/usr/share/emacs/24.0.50/lisp/textmodes/css-mode

Features:
(shadow sort uudecode uce supercite regi starttls spam-report spam
spam-stat gnus-uu yenc gnus-msg gnus-art mm-uu mml2015 epg-config
mm-view mml-smime smime dig mailcap nnir gnus-sum macroexp nnoo
gnus-group gnus-undo nnmail mail-source format-spec gnus-start gnus-spec
gnus-int gnus-range gnus-win smtpmail sieve-manage shr rmail pop3
mspools metamail message rfc822 mml mml-sec mm-decode mm-bodies
mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mailabbrev
gmm-utils mailheader mairix mailclient browse-url mailalias mail-hist
mail-extr imap hashcash gnus-dired dired gnus gnus-ems nnheader fortune
feedmail eudc-vars emacsbug url-util url-parse auth-source eieio assoc
gnus-util time-date password-cache url-vars mm-util mail-prsvr ecomplete
time image binhex sendmail mail-utils cus-edit wid-edit multi-isearch
jka-compr find-func help-mode easymenu view apropos server flyspell
ispell pp byte-opt warnings advice help-fns advice-preload disp-table
enriched midnight paren delsel cus-start cus-load compile comint
regexp-opt ring tool-bar bytecomp byte-compile debian-el
debian-el-loaddefs emacs-goodies-el emacs-goodies-custom
emacs-goodies-loaddefs easy-mmode ediff-hook vc-hooks lisp-float-type
lisp-mode register page menu-bar rfn-eshadow timer select mouse jit-lock
font-lock syntax facemenu font-core frame cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew
greek romanian slovak czech european ethiopic indian cyrillic chinese
case-table epa-hook jka-cmpr-hook help simple abbrev loaddefs button
minibuffer faces cus-face files text-properties overlay md5 base64
format env code-pages mule custom widget hashtable-print-readable
backquote make-network-process multi-tty emacs)