* How to detach buffer?
@ 2008-01-04 15:24 Matthias Pfeifer
2008-01-04 16:09 ` Drew Adams
0 siblings, 1 reply; 2+ messages in thread
From: Matthias Pfeifer @ 2008-01-04 15:24 UTC (permalink / raw)
To: help-gnu-emacs
Hello,
is it possible to detach a buffer from a multi-window frame? Talking elisp
(defun detach-buffer ()
(interactive)
(let ((buf (current-buffer)))
(delete-window)
(select-frame (make-frame))
(set-window-buffer (selected-window) buf)
)
)
So even the question seems answered i actually like to know if i
reinvent the wheel. ie is a function like my detach-buffer already
available?
matthias
^ permalink raw reply [flat|nested] 2+ messages in thread
* RE: How to detach buffer?
2008-01-04 15:24 How to detach buffer? Matthias Pfeifer
@ 2008-01-04 16:09 ` Drew Adams
0 siblings, 0 replies; 2+ messages in thread
From: Drew Adams @ 2008-01-04 16:09 UTC (permalink / raw)
To: Matthias Pfeifer, help-gnu-emacs
> is it possible to detach a buffer from a multi-window frame? Talking elisp
>
> (defun detach-buffer ()
> (interactive)
> (let ((buf (current-buffer)))
> (delete-window)
> (select-frame (make-frame))
> (set-window-buffer (selected-window) buf)
> )
> )
>
> So even the question seems answered i actually like to know if i
> reinvent the wheel. ie is a function like my detach-buffer already
> available?
`mouse-tear-off-window'. I bind it to `C-mouse-1' on the mode line:
(global-set-key [mode-line C-mouse-1]
'mouse-tear-off-window)
And here is a version of it that only deletes the window if it is not the
only one in the frame. IOW, if the frame has a sole window, then
`mouse-tear-off-window' clones the frame.
http://www.emacswiki.org/cgi-bin/wiki/mouse%2b.el
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-01-04 16:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-04 15:24 How to detach buffer? Matthias Pfeifer
2008-01-04 16:09 ` Drew Adams
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).