<div dir="ltr">On Fri, Oct 10, 2008 at 11:42 AM, Adrian <span dir="ltr"><<a href="mailto:adrian.down@gmail.com">adrian.down@gmail.com</a>></span> wrote:<br><br>I've fiddled a bit and come up with a chunk of code that may do what you want.  This approach is much more crude than what could be achieved with David's suggested route, and (like the code you tried) will not work properly beyond a certain number of frames.<br>
<br>--Nathaniel<br><br>;; function to update `left' value in default-frame-alist<br>(defun default-frame-alist-update ()<br>  (let* ((framecount (length (visible-frame-list)))<br>     (xoffset (- 1005 (* framecount 300))))<br>
    (setq default-frame-alist<br>      `((left . ,xoffset)<br>        (top . 0)<br>        (width . 80)<br>        (height . 73)))))<br><br>;; call the above function just before creating a new frame<br>(add-hook 'before-make-frame-hook 'default-frame-alist-update)<br>
<br><br><br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div dir="ltr">Hello,<div><br></div><div>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.</div>

<div><br></div><div>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:</div>

<div>Wrong type argument: integerp, xoffset<br></div><div><br></div><div>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.</div>

<div><br></div><div>Thanks,</div><div>Adrian</div><div><br></div><div>(setq framecount (length (visible-frame-list)))</div><div><div>(setq xoffset (- 1005 (* framecount 300)))</div><div>(setq default-frame-alist</div><div>

      (append</div><div>       '((left . xoffset)</div><div><span style="white-space: pre;">        </span> (top . 0)</div><div><span style="white-space: pre;">  </span> (width . 80)</div>
<div><span style="white-space: pre;">     </span> (height . 73))</div><div>       default-frame-alist))</div><div><br></div><div>(setq initial-frame-alist</div><div>      (append</div><div>       '((left . 1005)</div>
<div><span style="white-space: pre;">     </span> (top . 0)</div><div><span style="white-space: pre;">  </span> (width . 80)</div><div><span style="white-space: pre;">       </span> (height . 73))</div>
<div>       initial-frame-alist))</div></div></div>
<br>_____________________________________________________________<br>
MacOSX-Emacs mailing list<br>
<a href="mailto:MacOSX-Emacs@email.esm.psu.edu">MacOSX-Emacs@email.esm.psu.edu</a><br>
<a href="http://email.esm.psu.edu/mailman/listinfo/macosx-emacs" target="_blank">http://email.esm.psu.edu/mailman/listinfo/macosx-emacs</a><br>
List Archives: <a href="http://dir.gmane.org/gmane.emacs.macintosh.osx" target="_blank">http://dir.gmane.org/gmane.emacs.macintosh.osx</a><br>
<br></blockquote></div><br></div>