emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: address@hidden: emacsclient won't open new frame on remote display]


From: Chong Yidong
Subject: Re: address@hidden: emacsclient won't open new frame on remote display]
Date: Tue, 04 Jul 2006 16:16:04 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

> $ /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 via email to

[Prev in Thread] Current Thread [Next in Thread]