[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Trying to right-align my window on startup
From: |
Mickey Ferguson |
Subject: |
RE: Trying to right-align my window on startup |
Date: |
Sat, 11 Jan 2014 01:17:22 +0000 |
>> I can't figure out how or where to place it so that it executes _and
>> works properly. I put it my MF-Init.el file that is loaded upon
>> startup.
>Replace that file with one that does _only_ what you are testing.
>Adding something untested to a giant sack of eels is not the way to test that
>something. (No, I cannot know >that MF-Init.el is a sack of eels. Just a
>hunch.)
Yes, it is a sack of eels. :-) It's been building up for at least 20 years...
most of which I added stuff based on recommendations from others, not really
knowing fully what I was doing. When it comes to elisp, I'm not usually even
competent enough to be dangerous.
>According to your code, that could happen if the `selected-frame'
>is not what you think it is. Try adding a `message' call that tells
>you what the selected frame is, and its displayed buffer etc.
>IOW, find out what is going on.
I'm afraid I don't even know how to do this, or even what it means to
differentiate between frames. But I have made some progress, using your
isolation approach.
Here is a very pared down file I'm calling minimal.el. I've narrowed it all
down to the call to set-frame-font within big-font-mode. As it appears below,
emacs starts up and is properly right-aligned. If I uncomment out the call to
big-font-mode, which ultimately is just a call to set-frame-font, it gives the
message that it ran align-window-right, but it starts up about an inch from the
right edge. (Don't ask me where I got that string for the font to use, because
I don't remember. But it does give me the best looking font [to me] for my
needs. If there is a better way to specify it that will give me the font I
want, but not run into the problem I'm encountering, I'm all ears.)
===============================================================================
(defun align-window ()
"fix window positioning"
(interactive)
(if (equal (getenv "emacs_alignment") "right")
(align-window-right)
(align-window-left))
)
(defun align-window-left ()
"align window to left window edge"
(interactive)
(set-frame-position (selected-frame) 0 0)
(message "Ran align-window-left")
)
(defun align-window-right ()
"align window to right window edge"
(interactive)
(set-frame-position (selected-frame) -1 0)
(message "Ran align-window-right")
)
(defun big-font-mode ()
"Use larger font"
(interactive)
(set-frame-font
"-outline-Consolas-bold-r-normal-normal-12-90-96-96-c-*-iso10646-1"
)
)
(cond
((eq window-system 'w32)
(progn
;; (big-font-mode)
(align-window)
)))
===============================================================================
- Re: In defense of Customize [was: Trying to right-align my window on startup], (continued)
- Message not available
- Re: In defense of Customize [was: Trying to right-align my window on startup], Emanuel Berg, 2014/01/31
- Message not available
- Re: In defense of Customize [was: Trying to right-align my window on startup], Rusi, 2014/01/31
- Message not available
- Re: In defense of Customize [was: Trying to right-align my window on startup], Christoph Wedler, 2014/01/31
- Message not available
- Re: Trying to right-align my window on startup, Sebastien Vauban, 2014/01/09
- RE: Trying to right-align my window on startup, Drew Adams, 2014/01/09
- RE: Trying to right-align my window on startup, Mickey Ferguson, 2014/01/10
- RE: Trying to right-align my window on startup, Drew Adams, 2014/01/10
- RE: Trying to right-align my window on startup,
Mickey Ferguson <=
- RE: Trying to right-align my window on startup, Drew Adams, 2014/01/10
- RE: Trying to right-align my window on startup, Mickey Ferguson, 2014/01/13
- Re: Trying to right-align my window on startup, Eli Zaretskii, 2014/01/13