>>>>> "Jack" == Jack Vinson <[EMAIL PROTECTED]> writes:

    Jack> With (at least) emacs 19.28 there is a special variable that
    Jack> can be set which allows a buffer to be displayed in a
    Jack> separate frame when emacs attempts to display that buffer.
    Jack> Here are the docs for special-display-buffer-name.  (It does
    Jack> work, I just checked.)

I've posted this before, but...

But it does not work with an off-the-shelf copy of BBDB, since BBDB's
calls to get-buffer-window only check if the buffer is displayed in
the current frame.  The BBDB sources could be (trivially) changed (in
lots of spots), but I use the following advice (more stuff below the
advice):

(defvar mms-get-buffer-window-broken-packages
  (list bbdb-buffer-name)
  "*List of buffer names which get-buffer-window is forced to search
for in other frames..")

(require 'advice)
(defadvice get-buffer-window (around mms-get-buffer-window act)
  (if (member
       (let ((b (ad-get-arg 0))) (if (bufferp b) (buffer-name b) b))
       mms-get-buffer-window-broken-packages)
      (ad-set-args 1 '(t)))
  ad-do-it)
(ad-activate 'get-buffer-window)

Then I set up bbdb-display and add bbdb-buffer-name to
special-display-buffer-names (note that "add-item" is not a standard
emacs function):

(cond (window-system
       (require 'bbdb-display)
       (add-item 'special-display-buffer-names bbdb-buffer-name)))

Then I fire up an initial BBDB frame...

(let ((bbdb-electric-p nil)
      (special-display-frame-alist '((name . "BBDB")
                                     (unsplittable . t)
                                     (menu-bar-lines . 0)
                                     (left . -155)
                                     (top . 0)
                                     (width . 55)
                                     (height . 10))))
  (bbdb "." nil))

Hope that helps someone...

peace & happiness,
martin

Reply via email to