unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Stephen Leake <stephen_leake@stephe-leake.org>
Cc: emacs-devel@gnu.org
Subject: Re: managing windows in two frames
Date: Tue, 03 Sep 2013 09:59:43 -0400	[thread overview]
Message-ID: <jwvbo4arp0n.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <8561uiclrj.fsf@stephe-leake.org> (Stephen Leake's message of "Tue, 03 Sep 2013 04:11:44 -0500")

> 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.


        Stefan



  parent reply	other threads:[~2013-09-03 13:59 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-03  9:11 managing windows in two frames Stephen Leake
2013-09-03 12:52 ` martin rudalics
2013-09-04 18:16   ` Stephen Leake
2013-09-04 18:24     ` Stephen Leake
2013-09-04 19:33     ` Stefan Monnier
2013-09-04 21:22       ` Stephen Leake
2013-09-06 10:53         ` martin rudalics
2013-09-07  8:49           ` Stephen Leake
2013-09-07  9:37             ` martin rudalics
2013-09-07 13:19               ` Stephen Leake
2013-09-08  7:56                 ` martin rudalics
2013-09-04 21:33       ` Drew Adams
2013-09-06 10:52       ` martin rudalics
2013-09-06 13:22         ` Stefan Monnier
2013-09-06 10:52     ` martin rudalics
2013-09-07  8:56       ` Stephen Leake
2013-09-07  9:37         ` martin rudalics
2013-09-07 13:29           ` Stephen Leake
2013-09-03 13:59 ` Stefan Monnier [this message]
2013-09-03 14:15   ` martin rudalics
2013-09-03 14:30     ` Stefan Monnier
2013-09-03 16:23       ` martin rudalics
2013-09-03 20:34         ` Stefan Monnier
2013-09-04  6:25           ` martin rudalics
2013-09-04 13:24             ` Stefan Monnier
2013-09-04 15:04               ` martin rudalics
2013-09-04 17:44                 ` Stefan Monnier
2013-09-06 10:53                   ` martin rudalics
2013-09-06 13:44                     ` Stefan Monnier
2013-09-06 17:14                       ` martin rudalics
2013-09-06 19:00                         ` Stefan Monnier
2013-09-07  9:37                           ` martin rudalics
2013-09-08 17:55                             ` Stefan Monnier
2013-09-09  8:10                               ` martin rudalics
2013-09-09 14:05                                 ` Stefan Monnier
2013-09-04 18:19   ` Stephen Leake

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvbo4arp0n.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    --cc=stephen_leake@stephe-leake.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).