From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Sivaram Neelakantan Newsgroups: gmane.emacs.help Subject: get current frame size? Date: Mon, 12 Oct 2015 17:21:28 +0530 Message-ID: <87612c8fun.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1444652809 6915 80.91.229.3 (12 Oct 2015 12:26:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 12 Oct 2015 12:26:49 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Oct 12 14:26:41 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 1ZlcBZ-0006AC-DG for geh-help-gnu-emacs@m.gmane.org; Mon, 12 Oct 2015 14:26:37 +0200 Original-Received: from localhost ([::1]:54815 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zlbjv-0004Hi-7Y for geh-help-gnu-emacs@m.gmane.org; Mon, 12 Oct 2015 07:58:03 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48279) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zlbdm-0003g0-Lm for help-gnu-emacs@gnu.org; Mon, 12 Oct 2015 07:51:43 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zlbdh-0006xH-BX for help-gnu-emacs@gnu.org; Mon, 12 Oct 2015 07:51:42 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:43600) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zlbdg-0006x7-Tr for help-gnu-emacs@gnu.org; Mon, 12 Oct 2015 07:51:37 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Zlbde-0001Wa-BM for help-gnu-emacs@gnu.org; Mon, 12 Oct 2015 13:51:34 +0200 Original-Received: from 122.248.161.142 ([122.248.161.142]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 12 Oct 2015 13:51:34 +0200 Original-Received: from nsivaram.net by 122.248.161.142 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 12 Oct 2015 13:51:34 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 17 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 122.248.161.142 User-Mail-Address: nsivaram.net@gmail.com User-Agent: Gnus/5.130013 (Ma Gnus v0.13) Emacs/24.4 (windows-nt) Cancel-Lock: sha1:IRPxu3Tq6HDXrbzZ//Ru1yfh8mg= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 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:107590 Archived-At: I end up working with different monitors and each time I end up doing a trail and error method to get the right frame size for Emacs that covers the width of the screen and 80% of the height. Note that I don't want a fullscreen mode which I can invoke from the command line. Is there a way to query the current frame to return the dimensions so that I can plug it in my .Emacs? Something like (if (window-system) (set-frame-size (selected-frame) 124 40)) where the last 2 numbers seem to change for laptop screen sivaram --