Mats Lidell <[EMAIL PROTECTED]> writes:

> In gnus you must find the article-buffer so that you are looking at
> the right spot. This is my go at it.

I was looking for the same thing, and tried the following:


(add-hook 'bbdb-canonicalize-net-hook 'my-handle-gmane-address)

(defun my-handle-gmane-address (net)
  (let ((buf (get-buffer gnus-article-buffer)))
    (if buf
        (save-excursion
          (goto-char (point-min))
          (if (and (string-match "@public.gmane.org" net)
                   (re-search-forward (format "[^:,]*<%s>" net) (point-max) t))
              (let ((ad (mail-extract-address-components (match-string 0)))
                    realnet)
                (message "Found `%S' in headers! Doing realname search!" ad)
                (and (car ad)
                     (setq realnet (bbdb-search-simple (car ad) nil))
                     (setq realnet (car (bbdb-record-net realnet)))
                     (setq net realnet))))
          net))
    net))

But I just get this error:

bbdb-canonicalize-address: Invalid function: (my-handle-gmane-address)

I was hoping that someone could help me get this to work. A backtrace
is attached, in case it would be helpful.

Debugger entered--Lisp error: (invalid-function (my-handle-gmane-address))
  (my-handle-gmane-address)("[EMAIL PROTECTED]")
  bbdb-canonicalize-address("[EMAIL PROTECTED]")
  bbdb-annotate-message-sender(("Joe Corneli" "[EMAIL PROTECTED]") t nil 
bbdb-prompt-for-create)
  byte-code("Ã=ÂÃ Ã\nÂÃ$CÂÂÂÃ=ÂÂÂÃÃÂ      ÂA@)!ÃQÃÃ
à !\"  @[EMAIL PROTECTED]"#$AÂ$ÂQÂrÃÃ\"##*Â\"B\" 
AÂ 
Â;\"Â.%&T&'ÂÃÂ(ÂÃÂ)Ã=ÂÃÂ&ÃÂÃUÂÃÂÃÃÂ&*$+ÃÃÂ!ÂÃÂÃÃÂ+\"ÂÂÂÃÃ+!Â)ÃÃÂ!ÂÃÂÂ"
 [bbdb-update-records-mode bbdb-address offer-to-create auto-create-p x 
bbdb-case-fold-search annotating bbdb-annotate-message-sender t bbdb-prompt-for-create 
searching "^" regexp-quote "$" nil 6 string-match "" quit 5 0 format "Hit C-g to stop 
BBDB from %s.  %d of %d addresses processed." featurep xemacs bbdb-display-message 
progress message sit-for net bbdb-records record records case-fold-search matches done 
rest-of-nets hits processed-addresses bbdb-silent-running bbdb-gag-messages 
bbdb-offer-to-create addrslen mess] 6)
  bbdb-update-records(((authors "From" ("Joe Corneli" "[EMAIL PROTECTED]"))) nil nil)
  bbdb/gnus-update-records(nil)
  bbdb/gnus-pop-up-bbdb-buffer()
  run-hooks(gnus-article-prepare-hook)
  apply(run-hooks gnus-article-prepare-hook)
  gnus-run-hooks(gnus-article-prepare-hook)
  gnus-article-prepare-display()
  gnus-article-prepare(1013 nil)
  gnus-summary-display-article(1013 nil)
  gnus-summary-select-article(nil nil pseudo)
  gnus-summary-scroll-up(1)
  call-interactively(gnus-summary-scroll-up)

Reply via email to