[Top][All Lists]

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

Re: New frame position (FSF Emacs on Windows)

From: Jesper Harder
Subject: Re: New frame position (FSF Emacs on Windows)
Date: Fri, 07 Feb 2003 23:04:42 +0100
User-agent: Gnus/5.090015 (Oort Gnus v0.15) Emacs/21.3.50 (i686-pc-linux-gnu)

Paul Moore <> writes:

> I currently use XEmacs 21.5.10 on Windows (2000 and XP), mainly for
> news/mail via Gnus and occasionally for general editing tasks.
> Anyway, one annoying feature in FSF Emacs is that when I open a new
> frame (for example, with C-X 5 f) it appears in *exactly* the same
> position on screen as the current frame. It therefore looks like I
> didn't open a new frame!

This doesn't help you, but on X this usually something you adjust in you
window manager.  For me a new frame is placed slightly offset from the
previous one by default.  There's also a plethora of other placement
algorithms I could select.

> How can I get the frame creation behaviour I want from FSF Emacs?

I'm not sure exactly which algorithm you want.  But this should give you
an idea: It places a new frame offset by 15 pixels from the previous:

(defun my-frame-position ()
  (let ((left (or (cdr (assq 'left default-frame-alist)) 0))
        (top (or (cdr (assq 'top default-frame-alist)) 0)))
    (setq default-frame-alist 
          (cons (cons 'left (+ left 15))
                (assq-delete-all 'left default-frame-alist))
          (cons (cons 'top (+ top 15))
                (assq-delete-all 'top default-frame-alist)))))

(add-to-list 'default-frame-alist '(user-position . t))
(add-hook 'before-make-frame-hook 'my-frame-position)

reply via email to

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