[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: starting up with two frames on different monitors in Mac OS X

From: Michael Slass
Subject: Re: starting up with two frames on different monitors in Mac OS X
Date: Thu, 15 Jul 2004 15:55:45 -0700
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)

Gilbert Harman <address@hidden> 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 in Mac OS 10.3.4.
>Thanks in advance for any help on this.
> Gil

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-x C-e
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 <bracketed-names> with the cells
   gathered above):

[near the top of .emacs]:

 (lambda (property-cons)
   (assq-delete-all (car property-cons) default-frame-alist)
   (add-to-list 'default-frame-alist property-cons))
 '(<init-top> <init-left>))

 [near the bottom of .emacs]:
 (make-frame '(<second-top> <second-left>))

On my machine, I get something like this

 (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

Mike Slass, '90

reply via email to

[Prev in Thread] Current Thread [Next in Thread]