From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: Trying to right-align my window on startup Date: Thu, 09 Jan 2014 08:23:19 +0200 Message-ID: <83mwj5ekrs.fsf@gnu.org> References: <83r48idw6z.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1389248622 26666 80.91.229.3 (9 Jan 2014 06:23:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 9 Jan 2014 06:23:42 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Mickey Ferguson Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jan 09 07:23:48 2014 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1W191v-0007va-5T for geh-help-gnu-emacs@m.gmane.org; Thu, 09 Jan 2014 07:23:47 +0100 Original-Received: from localhost ([::1]:50273 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W191u-0002Pf-PA for geh-help-gnu-emacs@m.gmane.org; Thu, 09 Jan 2014 01:23:46 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44555) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W191e-0002PX-PX for help-gnu-emacs@gnu.org; Thu, 09 Jan 2014 01:23:36 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W191Y-0003mR-Q2 for help-gnu-emacs@gnu.org; Thu, 09 Jan 2014 01:23:30 -0500 Original-Received: from mtaout21.012.net.il ([80.179.55.169]:54818) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W191Y-0003mN-Hx for help-gnu-emacs@gnu.org; Thu, 09 Jan 2014 01:23:24 -0500 Original-Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0MZ400300EU8DU00@a-mtaout21.012.net.il> for help-gnu-emacs@gnu.org; Thu, 09 Jan 2014 08:23:23 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MZ4003EMF2YAA70@a-mtaout21.012.net.il>; Thu, 09 Jan 2014 08:23:23 +0200 (IST) In-reply-to: X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 80.179.55.169 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:95312 Archived-At: [Let's not omit help-gnu-emacs from the addressees, ok?] > From: Mickey Ferguson > Date: Wed, 8 Jan 2014 21:20:03 +0000 > > Eli, thank you for your reply. That was a good starting point. First, I added a message to display when my function runs. Then I tried adding it to after-init-hook. Didn't see the message. I changed it to emacs-startup-hook. I now see the message ("Ran align-window-right"), but it still doesn't move the window. I also tried changing it from emacs-startup-hook to window-setup-hook, and again, it displays the message, indicating that it ran, but the window remains unmoved. Why don't you try doing this by modifying frame parameters (via add-to-list) instead? This is how I set the position and dimensions of my frame in my .emacs: (add-to-list 'default-frame-alist '(top . 0)) (add-to-list 'default-frame-alist '(left . 140)) (add-to-list 'initial-frame-alist '(height . 52)) (add-to-list 'default-frame-alist '(height . 50)) I understand that in your case the numbers will have to be computed first, but that's just a minor variation, I think.