[Top][All Lists]

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

Re: dedicated frames - not quite special-display

From: Matthias Meulien
Subject: Re: dedicated frames - not quite special-display
Date: 18 Sep 2002 20:46:32 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

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
          (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
  (add-to-list 'special-display-regexps list))

reply via email to

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