From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Ludwig, Mark" Newsgroups: gmane.emacs.help Subject: Adapting to changing X display size while Emacs is running Date: Tue, 13 Jan 2015 21:44:28 +0000 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1421186721 22920 80.91.229.3 (13 Jan 2015 22:05:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 13 Jan 2015 22:05:21 +0000 (UTC) To: "help-gnu-emacs@gnu.org" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Jan 13 23:05:12 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YB9aK-0001z8-B8 for geh-help-gnu-emacs@m.gmane.org; Tue, 13 Jan 2015 23:05:12 +0100 Original-Received: from localhost ([::1]:41640 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YB9aJ-0005cL-NY for geh-help-gnu-emacs@m.gmane.org; Tue, 13 Jan 2015 17:05:11 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34766) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YB9a4-0005c3-1L for help-gnu-emacs@gnu.org; Tue, 13 Jan 2015 17:04:56 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YB9a0-0005yG-KO for help-gnu-emacs@gnu.org; Tue, 13 Jan 2015 17:04:55 -0500 Original-Received: from usslmhub002.ugs.com ([134.244.32.85]:10282 helo=ugs.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YB9a0-0005yA-GP for help-gnu-emacs@gnu.org; Tue, 13 Jan 2015 17:04:52 -0500 Original-Received: from USSLMMBX002.net.plm.eds.com (161.134.138.62) by USSLMHUB002.net.plm.eds.com (134.244.32.85) with Microsoft SMTP Server (TLS) id 14.3.158.1; Tue, 13 Jan 2015 15:44:28 -0600 Original-Received: from USSLMMBX003.net.plm.eds.com ([169.254.2.224]) by USSLMMBX002.net.plm.eds.com ([169.254.1.169]) with mapi id 14.03.0158.001; Tue, 13 Jan 2015 15:44:27 -0600 Thread-Topic: Adapting to changing X display size while Emacs is running Thread-Index: AdAvecaXV4PieUH/QIaF7Mjl27WCnA== Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [146.122.71.24] X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 X-Received-From: 134.244.32.85 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:102053 Archived-At: Greetings, Is there any way to get the current dimensions of the X display on which Emacs is displaying one or more frames? I'm looking to adapt to changing display size while Emacs is running. I'm actually using eXceed, and not sure if changing display size is even a standard feature in X, but what I have for startup geometry looks like: Emacs*geometry: 141x51-5+5 It's the "-5" part that changes, since it's relative to the width of the display. When the display has changed, I'd like to be able to move the frame accordingly, so it's again near the right edge of the display. I've tried using: (set-frame-position frame -5 5) That doesn't know the current size of the display; it works off what the size of the display was when Emacs started, apparently. This is also apparent in the output of: (x-display-pixel-width) Any way to update this without restarting Emacs? Thanks! Mark