[Top][All Lists]

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

Re: managing windows in two frames

From: Stefan Monnier
Subject: Re: managing windows in two frames
Date: Tue, 03 Sep 2013 09:59:43 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

> If ALIST has a non-nil `inhibit-switch-frame' entry, avoid
> raising the frame.

That sounds wrong: inhibit-switch-frame means to not use another frame,
so the only correct behavior for your function is that when
inhibit-switch-frame is non-nil your function should return nil
right away.

You'd need another parameter to specify the "don't raise" behavior.

> (defun sal-move-to-other-frame ()
>   "Move current buffer to a window in another frame."
>   (interactive)
>   (let ((buffer (current-buffer)))
>     (switch-to-prev-buffer nil 'bury)
>     (let ((display-buffer-overriding-action
>          '((display-buffer-reuse-frame buffer display-buffer-pop-up-frame)
>            . '((reusable-frames . visible)))))   ;; reuse a window in other 
> frame
>       (display-buffer buffer))))

Don't let-bind display-buffer-overriding-action here.
Just pass the relevant args to display-buffer.
display-buffer-overriding-action is only for use when you don't have
direct control over the call(s) to display-buffer.


reply via email to

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