From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#30074: 26.0; Add function(s) for current monitor info Date: Mon, 15 Jul 2019 09:17:42 -0700 (PDT) Message-ID: <1a4b56c5-4238-4958-841f-fcf547a767d7@default> 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> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="64904"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 30074@debbugs.gnu.org, Juri Linkov To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jul 15 18:18:09 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hn3g0-000Gj5-E8 for geb-bug-gnu-emacs@m.gmane.org; Mon, 15 Jul 2019 18:18:08 +0200 Original-Received: from localhost ([::1]:40714 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hn3fy-0005gk-QN for geb-bug-gnu-emacs@m.gmane.org; Mon, 15 Jul 2019 12:18:06 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58776) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hn3fv-0005gS-4O for bug-gnu-emacs@gnu.org; Mon, 15 Jul 2019 12:18:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hn3fu-00052H-32 for bug-gnu-emacs@gnu.org; Mon, 15 Jul 2019 12:18:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:40034) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hn3ft-000525-UG for bug-gnu-emacs@gnu.org; Mon, 15 Jul 2019 12:18:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hn3ft-0007uN-Ou for bug-gnu-emacs@gnu.org; Mon, 15 Jul 2019 12:18:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 15 Jul 2019 16:18:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 30074 X-GNU-PR-Package: emacs Original-Received: via spool by 30074-submit@debbugs.gnu.org id=B30074.156320747330384 (code B ref 30074); Mon, 15 Jul 2019 16:18:01 +0000 Original-Received: (at 30074) by debbugs.gnu.org; 15 Jul 2019 16:17:53 +0000 Original-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 Original-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 Original-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== Original-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 Original-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 Original-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 Original-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 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)] 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:163138 Archived-At: > > 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.