From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Gilbert Harman Newsgroups: gmane.emacs.help Subject: Re: starting up with two frames on different monitors in Mac OS X Date: Thu, 15 Jul 2004 21:58:40 -0400 Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1089943148 26179 80.91.224.253 (16 Jul 2004 01:59:08 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 16 Jul 2004 01:59:08 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jul 16 03:58:57 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BlI01-0004Ck-00 for ; Fri, 16 Jul 2004 03:58:57 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BlI2W-00069e-Bd for geh-help-gnu-emacs@m.gmane.org; Thu, 15 Jul 2004 22:01:32 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1BlI2P-00069P-Oy for help-gnu-emacs@gnu.org; Thu, 15 Jul 2004 22:01:25 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1BlI2P-00069D-7s for help-gnu-emacs@gnu.org; Thu, 15 Jul 2004 22:01:25 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BlI2P-00069A-5O for help-gnu-emacs@gnu.org; Thu, 15 Jul 2004 22:01:25 -0400 Original-Received: from [128.112.129.75] (helo=Princeton.EDU) by monty-python.gnu.org with esmtp (Exim 4.34) id 1BlHzo-0004n5-IH for help-gnu-emacs@gnu.org; Thu, 15 Jul 2004 21:58:44 -0400 Original-Received: from smtpserver2.Princeton.EDU (smtpserver2.Princeton.EDU [128.112.129.148]) by Princeton.EDU (8.12.9/8.12.9) with ESMTP id i6G1whYa026731; Thu, 15 Jul 2004 21:58:43 -0400 (EDT) Original-Received: from [10.0.1.201] (pool-141-150-255-72.pskn.east.verizon.net [141.150.255.72]) (authenticated bits=0) by smtpserver2.Princeton.EDU (8.12.9/8.12.9) with ESMTP id i6G1wfCZ002195 (version=TLSv1/SSLv3 cipher=DES-CBC3-SHA bits=168 verify=NOT); Thu, 15 Jul 2004 21:58:42 -0400 (EDT) User-Agent: Microsoft-Entourage/11.0.0.040405 Original-To: Michael Slass , In-Reply-To: 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: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:19658 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:19658 Dear Mike, Thanks. I had to modify your idea, because on my set-up (frame-parameters) always gives the same results no matter where I drag a frame. Furthermore I can't get (make-frame ...) to make a frame in the other display. But your suggestion did set me on the right track (or a right track). I was able to get things set up by using the right monitor as the main display, so that frames would appear there by default, but I used trial and error to get appropriate values for the initial-frame-alist to get the initial frame on the left monitor. In my case I used: (add-to-list 'initial-frame-alist '(height . 40)) (add-to-list 'initial-frame-alist '(top . 160)) (add-to-list 'initial-frame-alist '(left . -1550)) (I tried '(left + -1550) but that didn't work.) Then I simply added (make-frame) at the end of my emacs to get the second frame on the right monitor using the default dimensions (with greater height). Gil > Michael Slass writes: > > Replying to my own post --- small change in step (4), so the output > goes right into the *scratch* buffer > > >> Gilbert Harman writes: >> >>> What can I put in my .emacs so that emacs will start up with two frames, one >>> on each of my monitors. I am using Gnu Emacs 21.3.50.1 in Mac OS 10.3.4. >>> >>> Thanks in advance for any help on this. >> ...... > Professor Harman: > > I think this recipe will do: > > 1) start emacs with no filename, so you'll visit the *scratch* buffer > 2) resize the frame on the first monitor to the size you want > 3) enter (frame-parameters) in the *scratch* buffer > 4) evaluate the form: place the cursor after the closing paren, and > type C-j > 5) in the resulting alist, there will be cells that show where the top > and left corners of the frame are: (top . 10) ... (left . 0) > copy those cells for later use; we'll call them init-top and init-left > 6) Drag the frame to your other monitor, and resize it to the shape > you'd like it to start with. > 7) repeat steps 4 and 5; we'll call these cells second-top and > second-left. NB: if the second frame is to the left of the first, > these cells may have a negative number, and + instead of a . > > 8) add to your .emacs (replacing with the cells > gathered above): > > [near the top of .emacs]: > > (mapcar > (lambda (property-cons) > (assq-delete-all (car property-cons) default-frame-alist) > (add-to-list 'default-frame-alist property-cons)) > '( )) > > > [near the bottom of .emacs]: > > (make-frame '( )) > > > On my machine, I get something like this > > > (mapcar > (lambda (property-cons) > (assq-delete-all (car property-cons) default-frame-alist) > (add-to-list 'default-frame-alist property-cons)) > '((top . 1) (left . 1))) > > > > (make-frame '((top + -73) (left + -1282))) > > > Best regards, and don't hesitate to contact me if you have any > problems.