all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Is a method like this already in emacs?
@ 2013-11-05  8:32 Matthias Pfeifer
  2013-11-05 13:37 ` Drew Adams
  0 siblings, 1 reply; 7+ messages in thread
From: Matthias Pfeifer @ 2013-11-05  8:32 UTC (permalink / raw)
  To: help-gnu-emacs

Dear list,

i recently added this defun to my init.el

(defun detach-window ()
  "Close current window and re-open it in new frame."
  (interactive)
  (let ((currentBuffer (window-buffer)))
    (progn
      (delete-window)
      (select-frame (make-frame))
      (set-window-buffer (selected-window) currentBuffer))))

and found it to be useful in several situations. now i wonder if a function
that does the same is already available somewhere in emacs? Also i am
curious about emacs lisp and could not successfully google for a related
mailing-list - now i wonder if somebody knows about one and shares the
knowledge.

Thanks in advance.
Matthias


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Is a method like this already in emacs?
       [not found] <mailman.5330.1383640330.10748.help-gnu-emacs@gnu.org>
@ 2013-11-05 10:23 ` Damien Wyart
  2013-11-05 19:21   ` Pascal J. Bourguignon
  2013-11-05 10:35 ` WJ
  2013-11-05 16:27 ` Emanuel Berg
  2 siblings, 1 reply; 7+ messages in thread
From: Damien Wyart @ 2013-11-05 10:23 UTC (permalink / raw)
  To: help-gnu-emacs

* Matthias Pfeifer <mpfeifer77@gmail.com> in gnu.emacs.help:
> i recently added this defun to my init.el

> (defun detach-window ()
>   "Close current window and re-open it in new frame."
>   (interactive)
>   (let ((currentBuffer (window-buffer)))
>     (progn
>       (delete-window)
>       (select-frame (make-frame))
>       (set-window-buffer (selected-window) currentBuffer))))

> and found it to be useful in several situations. now i wonder if
> a function that does the same is already available somewhere in emacs?

No, but there has been a quite long related discussion recently on
emacs-devel: http://lists.gnu.org/archive/html/emacs-devel/2013-09/msg00039.html

> Also i am curious about emacs lisp and could not successfully google
> for a related mailing-list - now i wonder if somebody knows about one
> and shares the knowledge.

This list is fine, and for more advanced topics, emacs-devel can be
used.

-- 
DW


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Is a method like this already in emacs?
       [not found] <mailman.5330.1383640330.10748.help-gnu-emacs@gnu.org>
  2013-11-05 10:23 ` Damien Wyart
@ 2013-11-05 10:35 ` WJ
  2013-11-05 16:27 ` Emanuel Berg
  2 siblings, 0 replies; 7+ messages in thread
From: WJ @ 2013-11-05 10:35 UTC (permalink / raw)
  To: help-gnu-emacs

Matthias Pfeifer wrote:

> (defun detach-window ()
>   "Close current window and re-open it in new frame."
>   (interactive)
>   (let ((currentBuffer (window-buffer)))
>     (progn
>       (delete-window)
>       (select-frame (make-frame))
>       (set-window-buffer (selected-window) currentBuffer))))

(defun detach-window ()
  "Close current window and re-open it in new frame."
  (interactive)
  (let ((current-buffer (window-buffer)))
    (delete-window)
    (select-frame (make-frame))
    (set-window-buffer (selected-window) current-buffer)))



^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: Is a method like this already in emacs?
  2013-11-05  8:32 Is a method like this already in emacs? Matthias Pfeifer
@ 2013-11-05 13:37 ` Drew Adams
  0 siblings, 0 replies; 7+ messages in thread
From: Drew Adams @ 2013-11-05 13:37 UTC (permalink / raw)
  To: Matthias Pfeifer, help-gnu-emacs

> now i wonder if a function that does the same is already available
> somewhere in emacs?

Yes, there is a similar command already: `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)

Click `C-mouse-1' anywhere on the mode line of the window you want
to tear off into another frame.

Doc string: "Delete the window clicked on, and create a new frame
displaying its buffer."



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Is a method like this already in emacs?
       [not found] <mailman.5330.1383640330.10748.help-gnu-emacs@gnu.org>
  2013-11-05 10:23 ` Damien Wyart
  2013-11-05 10:35 ` WJ
@ 2013-11-05 16:27 ` Emanuel Berg
  2 siblings, 0 replies; 7+ messages in thread
From: Emanuel Berg @ 2013-11-05 16:27 UTC (permalink / raw)
  To: help-gnu-emacs

Matthias Pfeifer <mpfeifer77@gmail.com> writes:

> i recently added this defun to my init.el
>
>   (let ((currentBuffer (window-buffer)))
>     (progn
>       (delete-window)
>       (select-frame (make-frame))
>       (set-window-buffer (selected-window) currentBuffer))))
>
> and found it to be useful in several situations. now i
> wonder if a function that does the same is already
> available somewhere in emacs? Also i am curious about
> emacs lisp and could not successfully google for a
> related mailing-list - now i wonder if somebody knows
> about one and shares the knowledge.

No, you have come to the right place to hack Emacs all
day (and night) long! Please share as much Elisp as
possible. Your hacks are as good as anyone's as long as
they do their jobs.

Check out my Emacs & Elisp page [1] for basically
everything I did in that domain. Some of it is perhaps a
bit unconventional but most should be good in terms of
general computing and programming.

[1] http://user.it.uu.se/~embe8573/emacs.html

-- 
Emanuel Berg, programmer-for-rent. CV, projects, etc at uXu
underground experts united:  http://user.it.uu.se/~embe8573


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Is a method like this already in emacs?
  2013-11-05 10:23 ` Damien Wyart
@ 2013-11-05 19:21   ` Pascal J. Bourguignon
  2013-11-05 19:22     ` Pascal J. Bourguignon
  0 siblings, 1 reply; 7+ messages in thread
From: Pascal J. Bourguignon @ 2013-11-05 19:21 UTC (permalink / raw)
  To: help-gnu-emacs

Damien Wyart <damien.wyart@free.fr> writes:

> * Matthias Pfeifer <mpfeifer77@gmail.com> in gnu.emacs.help:
>> i recently added this defun to my init.el
>
>> (defun detach-window ()
>>   "Close current window and re-open it in new frame."
>>   (interactive)
>>   (let ((currentBuffer (window-buffer)))
>>     (progn
>>       (delete-window)
>>       (select-frame (make-frame))
>>       (set-window-buffer (selected-window) currentBuffer))))
>
>> and found it to be useful in several situations. now i wonder if
>> a function that does the same is already available somewhere in emacs?
>
> No, but there has been a quite long related discussion recently on

Yes, this is exactly what C-x 5 2  or  M-x make-frame-command  does.

-- 
__Pascal Bourguignon__
http://www.informatimago.com/


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Is a method like this already in emacs?
  2013-11-05 19:21   ` Pascal J. Bourguignon
@ 2013-11-05 19:22     ` Pascal J. Bourguignon
  0 siblings, 0 replies; 7+ messages in thread
From: Pascal J. Bourguignon @ 2013-11-05 19:22 UTC (permalink / raw)
  To: help-gnu-emacs

"Pascal J. Bourguignon" <pjb@informatimago.com> writes:

> Damien Wyart <damien.wyart@free.fr> writes:
>
>> * Matthias Pfeifer <mpfeifer77@gmail.com> in gnu.emacs.help:
>>> i recently added this defun to my init.el
>>
>>> (defun detach-window ()
>>>   "Close current window and re-open it in new frame."
>>>   (interactive)
>>>   (let ((currentBuffer (window-buffer)))
>>>     (progn
>>>       (delete-window)
>>>       (select-frame (make-frame))
>>>       (set-window-buffer (selected-window) currentBuffer))))
>>
>>> and found it to be useful in several situations. now i wonder if
>>> a function that does the same is already available somewhere in emacs?
>>
>> No, but there has been a quite long related discussion recently on
>
> Yes, this is exactly what C-x 5 2  or  M-x make-frame-command  does.

Well, modulo the suppression of the old window, but who cares? :-)

-- 
__Pascal Bourguignon__
http://www.informatimago.com/


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-11-05 19:22 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-05  8:32 Is a method like this already in emacs? Matthias Pfeifer
2013-11-05 13:37 ` Drew Adams
     [not found] <mailman.5330.1383640330.10748.help-gnu-emacs@gnu.org>
2013-11-05 10:23 ` Damien Wyart
2013-11-05 19:21   ` Pascal J. Bourguignon
2013-11-05 19:22     ` Pascal J. Bourguignon
2013-11-05 10:35 ` WJ
2013-11-05 16:27 ` Emanuel Berg

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.