* setting geometry for new frame
@ 2009-10-23 10:08 mandar.mitra
2009-10-23 11:24 ` Pascal J. Bourguignon
0 siblings, 1 reply; 3+ messages in thread
From: mandar.mitra @ 2009-10-23 10:08 UTC (permalink / raw)
To: help-gnu-emacs
Hello,
I've been trying to use make-frame to create a new frame at a specific
location as follows:
(make-frame '((left . +400) (top . +0)))
But when I type this in the scratch buffer, and do an eval, the newly
created frame doesn't follow my left and top specifications. Every
time, the new frame seems to be created at roughly the same location
relative to the initial frame.
Is there some way to position a newly created frame at a specific
location (as is done using the -geometry option of various X
commands)?
Thanks for any tips,
Mandar.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: setting geometry for new frame
2009-10-23 10:08 setting geometry for new frame mandar.mitra
@ 2009-10-23 11:24 ` Pascal J. Bourguignon
2009-10-24 18:25 ` [SOLVED] " mandar.mitra
0 siblings, 1 reply; 3+ messages in thread
From: Pascal J. Bourguignon @ 2009-10-23 11:24 UTC (permalink / raw)
To: help-gnu-emacs
"mandar.mitra" <mandar.mitra@gmail.com> writes:
> Hello,
>
> I've been trying to use make-frame to create a new frame at a specific
> location as follows:
>
> (make-frame '((left . +400) (top . +0)))
>
> But when I type this in the scratch buffer, and do an eval, the newly
> created frame doesn't follow my left and top specifications. Every
> time, the new frame seems to be created at roughly the same location
> relative to the initial frame.
>
> Is there some way to position a newly created frame at a specific
> location (as is done using the -geometry option of various X
> commands)?
1- The window manager has its say positionning new windows. Are you
sure it's not your window manager that overrides the frame
position?
2- The function make-frame may have been advised, and some advice may
modify the positionning parameters. Evaluate:
(append (ad-get-enabled-advices 'make-frame 'before)
(ad-get-enabled-advices 'make-frame 'around))
3- Parameters may also come from the default-frame-alist variable
and form the X resource file, but those passed to the make-frame
function should shadow them.
4- Finally, you may position the frame after the fact with
set-frame-position.
--
__Pascal Bourguignon__
^ permalink raw reply [flat|nested] 3+ messages in thread
* [SOLVED] setting geometry for new frame
2009-10-23 11:24 ` Pascal J. Bourguignon
@ 2009-10-24 18:25 ` mandar.mitra
0 siblings, 0 replies; 3+ messages in thread
From: mandar.mitra @ 2009-10-24 18:25 UTC (permalink / raw)
To: help-gnu-emacs
Many thanks for your feedback.
> 2- The function make-frame may have been advised, and some advice may
> modify the positionning parameters. Evaluate:
>
> (append (ad-get-enabled-advices 'make-frame 'before)
> (ad-get-enabled-advices 'make-frame 'around))
I tried this, but the result of evaluation was nil, so I tried the
other solution you had suggested:
> 4- Finally, you may position the frame after the fact with
> set-frame-position.
This worked perfectly. Thanks again!
Mandar.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-10-24 18:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-23 10:08 setting geometry for new frame mandar.mitra
2009-10-23 11:24 ` Pascal J. Bourguignon
2009-10-24 18:25 ` [SOLVED] " mandar.mitra
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).