unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "João Távora" <joaotavora@gmail.com>
To: martin rudalics <rudalics@gmx.at>
Cc: "help-gnu-emacs@gnu.org List" <help-gnu-emacs@gnu.org>,
	emacs-devel@gnu.org
Subject: Re: frames dedicated to buffers, or, always see specific buffers in a specific frame
Date: Fri, 12 Apr 2013 14:13:01 +0100	[thread overview]
Message-ID: <CALDnm50covgwrT=vFgumw4vfCz-pBn6=3HgEm34PmZ_c7pDRLA@mail.gmail.com> (raw)
In-Reply-To: <CALDnm53PAfrH9rSgdDkwEP5S5RxuUh=whDSCRPMcTTZLkRjoyA@mail.gmail.com>

just a small update, this is the code I'm currently working with on
emacs 24.1.1 on windows:

(setq display-buffer-alist
      `((joaot/browse-buffer-p . (joaot/browse-buffer-in-special-frame . nil))))

(defvar joaot/browse-frame)
(setq joaot/browse-frame (new-frame))
(defun joaot/browse-buffer-p (buffer action)
  (declare (ignore action))
  (let ((buffer (and buffer
                     (get-buffer buffer))))
    (and (frame-live-p joaot/browse-frame)
         buffer
         (string-match "^\\*Help\\*$" (buffer-name buffer)) ;; or some
other predicate
         )))

(defun joaot/browse-buffer-in-special-frame (buffer alist)
  (set-window-buffer (frame-selected-window joaot/browse-frame) buffer))

(defadvice switch-to-buffer (around joaot/browse-buffer-maybe activate)
  (if (joaot/browse-buffer-p buffer-or-name nil)
      (let ((display-buffer-alist `(("" .
(joaot/browse-buffer-in-special-frame . nil)))))
        (display-buffer buffer-or-name))
    ad-do-it))



  reply	other threads:[~2013-04-12 13:13 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <5167D3B7.2080408@gmx.at>
2013-04-12 12:12 ` frames dedicated to buffers, or, always see specific buffers in a specific frame João Távora
2013-04-12 13:13   ` João Távora [this message]
2013-04-12 14:15   ` martin rudalics
     [not found]     ` <CALDnm50Q=eNA6rgUS-DQD2RLuE=kyizGpYWyENVU=2Py+-MTig@mail.gmail.com>
2013-04-14 18:42       ` João Távora
2013-04-15  7:11         ` martin rudalics
2013-04-12 16:45   ` Stefan Monnier
2013-04-13  8:01     ` martin rudalics
2013-04-14 18:18     ` João Távora

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='CALDnm50covgwrT=vFgumw4vfCz-pBn6=3HgEm34PmZ_c7pDRLA@mail.gmail.com' \
    --to=joaotavora@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=help-gnu-emacs@gnu.org \
    --cc=rudalics@gmx.at \
    /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).