[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: window alignment at startup

From: Emanuel Berg
Subject: Re: window alignment at startup
Date: Fri, 12 Jul 2013 11:05:20 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux)

"Mickey Ferguson" <...> writes:

> (defun align-window ()
>   "fix window positioning"
>   (interactive)
>   (set-frame-position (selected-frame)

Does `set-frame-position' only work in X? Because it doesn't seem
to do anything for me.

I have the following to get a right margin of one char, in a Linux

;; left margin = 1 char; no right margin
(add-hook 'window-configuration-change-hook
 (lambda ()
    (car (get-buffer-window-list (current-buffer)
                                 nil  ; do consider minibuffer
                                 t )) ; consider all frames
    1 0 )))

However, it is not optimal as

1) I'd like it for the minibuffer/echo area, to

2) I'd like it for the status bar, to, although I managed to setup
this somewhere else

3) Sometimes, for popup frames (for example, help) it doesn't
"kick in" until I hit `M-x', which is annoying. (I don't think
this is because of Help's View mode, because sometimes in some
other popup context - without View - I get the same behaviour -
although that's a possibility, for sure - either the hook doesn't
get fired, or it resets right after that).

But in most cases, it works OK.

As I always run Emacs in a tmux window, perhaps it is much easier
to fill the right margin with an extra char (a whitespace), in my
tmux setup? I don't know if you use tmux as well, otherwise that
could be worth exterminating.

Emanuel Berg - programmer (hire me! CV below)
computer projects:
internet activity:

reply via email to

[Prev in Thread] Current Thread [Next in Thread]