Re: new frame for emacsclient-emacs (v22)

From:

Reiner Steib

Subject:

Re: new frame for emacsclient-emacs (v22)

Date:

Wed, 29 Aug 2007 21:36:48 +0200

User-agent:

Gnus/5.110007 (No Gnus v0.7) Emacs/22.1.50 (gnu/linux)

On Wed, Aug 29 2007, Allan Gottlieb wrote:
> At Wed, 29 Aug 2007 10:15:27 -0600 Tom Tromey <address@hidden> wrote:
>>>>>>> "Allan" == Allan Gottlieb <address@hidden> 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.
Shouldn't the existing customize choice "Display in new frame"
(switch-to-buffer-other-frame) already do the same? If not, I think
we should add a predefined function doing what Allan expects (I think
this is a very common wish).
Bye, Reiner.
--
,,,
(o o)
---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/