Severity: wishlist Here are two related feature requests: 1. A new command make-frame-on-current-monitor that is useful when the user uses only one monitor on multiple-monitor setup. The problem is that the command make-frame creates a new frame on unused non-selected monitor. Here comes make-frame-on-current-monitor to rescue: diff --git a/lisp/frame.el b/lisp/frame.el index 16ee7580f8..dc8dabc5a5 100644 --- a/lisp/frame.el +++ b/lisp/frame.el @@ -713,6 +713,18 @@ make-frame-on-display (x-display-list)))) (make-frame (cons (cons 'display display) parameters))) +(defun make-frame-on-current-monitor (&optional parameters) + "Make a frame on the currently selected monitor. +Like `make-frame-on-monitor' and with the same PARAMETERS as in `make-frame'." + (interactive) + (let* ((monitor-workarea + (cdr (assq 'workarea (frame-monitor-attributes)))) + (geometry-parameters + (when monitor-workarea + `((top . ,(nth 1 monitor-workarea)) + (left . ,(nth 0 monitor-workarea)))))) + (make-frame (append geometry-parameters parameters)))) + (defun make-frame-on-monitor (monitor &optional display parameters) "Make a frame on monitor MONITOR. The optional argument DISPLAY can be a display name, and the optional 2. This command could be used in windmove-display-new-frame to display the next buffer in a new frame as well as windmove-display-new-window to display the buffer in a new window: