+2006-10-16 Teodor Zlatanov <tzz@lifelogs.com>
+
+ * gnus-registry.el (gnus-registry-wash-for-keywords)
+ (gnus-registry-find-keywords): new functions to allow easy searching of
+ articles that are in the registry
+
2006-10-16 Teodor Zlatanov <tzz@lifelogs.com>
* spam.el (spam-check-BBDB, spam-enter-ham-BBDB, spam-parse-list): use
(setq res nil))))
res))
+(defun gnus-registry-wash-for-keywords (&optional force)
+ (interactive)
+ (let ((id (gnus-registry-fetch-message-id-fast gnus-current-article))
+ words)
+ (if (or (not (gnus-registry-fetch-extra id 'keywords))
+ force)
+ (save-excursion
+ (set-buffer gnus-article-buffer)
+ (let (words)
+ (article-goto-body)
+ (save-window-excursion
+ (save-restriction
+ (narrow-to-region (point) (point-max))
+ (with-syntax-table gnus-adaptive-word-syntax-table
+ (while (re-search-forward "\\b\\w+\\b" nil t)
+ (setq word (gnus-registry-remove-alist-text-properties
+ (downcase (buffer-substring
+ (match-beginning 0) (match-end 0)))))
+ (if (> (length word) 3)
+ (push word words))))))
+ (gnus-registry-store-extra-entry id 'keywords words))))))
+
+(defun gnus-registry-find-keywords (keyword)
+ (interactive "skeyword: ")
+ (let (articles)
+ (maphash
+ (lambda (key value)
+ (when (gnus-registry-grep-in-list
+ keyword
+ (cdr (gnus-registry-fetch-extra key 'keywords)))
+ (push key articles)))
+ gnus-registry-hashtb)
+ articles))
+
(defun gnus-registry-register-message-ids ()
"Register the Message-ID of every article in the group"
(unless (gnus-parameter-registry-ignore gnus-newsgroup-name)