From unknown Sat Aug 16 12:40:49 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#8314 <8314@debbugs.gnu.org> To: bug#8314 <8314@debbugs.gnu.org> Subject: Status: 24.0.50; emacsclient -c does the wrong thing when compiled without X Reply-To: bug#8314 <8314@debbugs.gnu.org> Date: Sat, 16 Aug 2025 19:40:49 +0000 retitle 8314 24.0.50; emacsclient -c does the wrong thing when compiled wit= hout X reassign 8314 emacs submitter 8314 PJ Weisberg severity 8314 minor thanks From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 21 21:06:09 2011 Received: (at submit) by debbugs.gnu.org; 22 Mar 2011 01:06:09 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Q1q2y-0008Ih-Pt for submit@debbugs.gnu.org; Mon, 21 Mar 2011 21:06:09 -0400 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Q1q2w-0008IH-9k for submit@debbugs.gnu.org; Mon, 21 Mar 2011 21:06:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q1q2p-0005WO-NO for submit@debbugs.gnu.org; Mon, 21 Mar 2011 21:06:00 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([199.232.76.165]:40163) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q1q2p-0005WK-KX for submit@debbugs.gnu.org; Mon, 21 Mar 2011 21:05:59 -0400 Received: from [140.186.70.92] (port=38970 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q1q2o-0002Qu-7h for bug-gnu-emacs@gnu.org; Mon, 21 Mar 2011 21:05:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q1q2m-0005VW-9P for bug-gnu-emacs@gnu.org; Mon, 21 Mar 2011 21:05:58 -0400 Received: from p3plsmtpa01-07.prod.phx3.secureserver.net ([72.167.82.87]:42816) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1Q1q2l-0005VA-UZ for bug-gnu-emacs@gnu.org; Mon, 21 Mar 2011 21:05:56 -0400 Received: (qmail 9410 invoked from network); 22 Mar 2011 01:05:53 -0000 Received: from unknown (209.85.161.41) by p3plsmtpa01-07.prod.phx3.secureserver.net (72.167.82.87) with ESMTP; 22 Mar 2011 01:05:52 -0000 Received: by fxm18 with SMTP id 18so6940018fxm.0 for ; Mon, 21 Mar 2011 18:05:50 -0700 (PDT) MIME-Version: 1.0 Received: by 10.223.14.137 with SMTP id g9mr78107faa.1.1300755950097; Mon, 21 Mar 2011 18:05:50 -0700 (PDT) Received: by 10.223.102.68 with HTTP; Mon, 21 Mar 2011 18:05:50 -0700 (PDT) Date: Mon, 21 Mar 2011 18:05:50 -0700 Message-ID: Subject: 24.0.50; emacsclient -c does the wrong thing when compiled without X From: PJ Weisberg To: bug-gnu-emacs@gnu.org Content-Type: text/plain; charset=ISO-8859-1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 199.232.76.165 X-Spam-Score: -5.6 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.8 (-----) 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) From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 03 15:49:44 2011 Received: (at 8314) by debbugs.gnu.org; 3 Jun 2011 19:49:44 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QSaNM-0003RQ-BK for submit@debbugs.gnu.org; Fri, 03 Jun 2011 15:49:44 -0400 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QSaNK-0003RE-Fe for 8314@debbugs.gnu.org; Fri, 03 Jun 2011 15:49:43 -0400 Received: from localhost ([127.0.0.1]:45084) by fencepost.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QSaND-0001oZ-Se; Fri, 03 Jun 2011 15:49:36 -0400 From: Glenn Morris To: PJ Weisberg Subject: Re: bug#8314: 24.0.50; emacsclient -c does the wrong thing when compiled without X References: X-Spook: COSCO quiche ASDIC JFK broadside Gazprom credit card X-Ran: lbSkJt4cv)GWz54W9y14@U&qaSi`Y!QoqVQ]sFKu57Tbl{;)V0Jy~9XXXjf;2r%Z[cWE}$ X-Hue: yellow X-Attribution: GM Date: Fri, 03 Jun 2011 15:49:35 -0400 In-Reply-To: (PJ Weisberg's message of "Mon, 21 Mar 2011 18:05:50 -0700") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -6.3 (------) X-Debbugs-Envelope-To: 8314 Cc: 8314@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.3 (------) PJ Weisberg wrote: > 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. I get: *ERROR*: Don't know how to create a frame on window system x which seems reasonable. If we are allowed to assume that emacsclient is used with the same version of Emacs as it was compiled with, then it seems easy to get the behaviour you want, see patch. However, if you want to use the same emacsclient binary with both Emacs compiled with-x and without-x, then it won't work. Assuming you use the emacsclient from a build with-x, though, then you are no worse off than you are now. I wonder if it would be better to not accept the `-c' option in a without-x build. *** lib-src/emacsclient.c 2011-06-01 17:15:27 +0000 --- lib-src/emacsclient.c 2011-06-03 19:16:27 +0000 *************** *** 144,151 **** /* The parent window ID, if we are opening a frame via XEmbed. */ char *parent_id = NULL; ! /* Nonzero means open a new Emacs frame on the current terminal. */ int tty = 0; /* If non-NULL, the name of an editor to fallback to if the server is not running. --alternate-editor. */ --- 144,158 ---- /* The parent window ID, if we are opening a frame via XEmbed. */ char *parent_id = NULL; ! /* Nonzero means open a new Emacs frame on the current terminal. ! If Emacs was built without X, we must do this. ! (This assumes emacsclient is used with the same version of Emacs ! as it was compiled with.) */ ! #if defined(HAVE_X_WINDOWS) || defined(HAVE_NS) || defined(WINDOWSNT) int tty = 0; + #else + int tty = 1; + #endif /* If non-NULL, the name of an editor to fallback to if the server is not running. --alternate-editor. */ From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 03 18:03:28 2011 Received: (at 8314) by debbugs.gnu.org; 3 Jun 2011 22:03:28 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QScSl-0006ZC-M1 for submit@debbugs.gnu.org; Fri, 03 Jun 2011 18:03:28 -0400 Received: from smtpauth19.prod.mesa1.secureserver.net ([64.202.165.30]) by debbugs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1QScSk-0006Yx-7q for 8314@debbugs.gnu.org; Fri, 03 Jun 2011 18:03:27 -0400 Received: (qmail 1384 invoked from network); 3 Jun 2011 22:03:20 -0000 Received: from unknown (209.85.161.44) by smtpauth19.prod.mesa1.secureserver.net (64.202.165.30) with ESMTP; 03 Jun 2011 22:03:20 -0000 Received: by fxm15 with SMTP id 15so1545653fxm.3 for <8314@debbugs.gnu.org>; Fri, 03 Jun 2011 15:03:18 -0700 (PDT) MIME-Version: 1.0 Received: by 10.223.23.143 with SMTP id r15mr2694538fab.29.1307138598083; Fri, 03 Jun 2011 15:03:18 -0700 (PDT) Received: by 10.223.93.208 with HTTP; Fri, 3 Jun 2011 15:03:18 -0700 (PDT) In-Reply-To: References: Date: Fri, 3 Jun 2011 15:03:18 -0700 Message-ID: Subject: Re: bug#8314: 24.0.50; emacsclient -c does the wrong thing when compiled without X From: PJ Weisberg To: Glenn Morris Content-Type: text/plain; charset=ISO-8859-1 X-Spam-Score: -3.7 (---) X-Debbugs-Envelope-To: 8314 Cc: 8314@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.6 (---) On Fri, Jun 3, 2011 at 12:49 PM, Glenn Morris wrote: > If we are allowed to assume that emacsclient is used with the same > version of Emacs as it was compiled with, then it seems easy to get the > behaviour you want, see patch. However, if you want to use the same > emacsclient binary with both Emacs compiled with-x and without-x, then > it won't work. Assuming you use the emacsclient from a build with-x, > though, then you are no worse off than you are now. I'm not somewhere where I can compile and test right now, but that *looks* like it'll do what I want. I'll come back and complain some more over the weekend if I try it and it doesn't. ;-) > I wonder if it would be better to not accept the `-c' option in a > without-x build. I think that if there's no useable graphical display for *any* reason, '-c' should be a synonym for '-t'. The man page for emacsclient just says "create a new frame instead of trying to use the current Emacs frame" for that option, so the user hasn't *really* requested a graphical frame. -PJ From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 04 02:31:47 2011 Received: (at 8314) by debbugs.gnu.org; 4 Jun 2011 06:31:47 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QSkOg-0000km-Rd for submit@debbugs.gnu.org; Sat, 04 Jun 2011 02:31:47 -0400 Received: from mtaout22.012.net.il ([80.179.55.172]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QSkOe-0000kZ-24 for 8314@debbugs.gnu.org; Sat, 04 Jun 2011 02:31:45 -0400 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0LM900I006262000@a-mtaout22.012.net.il> for 8314@debbugs.gnu.org; Sat, 04 Jun 2011 09:31:38 +0300 (IDT) Received: from HOME-C4E4A596F7 ([84.229.223.140]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LM900IGE64O0710@a-mtaout22.012.net.il>; Sat, 04 Jun 2011 09:31:38 +0300 (IDT) Date: Sat, 04 Jun 2011 09:31:50 +0300 From: Eli Zaretskii Subject: Re: bug#8314: 24.0.50; emacsclient -c does the wrong thing when compiled without X In-reply-to: X-012-Sender: halo1@inter.net.il To: PJ Weisberg Message-id: <83boyeds4p.fsf@gnu.org> References: X-Spam-Score: -2.0 (--) X-Debbugs-Envelope-To: 8314 Cc: rgm@gnu.org, 8314@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.0 (--) > Date: Fri, 3 Jun 2011 15:03:18 -0700 > From: PJ Weisberg > Cc: 8314@debbugs.gnu.org > > I think that if there's no useable graphical display for *any* reason, > '-c' should be a synonym for '-t'. I'm not at all sure that's TRT. Next you will be saying that if -t is not available either, emacsclient should start a new Emacs session. > The man page for emacsclient just says "create a new frame instead > of trying to use the current Emacs frame" for that option The man page is not up to date with the latest changes in emacsclient, IMO. From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 04 04:00:36 2011 Received: (at 8314) by debbugs.gnu.org; 4 Jun 2011 08:00:36 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QSlmd-0002dG-PR for submit@debbugs.gnu.org; Sat, 04 Jun 2011 04:00:36 -0400 Received: from smtpauth23.prod.mesa1.secureserver.net ([64.202.165.47]) by debbugs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1QSlmc-0002d4-3h for 8314@debbugs.gnu.org; Sat, 04 Jun 2011 04:00:34 -0400 Received: (qmail 28373 invoked from network); 4 Jun 2011 08:00:28 -0000 Received: from unknown (209.85.161.44) by smtpauth23.prod.mesa1.secureserver.net (64.202.165.47) with ESMTP; 04 Jun 2011 08:00:27 -0000 Received: by fxm15 with SMTP id 15so1668070fxm.3 for <8314@debbugs.gnu.org>; Sat, 04 Jun 2011 01:00:25 -0700 (PDT) MIME-Version: 1.0 Received: by 10.223.23.143 with SMTP id r15mr3030363fab.29.1307174425626; Sat, 04 Jun 2011 01:00:25 -0700 (PDT) Received: by 10.223.93.208 with HTTP; Sat, 4 Jun 2011 01:00:25 -0700 (PDT) In-Reply-To: <83boyeds4p.fsf@gnu.org> References: <83boyeds4p.fsf@gnu.org> Date: Sat, 4 Jun 2011 01:00:25 -0700 Message-ID: Subject: Re: bug#8314: 24.0.50; emacsclient -c does the wrong thing when compiled without X From: PJ Weisberg To: Eli Zaretskii Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -3.6 (---) X-Debbugs-Envelope-To: 8314 Cc: "rgm@gnu.org" , "8314@debbugs.gnu.org" <8314@debbugs.gnu.org>, PJ Weisberg X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.5 (---) On Friday, June 3, 2011, Eli Zaretskii wrote: >> Date: Fri, 3 Jun 2011 15:03:18 -0700 >> From: PJ Weisberg >> Cc: 8314@debbugs.gnu.org >> >> I think that if there's no useable graphical display for *any* reason, >> '-c' should be a synonym for '-t'. > > I'm not at all sure that's TRT. =A0Next you will be saying that if -t is > not available either, emacsclient should start a new Emacs session. There's already the -a=3D"" option if I want that. '-c' already acts the same as '-t' if you're at a terminal with no graphical display. Really I just want to say, "open whatever type of frame Emacs would normally open." In the script I was writing when I wrote this report I eventually used `if emacs -Q --batch --eval "(kill-emacs (if (featurep 'x) 0 1))"' to decide whether to creat a graphical frame or use --tty. --=20 -PJ From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 04 17:36:01 2011 Received: (at 8314) by debbugs.gnu.org; 4 Jun 2011 21:36:01 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QSyVk-0005o3-VN for submit@debbugs.gnu.org; Sat, 04 Jun 2011 17:36:01 -0400 Received: from vm-emlprdomr-03.its.yale.edu ([130.132.50.144]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QSyVk-0005nr-4L for 8314@debbugs.gnu.org; Sat, 04 Jun 2011 17:36:00 -0400 Received: from furball ([64.134.101.122]) (authenticated bits=0) by vm-emlprdomr-03.its.yale.edu (8.14.4/8.14.4) with ESMTP id p54LZs5i014126 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sat, 4 Jun 2011 17:35:54 -0400 Received: by furball (Postfix, from userid 1000) id 359AB16051D; Sat, 4 Jun 2011 17:35:54 -0400 (EDT) From: Chong Yidong To: PJ Weisberg Subject: Re: bug#8314: 24.0.50; emacsclient -c does the wrong thing when compiled without X References: <83boyeds4p.fsf@gnu.org> Date: Sat, 04 Jun 2011 17:35:53 -0400 In-Reply-To: (PJ Weisberg's message of "Sat, 4 Jun 2011 01:00:25 -0700") Message-ID: <87r5792sau.fsf@stupidchicken.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 2.71 on 130.132.50.144 X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 8314 Cc: "rgm@gnu.org" , Eli Zaretskii , "8314@debbugs.gnu.org" <8314@debbugs.gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) PJ Weisberg writes: >>> I think that if there's no useable graphical display for *any* >>> reason, '-c' should be a synonym for '-t'. >> >> I'm not at all sure that's TRT. =C2=A0Next you will be saying that if -t >> is not available either, emacsclient should start a new Emacs >> session. > > Really I just want to say, "open whatever type of frame Emacs would > normally open." > > In the script I was writing when I wrote this report I eventually used > `if emacs -Q --batch --eval "(kill-emacs (if (featurep 'x) 0 1))"' to > decide whether to creat a graphical frame or use --tty. What if the user wants emacsclient to exit if no graphical frame can be created? From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 05 17:09:41 2011 Received: (at 8314) by debbugs.gnu.org; 5 Jun 2011 21:09:41 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QTKZp-00082D-7v for submit@debbugs.gnu.org; Sun, 05 Jun 2011 17:09:41 -0400 Received: from p3plsmtpa06-04.prod.phx3.secureserver.net ([173.201.192.105]) by debbugs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1QTKZm-000821-Tq for 8314@debbugs.gnu.org; Sun, 05 Jun 2011 17:09:40 -0400 Received: (qmail 30215 invoked from network); 5 Jun 2011 21:09:32 -0000 Received: from unknown (209.85.161.44) by p3plsmtpa06-04.prod.phx3.secureserver.net (173.201.192.105) with ESMTP; 05 Jun 2011 21:09:32 -0000 Received: by fxm15 with SMTP id 15so2104709fxm.3 for <8314@debbugs.gnu.org>; Sun, 05 Jun 2011 14:09:30 -0700 (PDT) MIME-Version: 1.0 Received: by 10.223.10.150 with SMTP id p22mr1806773fap.86.1307308170758; Sun, 05 Jun 2011 14:09:30 -0700 (PDT) Received: by 10.223.93.208 with HTTP; Sun, 5 Jun 2011 14:09:30 -0700 (PDT) In-Reply-To: <87r5792sau.fsf@stupidchicken.com> References: <83boyeds4p.fsf@gnu.org> <87r5792sau.fsf@stupidchicken.com> Date: Sun, 5 Jun 2011 14:09:30 -0700 Message-ID: Subject: Re: bug#8314: 24.0.50; emacsclient -c does the wrong thing when compiled without X From: PJ Weisberg To: Chong Yidong Content-Type: text/plain; charset=ISO-8859-1 X-Spam-Score: -3.5 (---) X-Debbugs-Envelope-To: 8314 Cc: "rgm@gnu.org" , Eli Zaretskii , "8314@debbugs.gnu.org" <8314@debbugs.gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.4 (---) On Sat, Jun 4, 2011 at 2:35 PM, Chong Yidong wrote: > What if the user wants emacsclient to exit if no graphical frame can be > created? Perhaps I'm guilty of the sin of assuming everyone uses the system the way I use it. I can think of very few situations where I want to open an Emacs frame, but I'd rather have it fail than open in a terminal. In any case, I think Emacs without X support should behave the same as Emacs in an X-less environment. You know a priori that we're not going to open a graphical frame. -PJ From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 06 10:56:47 2011 Received: (at 8314) by debbugs.gnu.org; 6 Jun 2011 14:56:47 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QTbEV-0000Bi-Dp for submit@debbugs.gnu.org; Mon, 06 Jun 2011 10:56:47 -0400 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QTbES-0000BV-TI for 8314@debbugs.gnu.org; Mon, 06 Jun 2011 10:56:45 -0400 Received: from 213-159-126-200.fibertel.com.ar ([200.126.159.213]:36453 helo=ceviche.home) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1QTbEL-0005Fu-UM; Mon, 06 Jun 2011 10:56:38 -0400 Received: by ceviche.home (Postfix, from userid 20848) id 0B98166189; Mon, 6 Jun 2011 11:56:35 -0300 (ART) From: Stefan Monnier To: Glenn Morris Subject: Re: bug#8314: 24.0.50; emacsclient -c does the wrong thing when compiled without X Message-ID: References: Date: Mon, 06 Jun 2011 11:56:34 -0300 In-Reply-To: (Glenn Morris's message of "Fri, 03 Jun 2011 15:49:35 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -6.0 (------) X-Debbugs-Envelope-To: 8314 Cc: 8314@debbugs.gnu.org, PJ Weisberg X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.0 (------) > I wonder if it would be better to not accept the `-c' option in a > without-x build. Whatever we do, we should do it in server.el, not in emacsclient.c. I guess it'd be OK for -c to fallback to use the tty if the server was compiled without GUI. Stefan From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 06 10:58:05 2011 Received: (at 8314) by debbugs.gnu.org; 6 Jun 2011 14:58:05 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QTbFk-0000EL-PA for submit@debbugs.gnu.org; Mon, 06 Jun 2011 10:58:04 -0400 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QTbFi-0000Dq-LH for 8314@debbugs.gnu.org; Mon, 06 Jun 2011 10:58:03 -0400 Received: from 213-159-126-200.fibertel.com.ar ([200.126.159.213]:36454 helo=ceviche.home) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1QTbFc-0005J1-94; Mon, 06 Jun 2011 10:57:56 -0400 Received: by ceviche.home (Postfix, from userid 20848) id D693466189; Mon, 6 Jun 2011 11:57:53 -0300 (ART) From: Stefan Monnier To: Chong Yidong Subject: Re: bug#8314: 24.0.50; emacsclient -c does the wrong thing when compiled without X Message-ID: References: <83boyeds4p.fsf@gnu.org> <87r5792sau.fsf@stupidchicken.com> Date: Mon, 06 Jun 2011 11:57:53 -0300 In-Reply-To: <87r5792sau.fsf@stupidchicken.com> (Chong Yidong's message of "Sat, 04 Jun 2011 17:35:53 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -6.0 (------) X-Debbugs-Envelope-To: 8314 Cc: "8314@debbugs.gnu.org" <8314@debbugs.gnu.org>, PJ Weisberg X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.0 (------) > What if the user wants emacsclient to exit if no graphical frame can be > created? Sounds rather far fetched, and --eval can be used for such corner cases. Stefan From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 28 20:17:07 2011 Received: (at 8314) by debbugs.gnu.org; 29 Jun 2011 00:17:07 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QbiSo-0006mV-RK for submit@debbugs.gnu.org; Tue, 28 Jun 2011 20:17:07 -0400 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QbiSm-0006lz-R2 for 8314@debbugs.gnu.org; Tue, 28 Jun 2011 20:17:05 -0400 Received: from localhost ([127.0.0.1]:46066) by fencepost.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QbiSg-0004Vr-2W; Tue, 28 Jun 2011 20:16:58 -0400 From: Glenn Morris To: Stefan Monnier Subject: Re: bug#8314: 24.0.50; emacsclient -c does the wrong thing when compiled without X References: X-Spook: CIA airframe Adriatic fundamentalist Peking Arnett X-Ran: ^`=8g!ZEW_CP6#l<_L/tl{,^{>grnCT)\19b{L"jJ>u1'B3n~['=|,t{}QLZ6/H8}_2*f. X-Hue: blue X-Attribution: GM Date: Tue, 28 Jun 2011 20:16:57 -0400 In-Reply-To: (Stefan Monnier's message of "Mon, 06 Jun 2011 11:56:34 -0300") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -6.4 (------) X-Debbugs-Envelope-To: 8314 Cc: 8314@debbugs.gnu.org, PJ Weisberg X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.4 (------) Stefan Monnier wrote: > Whatever we do, we should do it in server.el, not in emacsclient.c. Not trivially doable, since emacsclient.c is the one that figures out the tty name and type (when needed; find_tty) and passes them to the server. emacsclient.c would have to be modified to pass this info in all cases (except --eval?), and some new tty-flag added to distinguish between "tty requested" and "tty to be used as fallback if Emacs compiled without X" (since -tty on its own would no longer be enough). From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 29 22:09:41 2011 Received: (at 8314) by debbugs.gnu.org; 30 Jun 2011 02:09:41 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Qc6hI-0005QC-Fo for submit@debbugs.gnu.org; Wed, 29 Jun 2011 22:09:40 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.183] helo=ironport2-out.pppoe.ca) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Qc6hD-0005Pj-Fx for 8314@debbugs.gnu.org; Wed, 29 Jun 2011 22:09:36 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0EAAPaC05MCqDH/2dsb2JhbABSp1h4iHjBL4YwBJ4/hCs X-IronPort-AV: E=Sophos;i="4.65,446,1304308800"; d="scan'208";a="117555282" Received: from 76-10-160-199.dsl.teksavvy.com (HELO pastel.home) ([76.10.160.199]) by ironport2-out.pppoe.ca with ESMTP/TLS/ADH-AES256-SHA; 29 Jun 2011 22:09:29 -0400 Received: by pastel.home (Postfix, from userid 20848) id 214A959057; Wed, 29 Jun 2011 22:09:29 -0400 (EDT) From: Stefan Monnier To: Glenn Morris Subject: Re: bug#8314: 24.0.50; emacsclient -c does the wrong thing when compiled without X Message-ID: References: Date: Wed, 29 Jun 2011 22:09:29 -0400 In-Reply-To: (Glenn Morris's message of "Tue, 28 Jun 2011 20:16:57 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.1 (--) X-Debbugs-Envelope-To: 8314 Cc: 8314@debbugs.gnu.org, PJ Weisberg X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.1 (--) >> Whatever we do, we should do it in server.el, not in emacsclient.c. > Not trivially doable, since emacsclient.c is the one that figures out > the tty name and type (when needed; find_tty) and passes them to the > server. emacsclient.c would have to be modified to pass this info in all > cases Yup. Doesn't sound like a big deal. > (except --eval?) No need for any exception there. > and some new tty-flag added to distinguish between "tty requested" and > "tty to be used as fallback if Emacs compiled without X" (since -tty > on its own would no longer be enough). Adding a "tty requested" flag doesn't sound particularly hard either. Stefan From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 20 06:39:12 2012 Received: (at 8314) by debbugs.gnu.org; 20 Apr 2012 10:39:12 +0000 Received: from localhost ([127.0.0.1]:43620 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SLBF9-00048C-6S for submit@debbugs.gnu.org; Fri, 20 Apr 2012 06:39:12 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:54883 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SLBF6-000483-4R for 8314@debbugs.gnu.org; Fri, 20 Apr 2012 06:39:08 -0400 Received: from [155.69.18.143] (port=51072 helo=ulysses) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1SLBEf-0003Ar-AW; Fri, 20 Apr 2012 06:38:42 -0400 From: Chong Yidong To: PJ Weisberg Subject: Re: bug#8314: 24.0.50; emacsclient -c does the wrong thing when compiled without X References: Date: Fri, 20 Apr 2012 18:38:33 +0800 In-Reply-To: (PJ Weisberg's message of "Mon, 21 Mar 2011 18:05:50 -0700") Message-ID: <87vcku8z86.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.95 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -6.9 (------) X-Debbugs-Envelope-To: 8314 Cc: 8314@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) PJ Weisberg writes: > 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 ''. Fixed in trunk. Thanks for the report. From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 20 06:39:19 2012 Received: (at control) by debbugs.gnu.org; 20 Apr 2012 10:39:19 +0000 Received: from localhost ([127.0.0.1]:43623 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SLBFG-00048Y-IC for submit@debbugs.gnu.org; Fri, 20 Apr 2012 06:39:19 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:54887 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SLBFE-00048R-U9 for control@debbugs.gnu.org; Fri, 20 Apr 2012 06:39:17 -0400 Received: from [155.69.18.143] (port=51073 helo=ulysses) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1SLBEp-0003BZ-LV for control@debbugs.gnu.org; Fri, 20 Apr 2012 06:38:52 -0400 From: Chong Yidong To: control@debbugs.gnu.org Subject: close 8314 Date: Fri, 20 Apr 2012 18:38:45 +0800 Message-ID: <87ty0eelhm.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -6.9 (------) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) close 8314 thanks From unknown Sat Aug 16 12:40:49 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 18 May 2012 11:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator