2 added 32 characters in body
source | link

  Often, I my windows get automatically split until I arbitrarily decide that the current frame does not have enough real-estate for them all. When this occurs, I manually delete a window, create a frame, and switch to that deleted window. How can I write an elisp function that does this?

I tried:

(defun pop-window-into-frame ()
  (interactive)
  (delete-window)
  (make-frame-command)
  (switch-to-prev-buffer))
(defun pop-window-into-frame ()
  (interactive)
  (delete-window)
  (make-frame-command)
  (switch-to-prev-buffer))

But for some reason this doesn't do what I think it should.

Often, I my windows get automatically split until I arbitrarily decide that the current frame does not have enough real-estate for them all. When this occurs, I manually delete a window, create a frame, and switch to that deleted window. How can I write an elisp function that does this?

I tried:

(defun pop-window-into-frame ()
  (interactive)
  (delete-window)
  (make-frame-command)
  (switch-to-prev-buffer))

But for some reason this doesn't do what I think it should.

  Often, I my windows get automatically split until I arbitrarily decide that the current frame does not have enough real-estate for them all. When this occurs, I manually delete a window, create a frame, and switch to that deleted window. How can I write an elisp function that does this?

I tried:

(defun pop-window-into-frame ()
  (interactive)
  (delete-window)
  (make-frame-command)
  (switch-to-prev-buffer))

But for some reason this doesn't do what I think it should.

1
source | link

"Pop" a window into a frame

Often, I my windows get automatically split until I arbitrarily decide that the current frame does not have enough real-estate for them all. When this occurs, I manually delete a window, create a frame, and switch to that deleted window. How can I write an elisp function that does this?

I tried:

(defun pop-window-into-frame ()
  (interactive)
  (delete-window)
  (make-frame-command)
  (switch-to-prev-buffer))

But for some reason this doesn't do what I think it should.