From unknown Wed Jun 18 23:09:41 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#30074 <30074@debbugs.gnu.org> To: bug#30074 <30074@debbugs.gnu.org> Subject: Status: 26.0; Add function(s) for current monitor info Reply-To: bug#30074 <30074@debbugs.gnu.org> Date: Thu, 19 Jun 2025 06:09:41 +0000 retitle 30074 26.0; Add function(s) for current monitor info reassign 30074 emacs submitter 30074 Drew Adams severity 30074 wishlist tag 30074 wontfix thanks From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 10 18:12:56 2018 Received: (at submit) by debbugs.gnu.org; 10 Jan 2018 23:12:56 +0000 Received: from localhost ([127.0.0.1]:51493 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eZPYG-0007PM-3S for submit@debbugs.gnu.org; Wed, 10 Jan 2018 18:12:56 -0500 Received: from eggs.gnu.org ([208.118.235.92]:33571) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eZPYE-0007PA-Kr for submit@debbugs.gnu.org; Wed, 10 Jan 2018 18:12:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eZPY8-0000rL-Fa for submit@debbugs.gnu.org; Wed, 10 Jan 2018 18:12:49 -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,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:49087) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eZPY8-0000rD-2h for submit@debbugs.gnu.org; Wed, 10 Jan 2018 18:12:48 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52753) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eZPY6-0001mF-R0 for bug-gnu-emacs@gnu.org; Wed, 10 Jan 2018 18:12:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eZPY1-0000lC-O2 for bug-gnu-emacs@gnu.org; Wed, 10 Jan 2018 18:12:46 -0500 Received: from aserp2130.oracle.com ([141.146.126.79]:43798) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eZPY1-0000kK-CU for bug-gnu-emacs@gnu.org; Wed, 10 Jan 2018 18:12:41 -0500 Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w0ANCQ0j008488 for ; Wed, 10 Jan 2018 23:12:32 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : subject : content-type : content-transfer-encoding; s=corp-2017-10-26; bh=x2n+ZyRQG/C9gJHPhqXoxdpVvnKpD5h5EWxxCVJxcRw=; b=PBJEQnWbG0jBG3xnaWp2AN/EH0ywZTsBZ0gvIHdlWVanDlevBfTcrsDRi5M6hyvGUTh3 5ed8DTLaWXS3qww7SytkpQVjSYGOi3MDH3fp5QWESY7QALGqW83SJwNulGYvDjgKwBlZ RNm+5t1wrLih50NfF6mbe6S0Sf551PxoCH6VJhkYQ5pVclzBewph7VJK2OwK8+aGSKsk h3kB2O1s/9JFshnGIQqIYUzRyV9fOAP8afux6MmicrlixWe5k9RpyDLksVA8rBGaGBgp i9m79hC8HXfw7qeTpCe7CK81pCRbvMKo+3pzGWnyiAjZ07pk746RMinQgQ6YzZwmb9kh ng== Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by aserp2130.oracle.com with ESMTP id 2fdukar4ar-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 10 Jan 2018 23:12:31 +0000 Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w0AN8T0I008936 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Wed, 10 Jan 2018 23:08:29 GMT Received: from abhmp0018.oracle.com (abhmp0018.oracle.com [141.146.116.24]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w0AN8SYd004127 for ; Wed, 10 Jan 2018 23:08:29 GMT MIME-Version: 1.0 Message-ID: <17da2391-a30c-4d5f-9ffd-1758b18c34f3@default> Date: Wed, 10 Jan 2018 15:08:27 -0800 (PST) From: Drew Adams To: bug-gnu-emacs@gnu.org Subject: 26.0; Add function(s) for current monitor info X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4627.0 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8770 signatures=668652 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=1 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=909 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1801100318 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) 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: -4.0 (----) Please consider adding a function that returns the info describing the monitor that dominates a frame (default: selected frame). In particular, the size of the monitor. This can be useful, for example, for positioning a frame when there are multiple monitors. I've been using this, but you might have a better implementation in mind: (defun current-monitor (&optional frame) "Attributes of monitor that dominates FRAME (default: `selected-frame')." (catch 'current-monitor (dolist (atts (display-monitor-attributes-list frame)) (when (member (or frame (selected-frame)) (cdr (assq 'frames atts))) (throw 'current-monitor atts))) nil)) ; Should never happen (?) (defun current-monitor-size (&optional frame workarea-p) "Size of the monitor that dominates FRAME (default: `selected-frame'). This is a cons (WIDTH . HEIGHT) where WIDTH and HEIGHT are in pixels. Uses the full area of the monitor (attribute `geometry' of `display-monitor-attributes-list') by default. Non-nil optional arg WORKAREA-P means use only the available work area (attribute `workarea') instead." (let* ((att (if workarea-p 'workarea 'geometry)) (mon (assq att (current-monitor frame)))) (cons (nth 3 mon) (nth 4 mon)))) Dunno whether the fallback value of nil is needed. I haven't come across a frame that is not listed in attribute `frames' of `display-monitor-attributes-list'. Even invisible frames are listed. Dunno about deleted frames. Whether it would also be useful to have functions corresponding to attributes such as `mm-size' and `name' is another question. In GNU Emacs 26.0.90 (build 3, x86_64-w64-mingw32) of 2017-10-13 Repository revision: 906224eba147bdfc0514090064e8e8f53160f1d4 Windowing system distributor `Microsoft Corp.', version 6.1.7601 Configured using: `configure --without-dbus --host=3Dx86_64-w64-mingw32 --without-compress-install 'CFLAGS=3D-O2 -static -g3'' From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 14 13:46:48 2019 Received: (at 30074) by debbugs.gnu.org; 14 Jul 2019 17:46:48 +0000 Received: from localhost ([127.0.0.1]:45835 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hmiaF-0004C4-Ul for submit@debbugs.gnu.org; Sun, 14 Jul 2019 13:46:48 -0400 Received: from quimby.gnus.org ([80.91.231.51]:55866) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hmiaE-0004Bw-EQ for 30074@debbugs.gnu.org; Sun, 14 Jul 2019 13:46:46 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hmiaA-0004Ux-Di; Sun, 14 Jul 2019 19:46:44 +0200 From: Lars Ingebrigtsen To: Drew Adams Subject: Re: bug#30074: 26.0; Add function(s) for current monitor info References: <17da2391-a30c-4d5f-9ffd-1758b18c34f3@default> Date: Sun, 14 Jul 2019 19:46:42 +0200 In-Reply-To: <17da2391-a30c-4d5f-9ffd-1758b18c34f3@default> (Drew Adams's message of "Wed, 10 Jan 2018 15:08:27 -0800 (PST)") Message-ID: <87k1cky0e5.fsf@mouse.gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Drew Adams writes: > Please consider adding a function that returns the info describing the > monitor that dominates a frame (default: selected frame). In > particular, the size of the monitor. This can be useful, for e [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 30074 Cc: 30074@debbugs.gnu.org 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 (-) Drew Adams writes: > Please consider adding a function that returns the info describing the > monitor that dominates a frame (default: selected frame). In > particular, the size of the monitor. This can be useful, for example, > for positioning a frame when there are multiple monitors. > > I've been using this, but you might have a better implementation in > mind: > > (defun current-monitor (&optional frame) > "Attributes of monitor that dominates FRAME (default: `selected-frame')." > (catch 'current-monitor > (dolist (atts (display-monitor-attributes-list frame)) > (when (member (or frame (selected-frame)) (cdr (assq 'frames atts))) > (throw 'current-monitor atts))) > nil)) ; Should never happen (?) I guess it's possible for a frame to be on several monitors? (Half on one and half on another.) What would this function return in that case? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 14 15:52:18 2019 Received: (at 30074) by debbugs.gnu.org; 14 Jul 2019 19:52:18 +0000 Received: from localhost ([127.0.0.1]:46011 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hmkXi-0006Ci-9D for submit@debbugs.gnu.org; Sun, 14 Jul 2019 15:52:18 -0400 Received: from dog.birch.relay.mailchannels.net ([23.83.209.48]:62841) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hmkXg-0006CZ-JJ for 30074@debbugs.gnu.org; Sun, 14 Jul 2019 15:52:17 -0400 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 26176212F1; Sun, 14 Jul 2019 19:52:15 +0000 (UTC) Received: from pdx1-sub0-mail-a64.g.dreamhost.com (100-96-14-124.trex.outbound.svc.cluster.local [100.96.14.124]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id AB2B8202DD; Sun, 14 Jul 2019 19:52:14 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from pdx1-sub0-mail-a64.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.17.3); Sun, 14 Jul 2019 19:52:15 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Drop-Suffer: 2c38c4723e561894_1563133934973_653506747 X-MC-Loop-Signature: 1563133934973:1274744681 X-MC-Ingress-Time: 1563133934973 Received: from pdx1-sub0-mail-a64.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a64.g.dreamhost.com (Postfix) with ESMTP id 609F67F5B4; Sun, 14 Jul 2019 12:52:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=linkov.net; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=linkov.net; bh=IZUIXLAsbrmZgEbtjltfvlBOnsY=; b= 0zzu26o7MbXPTo/mHb4Dis6Lk3I6oYYOARijdmwlEIp82ydHEEEGwuiXbInyqQy0 pVASrk3Fxdpf1GXG3Y+f5roGxQUHtvTb2R4V2r51UYamYdOcjoEyWwfdlLnYk3nj 7eK89axdeO/O+oZbEE/2l/4MitSpflr3HajFjAR/24A= Received: from mail.jurta.org (m91-129-103-134.cust.tele2.ee [91.129.103.134]) (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-a64.g.dreamhost.com (Postfix) with ESMTPSA id 59D8C7F5F3; Sun, 14 Jul 2019 12:52:06 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a64 From: Juri Linkov To: Lars Ingebrigtsen Subject: Re: bug#30074: 26.0; Add function(s) for current monitor info Organization: LINKOV.NET References: <17da2391-a30c-4d5f-9ffd-1758b18c34f3@default> <87k1cky0e5.fsf@mouse.gnus.org> Date: Sun, 14 Jul 2019 22:49:23 +0300 In-Reply-To: <87k1cky0e5.fsf@mouse.gnus.org> (Lars Ingebrigtsen's message of "Sun, 14 Jul 2019 19:46:42 +0200") Message-ID: <87muhgtn0c.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduvddrheehgddugeeiucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrddutdefrddufeegnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledruddtfedrudefgedprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopehlrghrshhisehgnhhushdrohhrghenucevlhhushhtvghrufhiiigvpedu X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 30074 Cc: 30074@debbugs.gnu.org, Drew Adams 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 (-) >> Please consider adding a function that returns the info describing the >> monitor that dominates a frame (default: selected frame). In >> particular, the size of the monitor. This can be useful, for example, >> for positioning a frame when there are multiple monitors. >> >> I've been using this, but you might have a better implementation in >> mind: >> >> (defun current-monitor (&optional frame) >> "Attributes of monitor that dominates FRAME (default: `selected-frame')." >> (catch 'current-monitor >> (dolist (atts (display-monitor-attributes-list frame)) >> (when (member (or frame (selected-frame)) (cdr (assq 'frames atts))) >> (throw 'current-monitor atts))) >> nil)) ; Should never happen (?) > > I guess it's possible for a frame to be on several monitors? (Half on > one and half on another.) What would this function return in that case? There is already `frame-monitor-attributes' added in Emacs 24 (see NEWS.24), e.g. (frame-monitor-attributes (selected-frame)) From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 14 18:08:08 2019 Received: (at 30074) by debbugs.gnu.org; 14 Jul 2019 22:08:09 +0000 Received: from localhost ([127.0.0.1]:46153 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hmmfA-0003Np-KJ for submit@debbugs.gnu.org; Sun, 14 Jul 2019 18:08:08 -0400 Received: from userp2130.oracle.com ([156.151.31.86]:43950) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hmmf8-0003NK-2Q for 30074@debbugs.gnu.org; Sun, 14 Jul 2019 18:08:07 -0400 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x6EM43At017291; Sun, 14 Jul 2019 22:08:00 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : cc : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2018-07-02; bh=LtrWuXpUshdaPeQDGKotVTFvPlMZaRmM59SID8KJTiA=; b=EO1WtKR1LGnG/gNYgBdkPU/L3bfSNoiLNzLD2itffu3oNpV5N0fojxOQKzW2T+NKJTuh f4s9YfDBfhRd9+SR8OJ9k/NVlWQ+vnZTHT5h32kqp095FA2bz1wPk7P8FqeWMtw15mNn rIx3hsqeIdugIlrd6DS9R0psC6DPTcgxu9+y+jmClJWvFf7aLfrV0ARW1G+VpgHeLfxr s9rU+PJbvn1jgIbjGcJmpAicHtWc2y+p87cQUWye5qgz9GN1pYmC8AX+4HtOKCzSWbVl +lqs3QGjGHQa6F0S2OkQ3H86EFBPwNAfoqkXGsAXVy1fWnRpiSBGVsd9VeAGVfrfsPsZ QQ== Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70]) by userp2130.oracle.com with ESMTP id 2tq6qtbj4j-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 14 Jul 2019 22:07:59 +0000 Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1]) by aserp3020.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x6EM2Ns5167703; Sun, 14 Jul 2019 22:07:59 GMT Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserp3020.oracle.com with ESMTP id 2tq742860d-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 14 Jul 2019 22:07:59 +0000 Received: from abhmp0016.oracle.com (abhmp0016.oracle.com [141.146.116.22]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id x6EM7wCi016607; Sun, 14 Jul 2019 22:07:58 GMT MIME-Version: 1.0 Message-ID: <3dfc61af-838b-49e0-bd81-2cc3ed89fb04@default> Date: Sun, 14 Jul 2019 15:07:57 -0700 (PDT) From: Drew Adams To: Lars Ingebrigtsen Subject: RE: bug#30074: 26.0; Add function(s) for current monitor info References: <17da2391-a30c-4d5f-9ffd-1758b18c34f3@default> <87k1cky0e5.fsf@mouse.gnus.org> In-Reply-To: <87k1cky0e5.fsf@mouse.gnus.org> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4861.0 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9318 signatures=668688 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1907140276 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9318 signatures=668688 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1907140276 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 30074 Cc: 30074@debbugs.gnu.org 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: -3.3 (---) > > Please consider adding a function that returns the info describing the > > monitor that dominates a frame (default: selected frame). In > > particular, the size of the monitor. This can be useful, for example, > > for positioning a frame when there are multiple monitors. > > > > I've been using this, but you might have a better implementation in > > mind: > > > > (defun current-monitor (&optional frame) > > "Attributes of monitor that dominates FRAME (default: `selected-frame= ')." > > (catch 'current-monitor > > (dolist (atts (display-monitor-attributes-list frame)) > > (when (member (or frame (selected-frame)) (cdr (assq 'frames att= s))) > > (throw 'current-monitor atts))) > > nil)) ; Should never happen (?) >=20 > I guess it's possible for a frame to be on several monitors? (Half on > one and half on another.) What would this function return in that case? I'm not in front of multiple monitors now. Perhaps I can check later, when I am. In any case, all we have, AFAIK, is `display-monitor-attributes-list'. It decides what it returns. Attribute `frames' is described thus: "frames -- List of frames dominated by the physical monitor" For the same frame to be "dominated" by more than one monitor I would wonder what good the word "dominated" could possibly do here. It suggests that one of the monitors dominates a given frame. Anyway, I'll try to remember to check, when I'm in the presence of > 1 monitor, unless someone beats me to it. From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 15 06:14:06 2019 Received: (at 30074) by debbugs.gnu.org; 15 Jul 2019 10:14:06 +0000 Received: from localhost ([127.0.0.1]:46462 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hmxzh-0005aX-KX for submit@debbugs.gnu.org; Mon, 15 Jul 2019 06:14:05 -0400 Received: from quimby.gnus.org ([80.91.231.51]:39972) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hmxzd-0005Zy-6m for 30074@debbugs.gnu.org; Mon, 15 Jul 2019 06:14:04 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=stories) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hmxza-0005f8-32; Mon, 15 Jul 2019 12:14:00 +0200 From: Lars Ingebrigtsen To: Juri Linkov Subject: Re: bug#30074: 26.0; Add function(s) for current monitor info References: <17da2391-a30c-4d5f-9ffd-1758b18c34f3@default> <87k1cky0e5.fsf@mouse.gnus.org> <87muhgtn0c.fsf@mail.linkov.net> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAJFBMVEUUFBrS1cq1sIwMChAK CA4DAgdmXTbo6t1FRz1/dDsqMTqUiEJ+LDMUAAACNElEQVQ4jXXTT4vaQBgG8LfEFsmpSWG3y17W FLZaL8JIWbya/QTtQksvoYep4sm9DG0vaUtDjJeshWD0MrAgOnuRHsQ/X67vZKKJrn1AjM+PN5k4 CRj5lAzDiiIad+gI8r1lWRGlER2PF6GEbtqbVuBRGq/am81iDgbDpGQJj7bjOIVTKbsJbzxedbIJ NbKmrudh299slmtgKnKgdMYlrCSMcnDC2EuPdlb7gFJlrDyh/QTWebjslpaPAa9ufq+AgtVmHuaA sVsnhfEenLJy6El4OIDz7gVQhMUhnFhhg9LeYzCscsNr9eLFw+IAvmn6MTB/doFP/dk+GEaZF5l7 T4oI/aUC3LjIFwBguBqpzeKhgkvfF4EQHOHLxf0OHPB9rIXACp48f0XILBr21wp8BaBdvfiVQG89 DnMTmD8aIZNo1FvHCNMgAY2keYYQShDiAKizBbEHb1v/A5xwjsFVy/GctrODbU8aLbfn0h3wDPCp C45BjXJPUMdNoJwDokMG5qCqSukNmBQTmApxx5gCuTahCV1C9KOi00EpO5UA3pgi4Evntq0qaRJi K+BaDYCDUX0Dn/+u6jaxFehcflwwK+3OYBnWbZkEcAf0wIXz4euvxambAeAKdNxq4/aOzQEU2KTe lFDUOT4lZoWndZKavH28uFlxCzdJ3qdnw/UBrivQbrIg+JrdxBvVYNu9S8fEAXywnqoDIHazRmo7 +Gj+VgfNggTQgFwnvz+V1fe1jf8BECj8A+pZr0hZcFA2AAAAAElFTkSuQmCC Date: Mon, 15 Jul 2019 12:13:57 +0200 In-Reply-To: <87muhgtn0c.fsf@mail.linkov.net> (Juri Linkov's message of "Sun, 14 Jul 2019 22:49:23 +0300") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Juri Linkov writes: >>> Please consider adding a function that returns the info describing the >>> monitor that dominates a frame (default: selected frame). In >>> particular, the size of the monitor. This can be useful, [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 30074 Cc: 30074@debbugs.gnu.org, Drew Adams 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 (-) Juri Linkov writes: >>> Please consider adding a function that returns the info describing the >>> monitor that dominates a frame (default: selected frame). In >>> particular, the size of the monitor. This can be useful, for example, >>> for positioning a frame when there are multiple monitors. >>> >>> I've been using this, but you might have a better implementation in >>> mind: >>> >>> (defun current-monitor (&optional frame) >>> "Attributes of monitor that dominates FRAME (default: `selected-frame')." >>> (catch 'current-monitor >>> (dolist (atts (display-monitor-attributes-list frame)) >>> (when (member (or frame (selected-frame)) (cdr (assq 'frames atts))) >>> (throw 'current-monitor atts))) >>> nil)) ; Should never happen (?) >> >> I guess it's possible for a frame to be on several monitors? (Half on >> one and half on another.) What would this function return in that case? > > There is already `frame-monitor-attributes' added in Emacs 24 (see NEWS.24), > e.g. > > (frame-monitor-attributes (selected-frame)) So there is. Drew, does this function do what you want? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 15 11:21:12 2019 Received: (at 30074) by debbugs.gnu.org; 15 Jul 2019 15:21:12 +0000 Received: from localhost ([127.0.0.1]:48777 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hn2mu-0006Ml-8q for submit@debbugs.gnu.org; Mon, 15 Jul 2019 11:21:12 -0400 Received: from aserp2120.oracle.com ([141.146.126.78]:40302) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hn2ms-0006MX-2z for 30074@debbugs.gnu.org; Mon, 15 Jul 2019 11:21:10 -0400 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x6FFKxWQ086992; Mon, 15 Jul 2019 15:21:04 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : cc : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2018-07-02; bh=9znYsNdeJnOYR3YrY9P3exMzi9oz1WJJ0kt8c8nGKCE=; b=i3RBmGTAvghJFlLkbCt/Nkl23qz8yBSPvV8sYMPCmffEs5LTwA3gsGsJxNNG2OQ07byK ulXyxlDtAMOONAkw7H8ALBF7WxC7hZFL9Lx0ZKEqMH7zvIsBPF2DEgCzrjU6fiD8GTxY 07wKqc2hC9oawclSnjahFwQooU7G6x2pEkFUAAwElieIaT1Rj/vqmeN41T3GyHvDtBTU vq0m7KslwNfLxs6BHbQ+EF3nZ/8CkI5MLCAsr2Ed/DxhK4NTGWCS5nnsE8h08mZjIUi4 XVmyjlcbkLQC48PE9A9xl4FRH5MsUVXAoJAlVcHP5nyaJHCXKiBSoHb/GDcBa1Df4Cx6 OQ== Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by aserp2120.oracle.com with ESMTP id 2tq78pf415-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 15 Jul 2019 15:21:04 +0000 Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x6FF7ajK164058; Mon, 15 Jul 2019 15:21:03 GMT Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by userp3030.oracle.com with ESMTP id 2tq4dtcjvb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 15 Jul 2019 15:21:03 +0000 Received: from abhmp0015.oracle.com (abhmp0015.oracle.com [141.146.116.21]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id x6FFL1OV025166; Mon, 15 Jul 2019 15:21:01 GMT MIME-Version: 1.0 Message-ID: <0771514c-28eb-4ef7-9f17-eb465049df0c@default> Date: Mon, 15 Jul 2019 08:21:00 -0700 (PDT) From: Drew Adams To: Lars Ingebrigtsen , Juri Linkov Subject: RE: bug#30074: 26.0; Add function(s) for current monitor info References: <17da2391-a30c-4d5f-9ffd-1758b18c34f3@default> <87k1cky0e5.fsf@mouse.gnus.org> <87muhgtn0c.fsf@mail.linkov.net> In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4861.0 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9319 signatures=668688 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1907150181 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9319 signatures=668688 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1907150181 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 30074 Cc: 30074@debbugs.gnu.org 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: -3.3 (---) > > There is already `frame-monitor-attributes'=20 > > (frame-monitor-attributes (selected-frame)) >=20 > So there is. Drew, does this function do what you want? Yes, that takes care of the `current-monitor' function, but not `current-monitor-size. Please consider this bug report to be a request for a function like that. --- The doc string of `frame-monitor-attributes' also answers Lars's question about dominating monitor: A frame is dominated by a physical monitor when either the largest area of the frame resides in the monitor, or the monitor is the closest to the frame if the frame does not intersect any physical monitors. That makes it clear that there is only one dominating monitor for a given frame. (It does so only indirectly, though, by saying "largest" and "the" "closest" monitor.) And the doc string of `display-monitor-attributes-list' repeats that same text and adds this, which makes it explicit: Every (non-tooltip) frame (including invisible ones) in a graphical display is dominated by exactly one physical monitor at a time, though it can span multiple (or no) physical monitors. And testing shows that that is the case. From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 15 11:26:03 2019 Received: (at 30074) by debbugs.gnu.org; 15 Jul 2019 15:26:03 +0000 Received: from localhost ([127.0.0.1]:48789 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hn2rb-0006Ul-0B for submit@debbugs.gnu.org; Mon, 15 Jul 2019 11:26:03 -0400 Received: from quimby.gnus.org ([80.91.231.51]:44474) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hn2rZ-0006UM-86 for 30074@debbugs.gnu.org; Mon, 15 Jul 2019 11:26:01 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=sandy) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hn2rT-0000Zh-Sf; Mon, 15 Jul 2019 17:25:58 +0200 From: Lars Ingebrigtsen To: Drew Adams Subject: Re: bug#30074: 26.0; Add function(s) for current monitor info References: <17da2391-a30c-4d5f-9ffd-1758b18c34f3@default> <87k1cky0e5.fsf@mouse.gnus.org> <87muhgtn0c.fsf@mail.linkov.net> <0771514c-28eb-4ef7-9f17-eb465049df0c@default> Date: Mon, 15 Jul 2019 17:25:55 +0200 In-Reply-To: <0771514c-28eb-4ef7-9f17-eb465049df0c@default> (Drew Adams's message of "Mon, 15 Jul 2019 08:21:00 -0700 (PDT)") Message-ID: <87pnmbcoak.fsf@mouse.gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Drew Adams writes: >> > There is already `frame-monitor-attributes' >> > (frame-monitor-attributes (selected-frame)) >> >> So there is. Drew, does this function do what you want? > > Yes, that takes care of the `current [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 30074 Cc: 30074@debbugs.gnu.org, Juri Linkov 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 (-) Drew Adams writes: >> > There is already `frame-monitor-attributes' >> > (frame-monitor-attributes (selected-frame)) >> >> So there is. Drew, does this function do what you want? > > Yes, that takes care of the `current-monitor' > function, but not `current-monitor-size. > Please consider this bug report to be a > request for a function like that. Well, there's (x-display-pixel-width (selected-frame)) => 1920 (and height), so it seems like we're covered... (I don't know whether that function works on non-X systems, though.) And the function above also returns the same size data, but as an alist: (frame-monitor-attributes (selected-frame)) => ((name . "eDP1") (geometry 0 0 1920 1080) (workarea 0 27 1920 1053) (mm-size 310 170) (frames # #) (source . "Gdk")) -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 15 12:06:09 2019 Received: (at submit) by debbugs.gnu.org; 15 Jul 2019 16:06:09 +0000 Received: from localhost ([127.0.0.1]:48831 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hn3UO-0007YE-Th for submit@debbugs.gnu.org; Mon, 15 Jul 2019 12:06:09 -0400 Received: from lists.gnu.org ([209.51.188.17]:53196) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hn3UL-0007Y7-Vs for submit@debbugs.gnu.org; Mon, 15 Jul 2019 12:06:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56468) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hn3UL-0006re-5H for bug-gnu-emacs@gnu.org; Mon, 15 Jul 2019 12:06:05 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: * X-Spam-Status: No, score=1.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, RDNS_DYNAMIC autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hn3UK-0007zb-71 for bug-gnu-emacs@gnu.org; Mon, 15 Jul 2019 12:06:05 -0400 Received: from 195-159-176-226.customer.powertech.no ([195.159.176.226]:36096 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hn3UJ-0007yr-Vj for bug-gnu-emacs@gnu.org; Mon, 15 Jul 2019 12:06:04 -0400 Received: from list by blaine.gmane.org with local (Exim 4.89) (envelope-from ) id 1hn3UG-0003yb-P4 for bug-gnu-emacs@gnu.org; Mon, 15 Jul 2019 18:06:00 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: bug-gnu-emacs@gnu.org From: Andy Moreton Subject: Re: bug#30074: 26.0; Add function(s) for current monitor info Date: Mon, 15 Jul 2019 17:05:55 +0100 Message-ID: References: <17da2391-a30c-4d5f-9ffd-1758b18c34f3@default> <87k1cky0e5.fsf@mouse.gnus.org> <87muhgtn0c.fsf@mail.linkov.net> <0771514c-28eb-4ef7-9f17-eb465049df0c@default> Mime-Version: 1.0 Content-Type: text/plain User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (windows-nt) Cancel-Lock: sha1:SJ6PpBeGyNy5AwfgrBLker7mMJo= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 195.159.176.226 X-Spam-Score: -1.0 (-) 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: -2.0 (--) On Mon 15 Jul 2019, Drew Adams wrote: >> > There is already `frame-monitor-attributes' >> > (frame-monitor-attributes (selected-frame)) >> >> So there is. Drew, does this function do what you want? > > Yes, that takes care of the `current-monitor' > function, but not `current-monitor-size. > Please consider this bug report to be a > request for a function like that. Doesn't the returned monitor attributes list give you that information ? E.g. on a Windows box: (frame-monitor-attributes (selected-frame)) => ((geometry 0 0 1920 1080) ; Monitor size and position (workarea 0 0 1920 1050) ; Space available for drawing frames (mm-size 509 286) ; Physical dimensions (name . "\\\\.\\DISPLAY1") (frames ...)) What other information do you need ? AndyM From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 15 12:17:53 2019 Received: (at 30074) by debbugs.gnu.org; 15 Jul 2019 16:17:53 +0000 Received: from localhost ([127.0.0.1]:48855 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hn3fl-0007u0-1Q for submit@debbugs.gnu.org; Mon, 15 Jul 2019 12:17:53 -0400 Received: from aserp2120.oracle.com ([141.146.126.78]:53436) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hn3fj-0007to-4l for 30074@debbugs.gnu.org; Mon, 15 Jul 2019 12:17:51 -0400 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x6FGDn5u139263; Mon, 15 Jul 2019 16:17:45 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : cc : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2018-07-02; bh=lTU5m5rY0V5DeqLPb3wGfsFsnCLyBunKRc7tJFUMcCA=; b=LcufDArNlVZJHD0LDkYqhiaL3z477FLaQQe8+cTxe2a3QIRXqVNX5PwXnB8WqOPpqdHl NbKKALpIEhpZipvCvzPTyxiGBw4Btt0oWwdfmSeCRrW261+WIp9PfxTVsU18Nu5RyVy/ 1QDbrfueCBY5WScDWI1PbwEaLjmWq38DqW1Vf35t5bQ9lyOYvvNIXI8/B8RWQGrtxTLG H0CliQbB3fiEEgRvFUUOH8NUZ/jCBzoOpNvxlQnwpmEMqhdPVnDg2czwrsBK6Elppn0A Ellm2j+Un2puWMG5RcYEkW+X3JpHMqu4aG5DvPLgmSUHWK0Uepahq+puhBAqbZkrjVfU pg== Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by aserp2120.oracle.com with ESMTP id 2tq78pfg7c-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 15 Jul 2019 16:17:45 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x6FGCph3024005; Mon, 15 Jul 2019 16:17:44 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userp3020.oracle.com with ESMTP id 2tq6mmc7cb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 15 Jul 2019 16:17:44 +0000 Received: from abhmp0015.oracle.com (abhmp0015.oracle.com [141.146.116.21]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id x6FGHgXh011195; Mon, 15 Jul 2019 16:17:43 GMT MIME-Version: 1.0 Message-ID: <1a4b56c5-4238-4958-841f-fcf547a767d7@default> Date: Mon, 15 Jul 2019 09:17:42 -0700 (PDT) From: Drew Adams To: Lars Ingebrigtsen Subject: RE: bug#30074: 26.0; Add function(s) for current monitor info References: <17da2391-a30c-4d5f-9ffd-1758b18c34f3@default> <87k1cky0e5.fsf@mouse.gnus.org> <87muhgtn0c.fsf@mail.linkov.net> <0771514c-28eb-4ef7-9f17-eb465049df0c@default> <87pnmbcoak.fsf@mouse.gnus.org> In-Reply-To: <87pnmbcoak.fsf@mouse.gnus.org> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4861.0 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9319 signatures=668688 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1907150189 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9319 signatures=668688 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1907150189 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 30074 Cc: 30074@debbugs.gnu.org, Juri Linkov 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: -3.3 (---) > > Yes, that takes care of the `current-monitor' > > function, but not `current-monitor-size. > > Please consider this bug report to be a > > request for a function like that. >=20 > Well, there's > (x-display-pixel-width (selected-frame)) > =3D> 1920 > (and height), so it seems like we're covered... No, we're not covered. `C-h f x-display-pixel-width': On "multi-monitor" setups this refers to the pixel width for all physical monitors associated with DISPLAY. To get information for each physical monitor, use 'display-monitor-attributes-list'. IOW, use `display-monitor-attributes-list'. I think you're missing the point of this request. Yes, all such info is available from `display-monitor-attributes-list'. The point is to have specific functions that provide it directly. > And the function above also returns the same size data, but as an alist: >=20 > (frame-monitor-attributes (selected-frame)) > =3D> ((name . "eDP1") (geometry 0 0 1920 1080) (workarea 0 27 1920 1053) = (mm- > size 310 170) (frames # # 0x563f22915f10>) (source . "Gdk")) `current-monitor-size' is a convenience function. Obviously you can get the info it provides by digging it out of `display-monitor-attributes-list' (or `frame-monitor-attributes', which just calls `d-m-a-l'). `current-monitor-size' gives you directly, au choix, the geometry or workarea size. From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 15 12:24:46 2019 Received: (at 30074) by debbugs.gnu.org; 15 Jul 2019 16:24:46 +0000 Received: from localhost ([127.0.0.1]:48874 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hn3mN-00085C-6Q for submit@debbugs.gnu.org; Mon, 15 Jul 2019 12:24:45 -0400 Received: from userp2120.oracle.com ([156.151.31.85]:48880) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hn3mL-00084x-7f for 30074@debbugs.gnu.org; Mon, 15 Jul 2019 12:24:41 -0400 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x6FGOAXR065952; Mon, 15 Jul 2019 16:24:35 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2018-07-02; bh=JSvA9KX+D6u/D1OQnI7PNeWhMqw9+mEYj5wTwcIzm1M=; b=u5OlrBBNQvz4s89NM+KIs9Er73sL7u/miL9GEFAFJ5bRZYl8OMpG9DnRzJ2gq3wsEyx3 viE3h/Ql3pwmlRAGCKaPK00Kx1+tdPWBD7xmo4mf0NErEeNY8bEi7mCYiEzyXRCe/oIo kxZJQm9jkxEZNdTLOYN/CrzBtgR0nopseQ/jkJYsttV2GDujds9Y8oeRXd9QTj9ipqnY qENH7+xwNCRu1gqZLudALdr2+RSWwOSnW16eUJ95R8fnpa5T+3J9mYpZniHD+gE+mKYc zhmBcwwJnt3lagmx1SklZ7/NFc69jvjgPD3Uagf8Xvi2g1WgJ2/rXxTpRj7m0s2xvMhE OA== Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by userp2120.oracle.com with ESMTP id 2tq7xqqg9s-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 15 Jul 2019 16:24:35 +0000 Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x6FGNV7E160983; Mon, 15 Jul 2019 16:24:35 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userp3030.oracle.com with ESMTP id 2tq4dtdjxa-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 15 Jul 2019 16:24:34 +0000 Received: from abhmp0015.oracle.com (abhmp0015.oracle.com [141.146.116.21]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id x6FGOX8m003896; Mon, 15 Jul 2019 16:24:33 GMT MIME-Version: 1.0 Message-ID: <098a0314-8c32-4535-8976-96e27a54af36@default> Date: Mon, 15 Jul 2019 09:24:33 -0700 (PDT) From: Drew Adams To: Andy Moreton , 30074@debbugs.gnu.org Subject: RE: bug#30074: 26.0; Add function(s) for current monitor info References: <17da2391-a30c-4d5f-9ffd-1758b18c34f3@default> <87k1cky0e5.fsf@mouse.gnus.org> <87muhgtn0c.fsf@mail.linkov.net> <0771514c-28eb-4ef7-9f17-eb465049df0c@default> In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4861.0 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9319 signatures=668688 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1907150191 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9319 signatures=668688 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1907150191 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 30074 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: -3.3 (---) > > Please consider this bug report to be a > > request for a function like [`current-monitor-size']. >=20 > Doesn't the returned monitor attributes list give you that information ? Yes, and the bug report made that clear from the beginning (with `display-monitor-attributes-list'). > (frame-monitor-attributes (selected-frame)) > =3D> ((geometry 0 0 1920 1080)...) >=20 > What other information do you need ? It's not about _needing other information_. It's about having a function that gives you the size info directly. This is getting a bit ridiculous. Why do you think we have functions like this? (defun frame-width (&optional frame) "Return number of columns available for display on FRAME. If FRAME is omitted, describe the currently selected frame." (cdr (assq 'width (frame-parameters frame)))) Why don't you complain that `frame-parameters' already gives you that information? "What other information do you need?" From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 15 12:35:56 2019 Received: (at 30074) by debbugs.gnu.org; 15 Jul 2019 16:35:56 +0000 Received: from localhost ([127.0.0.1]:48896 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hn3xE-0008PH-Ct for submit@debbugs.gnu.org; Mon, 15 Jul 2019 12:35:56 -0400 Received: from quimby.gnus.org ([80.91.231.51]:45316) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hn3xB-0008P5-7N for 30074@debbugs.gnu.org; Mon, 15 Jul 2019 12:35:53 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=sandy) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hn3x4-00013T-V2; Mon, 15 Jul 2019 18:35:49 +0200 From: Lars Ingebrigtsen To: Drew Adams Subject: Re: bug#30074: 26.0; Add function(s) for current monitor info References: <17da2391-a30c-4d5f-9ffd-1758b18c34f3@default> <87k1cky0e5.fsf@mouse.gnus.org> <87muhgtn0c.fsf@mail.linkov.net> <0771514c-28eb-4ef7-9f17-eb465049df0c@default> <098a0314-8c32-4535-8976-96e27a54af36@default> Date: Mon, 15 Jul 2019 18:35:46 +0200 In-Reply-To: <098a0314-8c32-4535-8976-96e27a54af36@default> (Drew Adams's message of "Mon, 15 Jul 2019 09:24:33 -0700 (PDT)") Message-ID: <8736j7cl25.fsf@mouse.gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Drew Adams writes: > This is getting a bit ridiculous. Why do > you think we have functions like this? > > (defun frame-width (&optional frame) > "Return number of columns available for display on FRAME. > If FRAME is o [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 30074 Cc: 30074@debbugs.gnu.org, Andy Moreton 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 (-) Drew Adams writes: > This is getting a bit ridiculous. Why do > you think we have functions like this? > > (defun frame-width (&optional frame) > "Return number of columns available for display on FRAME. > If FRAME is omitted, describe the currently selected frame." > (cdr (assq 'width (frame-parameters frame)))) > > Why don't you complain that `frame-parameters' > already gives you that information? "What other > information do you need?" Because getting the frame width is something you need quite a bit. Monitor width -- not so much. I'm closing this bug report. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 15 12:36:04 2019 Received: (at control) by debbugs.gnu.org; 15 Jul 2019 16:36:04 +0000 Received: from localhost ([127.0.0.1]:48900 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hn3xL-0008QA-OU for submit@debbugs.gnu.org; Mon, 15 Jul 2019 12:36:03 -0400 Received: from quimby.gnus.org ([80.91.231.51]:45332) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hn3xI-0008PY-GQ for control@debbugs.gnu.org; Mon, 15 Jul 2019 12:36:02 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=sandy) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hn3xG-00013b-00 for control@debbugs.gnu.org; Mon, 15 Jul 2019 18:35:59 +0200 Date: Mon, 15 Jul 2019 18:35:57 +0200 Message-Id: <871ryrcl1u.fsf@mouse.gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #30074 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: tags 30074 wontfix close 30074 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control 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 30074 wontfix close 30074 quit From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 15 12:42:39 2019 Received: (at submit) by debbugs.gnu.org; 15 Jul 2019 16:42:39 +0000 Received: from localhost ([127.0.0.1]:48906 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hn43j-000094-HD for submit@debbugs.gnu.org; Mon, 15 Jul 2019 12:42:39 -0400 Received: from lists.gnu.org ([209.51.188.17]:43433) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hn43g-00008u-Uv for submit@debbugs.gnu.org; Mon, 15 Jul 2019 12:42:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35432) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hn43g-00080z-0i for bug-gnu-emacs@gnu.org; Mon, 15 Jul 2019 12:42:36 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: * X-Spam-Status: No, score=1.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, RDNS_DYNAMIC autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hn43f-0003sC-5J for bug-gnu-emacs@gnu.org; Mon, 15 Jul 2019 12:42:35 -0400 Received: from 195-159-176-226.customer.powertech.no ([195.159.176.226]:33284 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hn43e-0003q5-Us for bug-gnu-emacs@gnu.org; Mon, 15 Jul 2019 12:42:35 -0400 Received: from list by blaine.gmane.org with local (Exim 4.89) (envelope-from ) id 1hn43b-000hvk-0b for bug-gnu-emacs@gnu.org; Mon, 15 Jul 2019 18:42:31 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: bug-gnu-emacs@gnu.org From: Andy Moreton Subject: Re: bug#30074: 26.0; Add function(s) for current monitor info Date: Mon, 15 Jul 2019 17:42:26 +0100 Message-ID: References: <17da2391-a30c-4d5f-9ffd-1758b18c34f3@default> <87k1cky0e5.fsf@mouse.gnus.org> <87muhgtn0c.fsf@mail.linkov.net> <0771514c-28eb-4ef7-9f17-eb465049df0c@default> <098a0314-8c32-4535-8976-96e27a54af36@default> Mime-Version: 1.0 Content-Type: text/plain User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (windows-nt) Cancel-Lock: sha1:4pzlaZpH2NvGzVzSNbEPhDil+WU= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 195.159.176.226 X-Spam-Score: -1.0 (-) 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: -2.0 (--) On Mon 15 Jul 2019, Drew Adams wrote: >> > Please consider this bug report to be a >> > request for a function like [`current-monitor-size']. >> >> Doesn't the returned monitor attributes list give you that information ? > > Yes, and the bug report made that clear from the > beginning (with `display-monitor-attributes-list'). > >> (frame-monitor-attributes (selected-frame)) >> => ((geometry 0 0 1920 1080)...) >> >> What other information do you need ? > > It's not about _needing other information_. > It's about having a function that gives you > the size info directly. > > This is getting a bit ridiculous. Why do > you think we have functions like this? If your question had been more clearly phrased, then it would have been clear that you wanted a trivial helper function rather than reporting of additional information. Having read the entire thread that was not obvious, hence my question. > Why don't you complain that `frame-parameters' > already gives you that information? "What other > information do you need?" There's no need to be rude when replying to a simple query. Feel free to write a patch with the helper routines that you would find helpful. AndyM From unknown Wed Jun 18 23:09:41 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 13 Aug 2019 11:24:08 +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