From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 02 17:43:22 2020 Received: (at submit) by debbugs.gnu.org; 2 Mar 2020 22:43:22 +0000 Received: from localhost ([127.0.0.1]:38480 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j8tmT-0006Ek-Sj for submit@debbugs.gnu.org; Mon, 02 Mar 2020 17:43:22 -0500 Received: from lists.gnu.org ([209.51.188.17]:42674) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j8tmS-0006Ed-6M for submit@debbugs.gnu.org; Mon, 02 Mar 2020 17:43:20 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:57343) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j8tmQ-0002kp-Hu for bug-gnu-emacs@gnu.org; Mon, 02 Mar 2020 17:43:19 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,RCVD_IN_DNSWL_NONE, URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j8tmO-0001gA-Uv for bug-gnu-emacs@gnu.org; Mon, 02 Mar 2020 17:43:18 -0500 Received: from dog.birch.relay.mailchannels.net ([23.83.209.48]:31631) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j8tmO-0001fq-7v for bug-gnu-emacs@gnu.org; Mon, 02 Mar 2020 17:43:16 -0500 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 301DC21D4A for ; Mon, 2 Mar 2020 22:43:14 +0000 (UTC) Received: from pdx1-sub0-mail-a46.g.dreamhost.com (100-96-206-239.trex.outbound.svc.cluster.local [100.96.206.239]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 6F4D522015 for ; Mon, 2 Mar 2020 22:43:13 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from pdx1-sub0-mail-a46.g.dreamhost.com ([TEMPUNAVAIL]. [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.18.5); Mon, 02 Mar 2020 22:43:13 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Illustrious-Illegal: 7ea189f3437b8982_1583188993669_1499866766 X-MC-Loop-Signature: 1583188993669:2970552596 X-MC-Ingress-Time: 1583188993669 Received: from pdx1-sub0-mail-a46.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a46.g.dreamhost.com (Postfix) with ESMTP id EF4187FFC8 for ; Mon, 2 Mar 2020 14:43:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=linkov.net; h=from:to :subject:date:message-id:mime-version:content-type; s= linkov.net; bh=lPWLntb2rfw9gr+Fl/wPz3MbPAY=; b=tBE79M/uWjk6F2WDz pAAOdOg6CqckHEBWI15rSnCMFInBCfQA413+tYm9hV6WkU8ys06XTiJmdijom63x R0k1IX/rD/USTF8xtCyynQIPoto5KM0ozVflKYoFwyB+31f+ZGCwerAIsWdHkHrm RGqb2IHxvnIhblcVNGavVzD8cE= Received: from mail.jurta.org (m91-129-103-27.cust.tele2.ee [91.129.103.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by pdx1-sub0-mail-a46.g.dreamhost.com (Postfix) with ESMTPSA id 5C97F7F507 for ; Mon, 2 Mar 2020 14:43:04 -0800 (PST) X-DH-BACKEND: pdx1-sub0-mail-a46 From: Juri Linkov To: bug-gnu-emacs@gnu.org Subject: 28.0.50; Use make-frame-on-current-monitor in windmove Organization: LINKOV.NET Date: Tue, 03 Mar 2020 00:41:01 +0200 Message-ID: <877e025qiq.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: 0 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedugedruddtgedgudeihecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdfftffgtefojffquffvnecuuegrihhlohhuthemuceftddtnecunecujfgurhephffvufhofffkfgggtgesmhdtreertdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrddutdefrddvjeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledruddtfedrvdejpdhrvghtuhhrnhdqphgrthhhpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhhrtghpthhtohepsghughdqghhnuhdqvghmrggtshesghhnuhdrohhrgh X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 23.83.209.48 X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.8 (/) --=-=-= Content-Type: text/plain 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: --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=windmove-display-new-frame.patch diff --git a/lisp/windmove.el b/lisp/windmove.el index 40adb49e20..57f521e2be 100644 --- a/lisp/windmove.el +++ b/lisp/windmove.el @@ -474,6 +474,14 @@ windmove-display-in-direction (tab-bar-new-tab)) (setq type 'tab) (selected-window)) + ((eq dir 'new-frame) + (window--maybe-raise-frame + (make-frame-on-current-monitor pop-up-frame-alist)) + (setq type 'frame) + (selected-window)) + ((eq dir 'new-window) + ;; Split window in any direction + (setq dir nil)) ((eq dir 'same-window) (selected-window)) (t (window-in-direction @@ -541,6 +549,18 @@ windmove-display-same-window (interactive "P") (windmove-display-in-direction 'same-window arg)) +;;;###autoload +(defun windmove-display-new-window (&optional arg) + "Display the next buffer in a new window." + (interactive "P") + (windmove-display-in-direction 'new-window arg)) + +;;;###autoload +(defun windmove-display-new-frame (&optional arg) + "Display the next buffer in a new frame." + (interactive "P") + (windmove-display-in-direction 'new-frame arg)) + ;;;###autoload (defun windmove-display-new-tab (&optional arg) "Display the next buffer in a new tab." @@ -562,6 +582,8 @@ windmove-display-default-keybindings (global-set-key (vector (append modifiers '(up))) 'windmove-display-up) (global-set-key (vector (append modifiers '(down))) 'windmove-display-down) (global-set-key (vector (append modifiers '(?0))) 'windmove-display-same-window) + (global-set-key (vector (append modifiers '(?w))) 'windmove-display-new-window) + (global-set-key (vector (append modifiers '(?f))) 'windmove-display-new-frame) (global-set-key (vector (append modifiers '(?t))) 'windmove-display-new-tab)) diff --git a/lisp/window.el b/lisp/window.el index bd825c09e1..d9ab70253f 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -7891,15 +7891,15 @@ display-buffer-in-direction such alists. ALIST has to contain a `direction' entry whose value should be -one of `left', `above' (or `up'), `right' and `below' (or -'down'). Other values are usually interpreted as `below'. +one of `left', `above' (or `up'), `right' and `below' (or `down'). +Other values are usually interpreted as `below'. If ALIST also contains a `window' entry, its value specifies a reference window. That value can be a special symbol like -'main' (which stands for the selected frame's main window) or -'root' (standings for the selected frame's root window) or an +`main' (which stands for the selected frame's main window) or +`root' (standings for the selected frame's root window) or an arbitrary valid window. Any other value (or omitting the -'window' entry) means to use the selected window as reference +`window' entry) means to use the selected window as reference window. This function tries to reuse or split a window such that the --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 05 19:19:51 2020 Received: (at 39875) by debbugs.gnu.org; 6 Mar 2020 00:19:51 +0000 Received: from localhost ([127.0.0.1]:43895 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jA0iV-0007JG-0D for submit@debbugs.gnu.org; Thu, 05 Mar 2020 19:19:51 -0500 Received: from camel.birch.relay.mailchannels.net ([23.83.209.29]:31534) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jA0iS-0007J4-RB; Thu, 05 Mar 2020 19:19:50 -0500 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 8591C501690; Fri, 6 Mar 2020 00:19:47 +0000 (UTC) Received: from pdx1-sub0-mail-a97.g.dreamhost.com (100-96-215-19.trex.outbound.svc.cluster.local [100.96.215.19]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id D1E965012D4; Fri, 6 Mar 2020 00:19:46 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from pdx1-sub0-mail-a97.g.dreamhost.com ([TEMPUNAVAIL]. [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.18.5); Fri, 06 Mar 2020 00:19:47 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Grain-Name: 4010b7345d07f528_1583453987083_520031699 X-MC-Loop-Signature: 1583453987083:2704551933 X-MC-Ingress-Time: 1583453987083 Received: from pdx1-sub0-mail-a97.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a97.g.dreamhost.com (Postfix) with ESMTP id A892E7FFE4; Thu, 5 Mar 2020 16:19:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=linkov.net; h=from:to :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=linkov.net; bh=rHKqK1+tipRXbujd3S61zou4mzA=; b= Oxv1sLg0Q+05t2h1ay4nrQb2uq9gWl/RVAhSEVHmnb7J/hoC9YAgmVOfTg+bnlqz coAIE9RXpF+si1mSoPbb3gzl1O+UOboyYgzIQNVNOFQXhxBHxTPDFAVHPXSb1b8/ PRoro6iqrZXhOKzOOTCA/F6AOJ1R4zlDRLVWls3Xzro= Received: from mail.jurta.org (m91-129-103-27.cust.tele2.ee [91.129.103.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by pdx1-sub0-mail-a97.g.dreamhost.com (Postfix) with ESMTPSA id 0D3037FFE1; Thu, 5 Mar 2020 16:19:39 -0800 (PST) X-DH-BACKEND: pdx1-sub0-mail-a97 From: Juri Linkov To: 39875@debbugs.gnu.org Subject: Re: bug#39875: 28.0.50; Use make-frame-on-current-monitor in windmove Organization: LINKOV.NET References: <877e025qiq.fsf@mail.linkov.net> Date: Fri, 06 Mar 2020 02:19:17 +0200 In-Reply-To: <877e025qiq.fsf@mail.linkov.net> (Juri Linkov's message of "Tue, 03 Mar 2020 00:41:01 +0200") Message-ID: <878skeuygq.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: 0 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedugedrudduuddgudelucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucenucfjughrpefhvffuohhfffgjkfgfgggtsehttdertddtredtnecuhfhrohhmpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqnecukfhppeeluddruddvledruddtfedrvdejnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmohguvgepshhmthhppdhhvghlohepmhgrihhlrdhjuhhrthgrrdhorhhgpdhinhgvthepledurdduvdelrddutdefrddvjedprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopeefleekjeehseguvggssghughhsrdhgnhhurdhorhhg X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 39875 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) tags 39875 + patch fixed close 39875 28.0.50 quit > 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: Pushed to master, and closed. From unknown Sun Jun 22 07:38:56 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 03 Apr 2020 11:24:06 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator