Blog - /Personal
This is meant to solve the problem of being prompted by BBDB whenever you read an article in a Gmane buffer that uses email obfuscation. I really hate email obfuscation because of this side-effect. The following makes the problem less annoying.
For each group that has obscured email addresses, enter it, do C-M-e, and fill in:
((dummy (set (make-local-variable 'bbdb/gnus-update-records-mode) 'searching)))
I would have liked to use the following, which is simpler. The problem is that Gnus is (for some reason) unable to handle this gracefully. The variable becomes buffer-local, but no value is set. I suspect this is either a bug or a matter of sleep-deficiency on my part.
((bbdb/gnus-update-records-mode searching))
Then put the following function definition in your .emacs or .gnus, after the (require 'bbdb) statement. The default version of this BBDB function is very badly behaved, and insists on setting bbdb-update-records-mode twice.
(defun bbdb/gnus-update-records (&optional offer-to-create)
"Return the records corresponding to the current GNUS message, creating
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.
The variable `bbdb/gnus-update-records-mode' controls what actions
are performed and it might override `bbdb-update-records-mode'.
When hitting C-g once you will not be asked anymore for new people listed
in this message, but it will search only for existing records. When hitting
C-g again it will stop scanning."
(let ((bbdb-update-records-mode
(when (and (boundp 'gnus-summary-buffer)
(buffer-live-p gnus-summary-buffer))
(with-current-buffer gnus-summary-buffer
bbdb/gnus-update-records-mode)))
(bbdb/gnus-offer-to-create offer-to-create)
;; here we may distiguish between different type of messages
;; for those that have no message id we have to find something
;; else as message key.
(msg-id (bbdb/gnus-get-message-id))
records cache)
(save-excursion
(set-buffer gnus-article-buffer)
(if (and msg-id (not bbdb/gnus-offer-to-create))
(setq cache (bbdb-message-cache-lookup msg-id)))
(if cache
(setq records (if bbdb-get-only-first-address-p
(list (car cache))
cache))
(setq records (bbdb-update-records
(bbdb-get-addresses
bbdb-get-only-first-address-p
(or (if (boundp 'gnus-ignored-from-addresses)
gnus-ignored-from-addresses)
bbdb-user-mail-names)
'gnus-fetch-field)
bbdb/news-auto-create-p
offer-to-create))
(if (and bbdb-message-caching-enabled msg-id)
(bbdb-encache-message msg-id records))))
records))
A paste is available at http://paste.lisp.org/display/9883 if anyone wants to hack on it.