unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Chong Yidong <cyd@stupidchicken.com>
Cc: Stefan Monnier <monnier@iro.umontreal.ca>
Subject: Re: [ottomaddox@fastmail.fm: emacsclient won't open new frame on remote display]
Date: Tue, 04 Jul 2006 16:16:04 -0400	[thread overview]
Message-ID: <873bdhdt2z.fsf@stupidchicken.com> (raw)
In-Reply-To: <E1FvdnL-00066e-61@fencepost.gnu.org> (Richard Stallman's message of "Wed, 28 Jun 2006 13:25:43 -0400")

> $ /usr/local/emacs/bin/emacs -Q &
> M-x server-start
>
> Go to a new xterm window and do this:
> $ ssh -X localhost
> $ emacsclient --display=$DISPLAY some-file
>
> The buffer for some-file is opened, but not in a new frame and is not
> displayed in any existing window.
>
> There is a connection to the display:
>
> (x-display-list)
> => (":0.0" "localhost:11.0")
>
> But even though no apparent frame was opened, I cannot close the X
> connection:
>
> (x-close-connection "localhost:11.0")
> => (error "Display still has frames on it")

I'm not sure what the relevant code in server.el, which activates when
there is no current frame on the required display, is trying to do.
What I'd naively expect should happen is to try to open a new frame on
the display, like in the patch below.

Probably there's some reason it doesn't do this?  Since Stefan wrote
this code, he probably knows what's going on here.

*** emacs/lisp/server.el.~1.112.~	2006-07-04 13:35:40.000000000 -0400
--- emacs/lisp/server.el	2006-07-04 16:11:17.000000000 -0400
***************
*** 207,220 ****
      ;; and select it.
      (unless (equal (frame-parameter (selected-frame) 'display) display)
        (select-frame
!        (make-frame-on-display
! 	display
! 	;; This frame is only there in place of an actual "current display"
! 	;; setting, so we want it to be as unobtrusive as possible.  That's
! 	;; what the invisibility is for.  The minibuffer setting is so that
! 	;; we don't end up displaying a buffer in it (which noone would
! 	;; notice).
! 	'((visibility . nil) (minibuffer . only)))))))
  
  (defun server-unquote-arg (arg)
    (replace-regexp-in-string
--- 207,213 ----
      ;; and select it.
      (unless (equal (frame-parameter (selected-frame) 'display) display)
        (select-frame
!        (make-frame-on-display display)))))
  
  (defun server-unquote-arg (arg)
    (replace-regexp-in-string
***************
*** 382,390 ****
  	  (run-hooks 'server-switch-hook)
  	  (unless nowait
  	    (message "%s" (substitute-command-keys
! 		      "When done with a buffer, type \\[server-edit]")))))
!       ;; Avoid preserving the connection after the last real frame is deleted.
!       (if tmp-frame (delete-frame tmp-frame))))
    ;; Save for later any partial line that remains.
    (when (> (length string) 0)
      (process-put proc 'previous-string string)))
--- 375,381 ----
  	  (run-hooks 'server-switch-hook)
  	  (unless nowait
  	    (message "%s" (substitute-command-keys
! 		      "When done with a buffer, type \\[server-edit]")))))))
    ;; Save for later any partial line that remains.
    (when (> (length string) 0)
      (process-put proc 'previous-string string)))

  reply	other threads:[~2006-07-04 20:16 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-28 17:25 [ottomaddox@fastmail.fm: emacsclient won't open new frame on remote display] Richard Stallman
2006-07-04 20:16 ` Chong Yidong [this message]
2006-07-04 21:04   ` Stefan Monnier
2006-07-05 13:17     ` Chong Yidong
2006-07-06 22:14       ` Stefan Monnier
2006-07-06 22:49         ` Chong Yidong
2006-07-07 15:21           ` Stefan Monnier

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=873bdhdt2z.fsf@stupidchicken.com \
    --to=cyd@stupidchicken.com \
    --cc=monnier@iro.umontreal.ca \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).