On Fri, 02 Jul 2004, Dave Goldberg said: >>>>>> On Fri, 02 Jul 2004 22:07:30 +0100, Nix <[EMAIL PROTECTED]> said: >> There is none, as far as I can tell: the header structure used doesn't >> store all headers, only some of them, and there's no way to get at the >> other headers without laying out the article afresh (using >> `gnus-request-article' in a temporary buffer). > > I don't think you need to do that. Gnus stores the raw article in > gnus-original-article-buffer.
Ah, wonderful. I didn't know that existed; it'll simplify a number of things. Have a much better patch than the last one, then: 2004-07-03 Nix <[EMAIL PROTECTED]> Dave Goldberg <[EMAIL PROTECTED]> * lisp/bbdb-hooks.el (bbdb-extract-field-value): Use the untreated buffer for header extraction under Gnus. Index: bbdb/lisp/bbdb-hooks.el =================================================================== RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/bbdb/lisp/bbdb-hooks.el,v retrieving revision 1.5 diff -u -r1.5 bbdb-hooks.el --- bbdb/lisp/bbdb-hooks.el 2002/02/12 22:56:38 1.5 +++ bbdb/lisp/bbdb-hooks.el 2004/07/03 13:10:25 @@ -118,24 +117,29 @@ ;; we can't special-case VM here to use its cache, because the cache has ;; divided real-names from addresses; the actual From: and Subject: fields ;; exist only in the message. - (setq field-name (concat (regexp-quote field-name) "[ \t]*:[ \t]*")) - (let ((case-fold-search t) - done) - (while (not (or done - (looking-at "\n") ; we're at BOL - (eobp))) - (if (looking-at field-name) - (progn - (goto-char (match-end 0)) - (setq done (buffer-substring (point) - (progn (end-of-line) (point)))) - (while (looking-at "\n[ \t]") - (setq done (concat done " " - (buffer-substring (match-end 0) - (progn (end-of-line 2) (point)))))))) - (forward-line 1)) - done)) - + (save-excursion + (if (memq major-mode + '(gnus-summary-mode gnus-article-mode gnus-tree-mode)) + (progn + (set-buffer (get-buffer gnus-original-article-buffer)) + (goto-char (point-min)))) + (setq field-name (concat (regexp-quote field-name) "[ \t]*:[ \t]*")) + (let ((case-fold-search t) + done) + (while (not (or done + (looking-at "\n") ; we're at BOL + (eobp))) + (if (looking-at field-name) + (progn + (goto-char (match-end 0)) + (setq done (buffer-substring (point) + (progn (end-of-line) (point)))) + (while (looking-at "\n[ \t]") + (setq done (concat done " " + (buffer-substring (match-end 0) + (progn (end-of-line 2) (point)))))))) + (forward-line 1)) + done))) (defcustom bbdb-ignore-most-messages-alist '() "*An alist describing which messages to automatically create BBDB -- `Some people find it difficult to accept that it is not always possible to explain things which should be explicable.' ------------------------------------------------------- This SF.Net email sponsored by Black Hat Briefings & Training. Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com _______________________________________________ [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/bbdb-info BBDB Home Page: http://bbdb.sourceforge.net/