all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Glenn Morris <rgm@gnu.org>
To: PJ Weisberg <pj@irregularexpressions.net>
Cc: 8314@debbugs.gnu.org
Subject: bug#8314: 24.0.50; emacsclient -c does the wrong thing when compiled without X
Date: Fri, 03 Jun 2011 15:49:35 -0400	[thread overview]
Message-ID: <hczklyr8z4.fsf@fencepost.gnu.org> (raw)
In-Reply-To: <AANLkTinu40-mt81VSEgVLyQLoCkYsUx2qN6932zjP+o8@mail.gmail.com> (PJ Weisberg's message of "Mon, 21 Mar 2011 18:05:50 -0700")

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.   */








  reply	other threads:[~2011-06-03 19:49 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-22  1:05 bug#8314: 24.0.50; emacsclient -c does the wrong thing when compiled without X PJ Weisberg
2011-06-03 19:49 ` Glenn Morris [this message]
2011-06-03 22:03   ` PJ Weisberg
2011-06-04  6:31     ` Eli Zaretskii
2011-06-04  8:00       ` PJ Weisberg
2011-06-04 21:35         ` Chong Yidong
2011-06-05 21:09           ` PJ Weisberg
2011-06-06 14:57           ` Stefan Monnier
2011-06-06 14:56   ` Stefan Monnier
2011-06-29  0:16     ` Glenn Morris
2011-06-30  2:09       ` Stefan Monnier
2012-04-20 10:38 ` Chong Yidong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=hczklyr8z4.fsf@fencepost.gnu.org \
    --to=rgm@gnu.org \
    --cc=8314@debbugs.gnu.org \
    --cc=pj@irregularexpressions.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.