[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: new frame for emacsclient-emacs (v22)
From: |
Allan Gottlieb |
Subject: |
Re: new frame for emacsclient-emacs (v22) |
Date: |
Wed, 29 Aug 2007 13:05:35 -0400 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) |
At Wed, 29 Aug 2007 10:15:27 -0600 Tom Tromey <tromey@redhat.com> wrote:
>>>>>> "Allan" == Allan Gottlieb <gottlieb@nyu.edu> writes:
>
> Allan> I would like emacsclient-emacs (this is the name of the executable on
> Allan> my gentoo system; I had thought it was simply emacsclient), to show
> Allan> the requested file in a new frame. I have set server-window to
> Allan> `pop-to-buffer', but that does not create a new frame.
>
> Try setting server-window to a function that makes a frame and
> displays your buffer in it.
>
> This is untested but may do what you want:
>
> (defun server-make-frame-for-buffer (buffer)
> (if multiple-frames
> (let ((frame (make-frame)))
> (set-window-buffer (frame-selected-window frame) buffer)
> (select-frame-set-input-focus frame))
> (pop-to-buffer buffer)))
Thanks. I changed `multiple-frames' to `window-system' since
sometimes the server emacs has only one frame.
Works very well; thanks again,
allan