* Re: starting up with two frames on different monitors in Mac OS X
[not found] <mailman.16.1089925436.1960.help-gnu-emacs@gnu.org>
@ 2004-07-15 22:55 ` Michael Slass
2004-07-15 23:00 ` Michael Slass
0 siblings, 1 reply; 4+ messages in thread
From: Michael Slass @ 2004-07-15 22:55 UTC (permalink / raw)
Gilbert Harman <harman@Princeton.EDU> 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.
>
> 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]:
(mapcar
(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
(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.
--
Mike Slass, '90
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: starting up with two frames on different monitors in Mac OS X
2004-07-15 22:55 ` starting up with two frames on different monitors in Mac OS X Michael Slass
@ 2004-07-15 23:00 ` Michael Slass
2004-07-16 1:58 ` Gilbert Harman
0 siblings, 1 reply; 4+ messages in thread
From: Michael Slass @ 2004-07-15 23:00 UTC (permalink / raw)
Michael Slass <miknrene@drizzle.com> writes:
Replying to my own post --- small change in step (4), so the output
goes right into the *scratch* buffer
>Gilbert Harman <harman@Princeton.EDU> 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.
>>
>> 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-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 <bracketed-names> 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))
'(<init-top> <init-left>))
[near the bottom of .emacs]:
(make-frame '(<second-top> <second-left>))
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.
--
Mike Slass, '90
--
Mike Slass
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: starting up with two frames on different monitors in Mac OS X
2004-07-15 23:00 ` Michael Slass
@ 2004-07-16 1:58 ` Gilbert Harman
0 siblings, 0 replies; 4+ messages in thread
From: Gilbert Harman @ 2004-07-16 1:58 UTC (permalink / raw)
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 <miknrene@drizzle.com> writes:
>
> Replying to my own post --- small change in step (4), so the output
> goes right into the *scratch* buffer
>
>
>> Gilbert Harman <harman@Princeton.EDU> 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 <bracketed-names> 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))
> '(<init-top> <init-left>))
>
>
> [near the bottom of .emacs]:
>
> (make-frame '(<second-top> <second-left>))
>
>
> 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.
^ permalink raw reply [flat|nested] 4+ messages in thread
* starting up with two frames on different monitors in Mac OS X
@ 2004-07-15 21:00 Gilbert Harman
0 siblings, 0 replies; 4+ messages in thread
From: Gilbert Harman @ 2004-07-15 21:00 UTC (permalink / raw)
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.
Gil
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2004-07-16 1:58 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <mailman.16.1089925436.1960.help-gnu-emacs@gnu.org>
2004-07-15 22:55 ` starting up with two frames on different monitors in Mac OS X Michael Slass
2004-07-15 23:00 ` Michael Slass
2004-07-16 1:58 ` Gilbert Harman
2004-07-15 21:00 Gilbert Harman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).