help-gnu-emacs
[Top][All Lists]
Advanced

[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 17:38:04 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux)

At Wed, 29 Aug 2007 21:36:48 +0200 Reiner Steib <reinersteib+gmane@imap.cc> 
wrote:

> On Wed, Aug 29 2007, Allan Gottlieb wrote:
>
>> 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.
>
> 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).

I have emacs-22.1.  When I do
   customize-option    for `server-window'
the only choices I get are
   use selected
   use pop-to-buffer
   other function

Currently I have `other-function' and use my simple adaptation of
tom's code.  It works fine.

I just now changed the `other function' to your suggestion of
switch-to-buffer-other-frame and that also works fine.

If `display in new frame' is available as a customize option in newer
version of emacs, I will change to 'display in new frame' when that
newer version of emacs hits gentoo stable.

If `display in new frame' is not available as a customize option in
emacs, I agree with you that it would be a good addition.

allan

PS thanks for your help with emacs and gnus




reply via email to

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