[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
window alignment at startup
From: |
Mickey Ferguson |
Subject: |
window alignment at startup |
Date: |
Wed, 10 Jul 2013 14:22:32 -0700 |
I've coded the following function which works perfectly after a window
is already in existence:
(defun align-window ()
"fix window positioning"
(interactive)
(set-frame-position (selected-frame)
(if (equal (getenv "emacs_alignment") "right") -1
0) 0)
)
If I have the emacs_alignment environment variable defined and set to
"right", it aligns the window to the right edge of my screen.
Otherwise, it left-aligns it. The problem arises if I have
(align-window) in my .emacs. If it's not set to "right", it properly
left-aligns, but if it's set to "right", it aligns it to some point near
the right edge, but not really there. After emacs is fully loaded and
running, if I use M-x align-window, it works properly. Note that my
.emacs results in setting a different font, which causes the window size
to change.
OK, to boil it down: I want to execute this function as the last thing
emacs does before it's done - after loading the file(s), etc. How do I
do this? Replies directly to my email (Mickey.Ferguson - at -
cassidiancommunications - dot - com), since my work doesn't allow for
newsgroup access.
Thanks for any help you can provide!
- window alignment at startup,
Mickey Ferguson <=