On , June 11 2000 23:06:26, Andreas Fuchs wrote:
[...]
> So, what exactly makes bbdb think there is not enough room in the
> frame? My Gnus frame is 147x68 characters, so I think that should be
> enough (messages being only ~72 chars wide, filled).
I had a look at the source and well Gnus doesn't care about
the value of bbdb-use-pop-up.  

> I would be grateful if you could point me in the right direction.
Well I made some changes and heres the patch against the
current cvs version of bbdb.   It would be great if you
have time to test it.

Robert.

Index: bbdb-gnus.el
===================================================================
RCS file: /cvsroot/bbdb/bbdb/lisp/bbdb-gnus.el,v
retrieving revision 1.66
diff -c -r1.66 bbdb-gnus.el
*** bbdb-gnus.el        2000/04/13 00:18:15     1.66
--- bbdb-gnus.el        2000/06/14 14:57:07
***************
*** 31,38 ****
  or modifying it as necessary.  A record will be created if 
  bbdb/news-auto-create-p is non-nil, or if OFFER-TO-CREATE is true and
  the user confirms the creation."
-   (if bbdb-use-pop-up
-       (bbdb/gnus-pop-up-bbdb-buffer offer-to-create)
      (set-buffer gnus-article-buffer)
      (save-restriction
        (widen)
--- 31,36 ----
***************
*** 54,60 ****
                                        (or (bbdb-invoke-hook-for-value
                                             bbdb/news-auto-create-p)
                                            offer-to-create)
!                                       offer-to-create))))))
  
  ;;;###autoload
  (defun bbdb/gnus-annotate-sender (string &optional replace)
--- 52,58 ----
                                        (or (bbdb-invoke-hook-for-value
                                             bbdb/news-auto-create-p)
                                            offer-to-create)
!                                       offer-to-create)))))
  
  ;;;###autoload
  (defun bbdb/gnus-annotate-sender (string &optional replace)
***************
*** 94,130 ****
    "Make the *BBDB* buffer be displayed along with the GNUS windows,
  displaying the record corresponding to the sender of the current message."
    (let ((bbdb-gag-messages t)
!       (bbdb-use-pop-up nil)
        (bbdb-electric-p nil))
!     (let ((record (bbdb/gnus-update-record offer-to-create))
!         (bbdb-elided-display (bbdb-pop-up-elided-display))
!         (b (current-buffer)))
!       ;; display the bbdb buffer iff there is a record for this article.
!       (cond (record
!            (bbdb-pop-up-bbdb-buffer
!             (function (lambda (w)
!                         (let ((b (current-buffer)))
!                           (set-buffer (window-buffer w))
!                           (prog1 (or (eq major-mode 'gnus-Article-mode)
!                                      (eq major-mode 'gnus-article-mode))
!                                  (set-buffer b))))))
!            (bbdb-display-records (list record)))
!           (t
!            (or bbdb-inside-electric-display
!                (not (get-buffer-window bbdb-buffer-name))
!                (let (w)
!                  (delete-other-windows)
!                  (if (assq 'article gnus-window-configuration) ; 3.15+
!                      (gnus-configure-windows 'article)
!                    (gnus-configure-windows 'SelectArticle))
!                  (if (setq w (get-buffer-window
!                               (if (boundp 'gnus-summary-buffer)
!                                   gnus-summary-buffer
!                                 gnus-Subject-buffer)))
!                      (select-window w))
!                  ))))
!       (set-buffer b)
!       record)))
  
  ;;
  ;; Announcing BBDB entries in the summary buffer
--- 92,129 ----
    "Make the *BBDB* buffer be displayed along with the GNUS windows,
  displaying the record corresponding to the sender of the current message."
    (let ((bbdb-gag-messages t)
!       (record (bbdb/gnus-update-record offer-to-create))
        (bbdb-electric-p nil))
!     
!     (if bbdb-use-pop-up
!       (let ((bbdb-elided-display (bbdb-pop-up-elided-display))
!             (b (current-buffer)))
!         ;; display the bbdb buffer iff there is a record for this article.
!         (cond (record
!                (bbdb-pop-up-bbdb-buffer
!                 (function (lambda (w)
!                             (let ((b (current-buffer)))
!                               (set-buffer (window-buffer w))
!                               (prog1 (or (eq major-mode 'gnus-Article-mode)
!                                          (eq major-mode 'gnus-article-mode))
!                                 (set-buffer b)))))))
!               (t
!                (or bbdb-inside-electric-display
!                    (not (get-buffer-window bbdb-buffer-name))
!                    (let (w)
!                      (delete-other-windows)
!                      (if (assq 'article gnus-window-configuration) ; 3.15+
!                          (gnus-configure-windows 'article)
!                        (gnus-configure-windows 'SelectArticle))
!                      (if (setq w (get-buffer-window
!                                   (if (boundp 'gnus-summary-buffer)
!                                       gnus-summary-buffer
!                                     gnus-Subject-buffer)))
!                          (select-window w))
!                      ))))
!         (set-buffer b)))
!     (if record (bbdb-display-records (list record)))
!     record))
  
  ;;
  ;; Announcing BBDB entries in the summary buffer
***************
*** 459,472 ****
    "Call this function to hook BBDB into GNUS."
    (setq gnus-optional-headers 'bbdb/gnus-lines-and-from)
    (cond ((boundp 'gnus-Article-prepare-hook) ; 3.14 or lower
!        (add-hook 'gnus-Article-prepare-hook 'bbdb/gnus-update-record)
         (add-hook 'gnus-Save-newsrc-hook 'bbdb-offer-save)
         (define-key gnus-Subject-mode-map ":" 'bbdb/gnus-show-sender)
         (define-key gnus-Subject-mode-map [(control :)] 
           'bbdb/gnus-summary-show-all-recipients)
         (define-key gnus-Subject-mode-map ";" 'bbdb/gnus-edit-notes))
        (t                                   ; 3.15 or higher
!        (add-hook 'gnus-article-prepare-hook 'bbdb/gnus-update-record)
         (add-hook 'gnus-save-newsrc-hook 'bbdb-offer-save)
         (define-key gnus-summary-mode-map ":" 'bbdb/gnus-show-sender)
         (define-key gnus-summary-mode-map ";" 'bbdb/gnus-edit-notes)))
--- 458,471 ----
    "Call this function to hook BBDB into GNUS."
    (setq gnus-optional-headers 'bbdb/gnus-lines-and-from)
    (cond ((boundp 'gnus-Article-prepare-hook) ; 3.14 or lower
!        (add-hook 'gnus-Article-prepare-hook 'bbdb/gnus-pop-up-bbdb-buffer)
         (add-hook 'gnus-Save-newsrc-hook 'bbdb-offer-save)
         (define-key gnus-Subject-mode-map ":" 'bbdb/gnus-show-sender)
         (define-key gnus-Subject-mode-map [(control :)] 
           'bbdb/gnus-summary-show-all-recipients)
         (define-key gnus-Subject-mode-map ";" 'bbdb/gnus-edit-notes))
        (t                                   ; 3.15 or higher
!        (add-hook 'gnus-article-prepare-hook 'bbdb/gnus-pop-up-bbdb-buffer)
         (add-hook 'gnus-save-newsrc-hook 'bbdb-offer-save)
         (define-key gnus-summary-mode-map ":" 'bbdb/gnus-show-sender)
         (define-key gnus-summary-mode-map ";" 'bbdb/gnus-edit-notes)))


_______________________________________________
bbdb-info mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/mailman/listinfo/bbdb-info

Reply via email to