"Roland Winkler" <wink...@gnu.org> writes:

> On Tue Apr 16 2013 Eric Abrahamsen wrote:
>> Right now, setting bbdb-mua-pop-up to 'horiz splits the *Summary* buffer
>> horizontally, not the *Article* buffer! Perhaps because point is in the
>> *Summary* buffer when *BBDB* is popped? My *Summary* buffer takes up
>> much less of the frame than *Article*, so I would have thought
>> `bbdb-pop-up-window' would have identified that as the proper candidate
>> for splitting.
>> 
>> Anyhow, I see that `bbdb-pop-up-window' doesn't do anything mua-specific
>> (but looking at the mailing-list that appears to have been intentional).
>
> The horizontal splitting is controlled by the arg HORIZ-P of
> bbdb-pop-up-window. This is a predicate generated by calling
> bbdb-mua-window-p. Essentially, this says that BBDB will split *a*
> window used by your MUA that is big enough for splitting. (The
> concept used here by bbdb v3 is the same used by v2.) 
>
> You could try instead something like (untested)
>
> (defun bbdb-mua-window-p ()
>   "Return lambda function matching the selected MUA window.
> This return value can be used as arg HORIZ-P of `bbdb-display-records'."
>   `(lambda (window) (eq window ,(selected-window))))

Whoo, that was confusing! This works for gnus:


(defun bbdb-mua-window-p ()
  "Return lambda function matching the selected MUA window.
This return value can be used as arg HORIZ-P of `bbdb-display-records'."
  `(lambda (window) (or
                     (eq (window-buffer window)
                         (get-buffer ,gnus-article-buffer))
                     (eq window ,(selected-window)))))

Obviously this clobbers whatever was in bbdb-mua-mode-alist, and while I
was hoping the second `or' clause would allow it to work for message
mode as well, message mode still pops up with a vertical split, at the
bottom. But at least this works for gnus...

E


------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr
_______________________________________________
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/

Reply via email to