I sent a previous piece of mail to this list about getting BBDB to
pop-up in its own frame under GNU Emacs (currently using 19.22).
Since my last mail I have come up with what I think is an excellent
scheme for doing this without making *any* changes to the current
version of BBDB.  The only problem is that it causes emacs to crash
when I complete a mail alias. :-(

Here is my "solution"...

The first "problem" to be solved is that BBDB's calls to
get-buffer-window do not use the version 19 option which tells it to
check all frames for the buffer.  I think that I should be able to use
"advice", as follows:

(require 'advice)
(defadvice get-buffer-window (before mms-get-buffer-window act)
  (ad-set-arg 1 t))
(ad-activate 'get-buffer-window)

Now, I get the *BBDB* buffer to display in a separate frame, and try
to send some mail from my "main" frame.  If I complete a mail alias
enough times (sometimes once, sometimes 20!) emacs will crash,
apparently when it is trying to do a redisplay.

A strange thing seems to occur after some completions before the
crash:  the cursor does not end up at the end of the inserted mail
address, but somewhere in the middle of the mail addresses...  Odd!

Is there anything wrong with the above "advice"?  (I'm somewhat of an
"advice" novice...)

By the way, the rest of my "solution" involves a function, which I
bind to the temp-buffer-show-function variable, which does nothing to
redisplay the "*BBDB*" buffer (calls "identity"), but calls
display-buffer or framepop-display-buffer for other buffers.  It is
nicely extensible, using an alist of
buffer-name-regular-expression/display-function pairs to figure out
which function to use...  Without any of this in place, emacs still
crashes, I think because of the "advice"...

Any suggestions?

peace & happiness,
martin

 _--_|\          Peace &             Department of Computer Science
/      \        Happiness          The Australian National University
\_.--._/<-------------------------------------------------------------------
      v      Martin Schwenke             [EMAIL PROTECTED]

Reply via email to