From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Wang Lei Newsgroups: gmane.emacs.help Subject: Re: Setting geometry for second frame ?? Date: Sun, 13 Sep 2009 10:13:54 +0800 Message-ID: References: <1252757015.2294.32.camel@CASE> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1252808074 7363 80.91.229.12 (13 Sep 2009 02:14:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 13 Sep 2009 02:14:34 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Sep 13 04:14:27 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Mmebi-0002FV-Sg for geh-help-gnu-emacs@m.gmane.org; Sun, 13 Sep 2009 04:14:27 +0200 Original-Received: from localhost ([127.0.0.1]:34690 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mmebh-0000JP-NT for geh-help-gnu-emacs@m.gmane.org; Sat, 12 Sep 2009 22:14:25 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MmebK-0000J2-3U for help-gnu-emacs@gnu.org; Sat, 12 Sep 2009 22:14:02 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MmebD-00009S-UO for help-gnu-emacs@gnu.org; Sat, 12 Sep 2009 22:14:00 -0400 Original-Received: from [199.232.76.173] (port=33721 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MmebD-00009L-Rf for help-gnu-emacs@gnu.org; Sat, 12 Sep 2009 22:13:55 -0400 Original-Received: from mail-vw0-f178.google.com ([209.85.212.178]:44781) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MmebD-0003tp-KI for help-gnu-emacs@gnu.org; Sat, 12 Sep 2009 22:13:55 -0400 Original-Received: by vws8 with SMTP id 8so1257915vws.14 for ; Sat, 12 Sep 2009 19:13:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=X6PMmnoAODV6JeB0KUxSO9Cx0OoDmxnPAfrbU5UZEho=; b=TCl35K7YBiDiUZ8KZanUh34gEfAX7n95wwq0xBRRrE9nMMaLwbEooz53DvuxIZWoVG 2rc1LULjfvaCFWBDg2dX8YCXHs65puD4ML62cuh/ea/qJmAIlhNXbSRYjNCpqEAWzTjm 19pIlX5F1WzBM9Ke1S8emeczftKlkffHBzR9s= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=OBglLWQVoUaa5aMgNtC86QLpIt32k0TVwGoAvCXAcJ/S6UrA+qqVr71pln4U5f90iO R5KlL2FwGxxYe/ZR75nAbSk0pCppaQevX7fS4yj5eH4uV6ELt3qSMiRIMSkAseNQv70W Xx11LoNfC9R6DfNqCafki57YwLG1erhbagUks= Original-Received: by 10.220.80.2 with SMTP id r2mr5402970vck.7.1252808034434; Sat, 12 Sep 2009 19:13:54 -0700 (PDT) In-Reply-To: X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:68091 Archived-At: Maybe you can have a look at default-frame-alist and initial-frame-alist. On 9/13/09, Kevin Rodgers wrote: > William Case wrote: >> Hi; >> >> How do you set the size of a secondary frame? >> >> My Xresources file is set to 'Emacs.Geometry: 80x55+96+35'. That size, >> generally speaking, is the default size I am most comfortable with. >> However, I have a key binding that opens a second frame containing a >> text file in which I keep my notes as I am working. >> >> (global-set-key [(super f1)] (lambda() >> (interactive)(find-file-other-frame >> "~/Documents/C/Text/C-Notes.txt"))) >> >> I want this second frame to open with a geometry of 75x55 so that I can >> fit two frames, side-by-side, on my desktop. I don't want to change my >> Xresources file unless there is a safe way to write a conditional >> command in Xresources, nor compromise on my default setting. >> >> Is there a way to do this using a key binding to an existing function or >> do I have to write my own function? If I have to write my own function, >> could you outline which functions and/or variables I might need to use? > > (let ((default-frame-alist `((height . 75) (width . 55) > ,@default-frame-alist))) > (find-file-other-frame "~/Documents/C/Text/C-Notes.txt")) > > -- > Kevin Rodgers > Denver, Colorado, USA > > > > -- Regards Lei