all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* window alignment at startup
@ 2013-07-10 21:22 Mickey Ferguson
  2013-07-10 22:17 ` Drew Adams
  0 siblings, 1 reply; 3+ messages in thread
From: Mickey Ferguson @ 2013-07-10 21:22 UTC (permalink / raw)
  To: help-gnu-emacs

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!



^ permalink raw reply	[flat|nested] 3+ messages in thread
[parent not found: <mailman.763.1373491420.12400.help-gnu-emacs@gnu.org>]

end of thread, other threads:[~2013-07-12  9:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-10 21:22 window alignment at startup Mickey Ferguson
2013-07-10 22:17 ` Drew Adams
     [not found] <mailman.763.1373491420.12400.help-gnu-emacs@gnu.org>
2013-07-12  9:05 ` Emanuel Berg

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.