[OS X Emacs] Dynamic window positioning in Aquamacs

Adrian adrian.down at gmail.com
Fri Oct 10 12:42:42 EDT 2008

I'm trying to configure Aquamacs so that new windows (aka emacs "frames")
will pop up in a tiled fashion.  I know Aquamacs has a tiling option, but I
don't want the Aquamacs windows to use the entire screen and I don't want to
have to retile every time I open another window.  Basically, I want to be
able to specify the default position of windows without having all
subsequent windows open in the exact same location.

I tried to write a few lines in my .emacs file to accomplish this, but thus
far I've failed.  The relevant lines from my .emacs file are at the end of
this message.  Hopefully its just a lisp syntax issue on my part, as I've
never used lisp outside of basic Emacs configuration.  There are two types
of behavior Aquamacs exhibits with these lines, depending on whether
smart-frame-positioning-mode is enabled or not.  If so, my positioning
arguments are ignored and all Emacs windows are popped on the left boundary
of the screen, presumably with "left" set to 0.  If
smart-frame-positioning-mode is disabled, Aquamacs fails on startup with the
following output to the message buffer:
Wrong type argument: integerp, xoffset

Is what I am trying to accomplish possible in Aquamacs, and if so, is my
method below the proper way to go about it?  Let me know if there's any
other useful information I can provide.


(setq framecount (length (visible-frame-list)))
(setq xoffset (- 1005 (* framecount 300)))
(setq default-frame-alist
       '((left . xoffset)
 (top . 0)
 (width . 80)
 (height . 73))

(setq initial-frame-alist
       '((left . 1005)
 (top . 0)
 (width . 80)
 (height . 73))
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://email.esm.psu.edu/pipermail/macosx-emacs/attachments/20081010/f28537e4/attachment.html>

More information about the MacOSX-Emacs mailing list