* emacs server and new frames
@ 2006-06-05 15:04 Sam Steingold
2006-06-05 16:21 ` Kevin Rodgers
` (3 more replies)
0 siblings, 4 replies; 9+ messages in thread
From: Sam Steingold @ 2006-06-05 15:04 UTC (permalink / raw)
GNU Emacs 22.0.50.4 (i686-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
of 2006-06-05 on quant8
I want buffers created by the emacs server to show up in their own
frames, so I do
(add-hook 'server-switch-hook 'new-frame)
(custom-set-variables '(server-window 'pop-to-buffer))
the result is that the server buffer is shown both in a new frame and a
new window in an existing frame.
neither *Help*, nor *info*, nor the source are helpful...
--
Sam Steingold (http://www.podval.org/~sds) on Fedora Core release 5 (Bordeaux)
http://jihadwatch.org http://mideasttruth.com http://camera.org
http://honestreporting.com http://iris.org.il http://palestinefacts.org
Garbage In, Gospel Out
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: emacs server and new frames
2006-06-05 15:04 emacs server and new frames Sam Steingold
@ 2006-06-05 16:21 ` Kevin Rodgers
2006-06-05 16:49 ` Sam Steingold
2006-06-05 16:42 ` Chong Yidong
` (2 subsequent siblings)
3 siblings, 1 reply; 9+ messages in thread
From: Kevin Rodgers @ 2006-06-05 16:21 UTC (permalink / raw)
Sam Steingold wrote:
> GNU Emacs 22.0.50.4 (i686-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
> of 2006-06-05 on quant8
>
> I want buffers created by the emacs server to show up in their own
> frames, so I do
>
> (add-hook 'server-switch-hook 'new-frame)
> (custom-set-variables '(server-window 'pop-to-buffer))
>
> the result is that the server buffer is shown both in a new frame and a
> new window in an existing frame.
> neither *Help*, nor *info*, nor the source are helpful...
You could try setting server-window to a function that doesn't do
anything, like 'ignore or 'identity.
--
Kevin
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: emacs server and new frames
2006-06-05 15:04 emacs server and new frames Sam Steingold
2006-06-05 16:21 ` Kevin Rodgers
@ 2006-06-05 16:42 ` Chong Yidong
2006-06-05 16:50 ` Drew Adams
2006-06-05 16:51 ` Sam Steingold
2006-06-05 18:14 ` Andreas Schwab
2006-06-06 1:20 ` Stefan Monnier
3 siblings, 2 replies; 9+ messages in thread
From: Chong Yidong @ 2006-06-05 16:42 UTC (permalink / raw)
Sam Steingold <sds@podval.org> writes:
> I want buffers created by the emacs server to show up in their own
> frames, so I do
>
> (add-hook 'server-switch-hook 'new-frame)
> (custom-set-variables '(server-window 'pop-to-buffer))
>
> the result is that the server buffer is shown both in a new frame and a
> new window in an existing frame.
> neither *Help*, nor *info*, nor the source are helpful...
I do
(add-hook 'server-visit-hook
'(lambda () (setq server-window (new-frame))))
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: emacs server and new frames
2006-06-05 16:21 ` Kevin Rodgers
@ 2006-06-05 16:49 ` Sam Steingold
0 siblings, 0 replies; 9+ messages in thread
From: Sam Steingold @ 2006-06-05 16:49 UTC (permalink / raw)
> * Kevin Rodgers <vuf_4664@lnubb.pbz> [2006-06-05 10:21:19 -0600]:
>
> Sam Steingold wrote:
>> GNU Emacs 22.0.50.4 (i686-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
>> of 2006-06-05 on quant8
>>
>> I want buffers created by the emacs server to show up in their own
>> frames, so I do
>>
>> (add-hook 'server-switch-hook 'new-frame)
>> (custom-set-variables '(server-window 'pop-to-buffer))
>>
>> the result is that the server buffer is shown both in a new frame and a
>> new window in an existing frame.
>> neither *Help*, nor *info*, nor the source are helpful...
>
> You could try setting server-window to a function that doesn't do
> anything, like 'ignore or 'identity.
a new frame is created, but the server buffer is not shown there.
--
Sam Steingold (http://www.podval.org/~sds) on Fedora Core release 5 (Bordeaux)
http://pmw.org.il http://iris.org.il http://memri.org http://ffii.org
http://thereligionofpeace.com http://palestinefacts.org http://truepeace.org
Even Windows doesn't suck, when you use Common Lisp
^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: emacs server and new frames
2006-06-05 16:42 ` Chong Yidong
@ 2006-06-05 16:50 ` Drew Adams
2006-06-06 1:16 ` Stefan Monnier
2006-06-05 16:51 ` Sam Steingold
1 sibling, 1 reply; 9+ messages in thread
From: Drew Adams @ 2006-06-05 16:50 UTC (permalink / raw)
> (add-hook 'server-switch-hook 'new-frame)
> (custom-set-variables '(server-window 'pop-to-buffer))
I do (add-hook 'server-visit-hook
'(lambda () (setq server-window (new-frame))))
A propos - Shouldn't these variables (server-*) be recognized by `C-h v'
without loading server.el?
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: emacs server and new frames
2006-06-05 16:42 ` Chong Yidong
2006-06-05 16:50 ` Drew Adams
@ 2006-06-05 16:51 ` Sam Steingold
1 sibling, 0 replies; 9+ messages in thread
From: Sam Steingold @ 2006-06-05 16:51 UTC (permalink / raw)
> * Chong Yidong <plq@fghcvqpuvpxra.pbz> [2006-06-05 12:42:39 -0400]:
>
> Sam Steingold <sds@podval.org> writes:
>
>> I want buffers created by the emacs server to show up in their own
>> frames, so I do
>>
>> (add-hook 'server-switch-hook 'new-frame)
>> (custom-set-variables '(server-window 'pop-to-buffer))
>>
>> the result is that the server buffer is shown both in a new frame and a
>> new window in an existing frame.
>> neither *Help*, nor *info*, nor the source are helpful...
>
> I do
>
> (add-hook 'server-visit-hook
> '(lambda () (setq server-window (new-frame))))
I do not observe any change in behaviour.
--
Sam Steingold (http://www.podval.org/~sds) on Fedora Core release 5 (Bordeaux)
http://pmw.org.il http://openvotingconsortium.org http://dhimmi.com
http://mideasttruth.com http://memri.org http://honestreporting.com
Lisp: its not just for geniuses anymore.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: emacs server and new frames
2006-06-05 15:04 emacs server and new frames Sam Steingold
2006-06-05 16:21 ` Kevin Rodgers
2006-06-05 16:42 ` Chong Yidong
@ 2006-06-05 18:14 ` Andreas Schwab
2006-06-06 1:20 ` Stefan Monnier
3 siblings, 0 replies; 9+ messages in thread
From: Andreas Schwab @ 2006-06-05 18:14 UTC (permalink / raw)
Sam Steingold <sds@podval.org> writes:
> I want buffers created by the emacs server to show up in their own
> frames, so I do
>
> (add-hook 'server-switch-hook 'new-frame)
> (custom-set-variables '(server-window 'pop-to-buffer))
This is what I'm using:
(defun server-done-maybe-delete-frame ()
(if (and (not server-clients)
(frame-live-p server-window))
(delete-frame server-window)))
(add-hook 'server-done-hook 'server-done-maybe-delete-frame)
(defun server-window-create-frame (next-buffer)
(setq server-window (make-frame))
(server-switch-buffer next-buffer))
(setq server-window 'server-window-create-frame)
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: emacs server and new frames
2006-06-05 16:50 ` Drew Adams
@ 2006-06-06 1:16 ` Stefan Monnier
0 siblings, 0 replies; 9+ messages in thread
From: Stefan Monnier @ 2006-06-06 1:16 UTC (permalink / raw)
Cc: emacs-devel
> A propos - Shouldn't these variables (server-*) be recognized by `C-h v'
> without loading server.el?
No: a user should not expect foo-* variables to be recognized by C-h v until
`foo' is loaded.
Stefan
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: emacs server and new frames
2006-06-05 15:04 emacs server and new frames Sam Steingold
` (2 preceding siblings ...)
2006-06-05 18:14 ` Andreas Schwab
@ 2006-06-06 1:20 ` Stefan Monnier
3 siblings, 0 replies; 9+ messages in thread
From: Stefan Monnier @ 2006-06-06 1:20 UTC (permalink / raw)
> (add-hook 'server-switch-hook 'new-frame)
IIRC using server-switch-hook had problems because it's either not always
called when you need the new frame, or it's also called at times when you
don't want it.
> (custom-set-variables '(server-window 'pop-to-buffer))
I believe that's what you want. But maybe your `pop-to-buffer' doesn't
create new frames because you haven't set pop-up-frames. If you don't want
to set pop-up-frames in general, try:
(setq server-window
(lambda (&rest args)
(let ((pop-up-frames t))
(apply 'pop-to-buffer args))))
-- Stefan
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2006-06-06 1:20 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-05 15:04 emacs server and new frames Sam Steingold
2006-06-05 16:21 ` Kevin Rodgers
2006-06-05 16:49 ` Sam Steingold
2006-06-05 16:42 ` Chong Yidong
2006-06-05 16:50 ` Drew Adams
2006-06-06 1:16 ` Stefan Monnier
2006-06-05 16:51 ` Sam Steingold
2006-06-05 18:14 ` Andreas Schwab
2006-06-06 1:20 ` Stefan Monnier
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.