all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Matthias Meulien <meulien@club.lemonde.fr>
Subject: Re: dedicated frames - not quite special-display
Date: 18 Sep 2002 20:46:32 +0200	[thread overview]
Message-ID: <m2vg5316gn.fsf@clarinde.localdomain> (raw)
In-Reply-To: u1y7rwf0r.fsf@terrapin.northbound-train.com

The following works for me. All buffer with a name matching
`special-special-buffer-regexp' are displayed in a common frame. 

(setq special-special-buffer-regexp "REGEXP")

(defun special-special-windowp (window)
  "Returns nil if and only if WINDOW displays a buffer whose name
doesn't match `special-special-buffer-regexp'."
  (let ((name (buffer-name (window-buffer window))))
    (string-match special-special-buffer-regexp name)))

(defun special-special-display-function (buffer &optional args)
  "Display BUFFER in its own frame, reusing an existing window
displaying a buffer whose name match `special-special-buffer-regexp'
if any."
  (let ((window (get-window-with-predicate 'special-special-windowp
					   nil t)))
    (if window
	(progn 
	  (set-window-dedicated-p window nil)
	  (select-window window)
	  (switch-to-buffer buffer)
	  (set-window-dedicated-p window t))
      (special-display-popup-frame buffer args))))

(let ((list `(,special-special-buffer-regexp
	      special-special-display-function)))
  (add-to-list 'special-display-regexps list))
-- 
Matthias

      parent reply	other threads:[~2002-09-18 18:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-18 14:25 dedicated frames - not quite special-display Joe Casadonte
2002-09-18 14:56 ` Michael Slass
2002-09-18 15:16   ` Joe Casadonte
2002-09-18 15:57   ` Stefan Monnier <foo@acm.com>
2002-09-18 18:54     ` Kevin Rodgers
2002-09-18 18:06   ` FRC
2002-09-18 18:46 ` Matthias Meulien [this message]

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

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

  git send-email \
    --in-reply-to=m2vg5316gn.fsf@clarinde.localdomain \
    --to=meulien@club.lemonde.fr \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.