From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Emanuel Berg Newsgroups: gmane.emacs.help Subject: Re: window alignment at startup Date: Fri, 12 Jul 2013 11:05:20 +0200 Organization: Aioe.org NNTP Server Message-ID: <87y59cdu7j.fsf@VLAN-3434.student.uu.se> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1373620218 16886 80.91.229.3 (12 Jul 2013 09:10:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 12 Jul 2013 09:10:18 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jul 12 11:10:20 2013 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 1UxZMn-0003at-Bs for geh-help-gnu-emacs@m.gmane.org; Fri, 12 Jul 2013 11:10:17 +0200 Original-Received: from localhost ([::1]:33817 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UxZMm-0003Ky-TV for geh-help-gnu-emacs@m.gmane.org; Fri, 12 Jul 2013 05:10:16 -0400 Original-Path: usenet.stanford.edu!goblin3!goblin2!goblin.stu.neva.ru!aioe.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 47 Original-NNTP-Posting-Host: SWN/nubmpQxYKwY7hPy4YA.user.speranza.aioe.org Original-X-Complaints-To: abuse@aioe.org User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux) X-Notice: Filtered by postfilter v. 0.8.2 Cancel-Lock: sha1:XlbzmF2HqizcV2qN+j5IYbujasw= Original-Xref: usenet.stanford.edu gnu.emacs.help:199806 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:92073 Archived-At: "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 VT: ;; left margin = 1 char; no right margin (add-hook 'window-configuration-change-hook (lambda () (set-window-margins (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: http://user.it.uu.se/~embe8573 internet activity: http://home.student.uu.se/embe8573