-;;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+;;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
;;; Free Software Foundation, Inc.
;; Author: Ted Zlatanov <tzz@lifelogs.com>
;;; Free Software Foundation, Inc.
;; Author: Ted Zlatanov <tzz@lifelogs.com>
"List of registry marks and their options.
`gnus-registry-mark-article' will offer symbols from this list
"List of registry marks and their options.
`gnus-registry-mark-article' will offer symbols from this list
Each entry must have a character to be useful for summary mode
line display and for keyboard shortcuts.
Each entry must have a character to be useful for summary mode
line display and for keyboard shortcuts.
'("delayed$" "drafts$" "queue$" "INBOX$")
"List of groups that gnus-registry-split-fancy-with-parent won't return.
The group names are matched, they don't have to be fully
'("delayed$" "drafts$" "queue$" "INBOX$")
"List of groups that gnus-registry-split-fancy-with-parent won't return.
The group names are matched, they don't have to be fully
(if gnus-save-startup-file-via-temp-buffer
(let ((coding-system-for-write gnus-ding-file-coding-system)
(standard-output (current-buffer)))
(if gnus-save-startup-file-via-temp-buffer
(let ((coding-system-for-write gnus-ding-file-coding-system)
(standard-output (current-buffer)))
t "gnus registry startup file" 'gnus-registry-alist))
;; These bindings will mislead the current buffer
t "gnus registry startup file" 'gnus-registry-alist))
;; These bindings will mislead the current buffer
(when gnus-registry-clean-empty
(gnus-registry-clean-empty-function))
;; now trim and clean text properties from the registry appropriately
(when gnus-registry-clean-empty
(gnus-registry-clean-empty-function))
;; now trim and clean text properties from the registry appropriately
(defun gnus-registry-trim (alist)
"Trim alist to size, using gnus-registry-max-entries.
Any entries with extra data (marks, currently) are left alone."
(defun gnus-registry-trim (alist)
"Trim alist to size, using gnus-registry-max-entries.
Any entries with extra data (marks, currently) are left alone."
alist ; just return the alist
;; else, when given max-entries, trim the alist
(let* ((timehash (make-hash-table
alist ; just return the alist
;; else, when given max-entries, trim the alist
(let* ((timehash (make-hash-table
'(0 0 0))))
(time-less-p t1 t2))))
;; we use the return value of this setq, which is the trimmed alist
(setq alist (append precious-list
(nthcdr trim-length junk-list))))))
'(0 0 0))))
(time-less-p t1 t2))))
;; we use the return value of this setq, which is the trimmed alist
(setq alist (append precious-list
(nthcdr trim-length junk-list))))))
(defun gnus-registry-action (action data-header from &optional to method)
(let* ((id (mail-header-id data-header))
(subject (gnus-string-remove-all-properties
(gnus-registry-simplify-subject
(mail-header-subject data-header))))
(defun gnus-registry-action (action data-header from &optional to method)
(let* ((id (mail-header-id data-header))
(subject (gnus-string-remove-all-properties
(gnus-registry-simplify-subject
(mail-header-subject data-header))))
(mail-header-from data-header)))
(from (gnus-group-guess-full-name-from-command-method from))
(to (if to (gnus-group-guess-full-name-from-command-method to) nil))
(mail-header-from data-header)))
(from (gnus-group-guess-full-name-from-command-method from))
(to (if to (gnus-group-guess-full-name-from-command-method to) nil))
(let* ((refstr (or (message-fetch-field "references") "")) ; guaranteed
(reply-to (message-fetch-field "in-reply-to")) ; may be nil
;; now, if reply-to is valid, append it to the References
(let* ((refstr (or (message-fetch-field "references") "")) ; guaranteed
(reply-to (message-fetch-field "in-reply-to")) ; may be nil
;; now, if reply-to is valid, append it to the References
(concat refstr " " reply-to)
refstr))
;; these may not be used, but the code is cleaner having them up here
(concat refstr " " reply-to)
refstr))
;; these may not be used, but the code is cleaner having them up here
;; else: there were no matches, now try the extra tracking by sender
((and (gnus-registry-track-sender-p)
sender
;; else: there were no matches, now try the extra tracking by sender
((and (gnus-registry-track-sender-p)
sender
;; else: there were no matches, now try the extra tracking by subject
((and (gnus-registry-track-subject-p)
subject
;; else: there were no matches, now try the extra tracking by subject
((and (gnus-registry-track-subject-p)
subject
(unless (member gnus-newsgroup-name (gnus-registry-fetch-groups id))
(gnus-message 9 "Registry: Registering article %d with group %s"
article gnus-newsgroup-name)
(unless (member gnus-newsgroup-name (gnus-registry-fetch-groups id))
(gnus-message 9 "Registry: Registering article %d with group %s"
article gnus-newsgroup-name)
gnus-newsgroup-name
(gnus-registry-fetch-simplified-message-subject-fast article)
(gnus-registry-fetch-sender-fast article)))))))
gnus-newsgroup-name
(gnus-registry-fetch-simplified-message-subject-fast article)
(gnus-registry-fetch-sender-fast article)))))))
"%s the %s mark over process-marked ARTICLES."
(upcase-initials variant-name)
mark)
;; interactive definition
"%s the %s mark over process-marked ARTICLES."
(upcase-initials variant-name)
mark)
;; interactive definition
;; all this just to get the mark, I must be doing it wrong
(intern ,(symbol-name mark))
articles ,remove t)
(gnus-message
;; all this just to get the mark, I must be doing it wrong
(intern ,(symbol-name mark))
articles ,remove t)
(gnus-message
"Applying mark %s to %d articles"
,(symbol-name mark) (length articles))
(dolist (article articles)
"Applying mark %s to %d articles"
,(symbol-name mark) (length articles))
(dolist (article articles)
(push (vector (format "%s %s"
(upcase-initials variant-name)
(symbol-name mark))
(intern function-name) t)
gnus-registry-misc-menus)
(gnus-message
(push (vector (format "%s %s"
(upcase-initials variant-name)
(symbol-name mark))
(intern function-name) t)
gnus-registry-misc-menus)
(gnus-message
;;; 'gnus-registry-user-format-function-M)
(defun gnus-registry-user-format-function-M (headers)
(let* ((id (mail-header-message-id headers))
(marks (when id (gnus-registry-fetch-extra-marks id))))
(apply 'concat (mapcar (lambda(mark)
;;; 'gnus-registry-user-format-function-M)
(defun gnus-registry-user-format-function-M (headers)
(let* ((id (mail-header-message-id headers))
(marks (when id (gnus-registry-fetch-extra-marks id))))
(apply 'concat (mapcar (lambda(mark)
(gnus-message 1 "%s mark %s with message ID %s, resulting in %S"
(if remove "Removing" "Adding")
mark id new-marks))
(gnus-message 1 "%s mark %s with message ID %s, resulting in %S"
(if remove "Removing" "Adding")
mark id new-marks))
"Put a specific entry in the extras field of the registry entry for id."
(let* ((extra (gnus-registry-fetch-extra id))
;; all the entries except the one for `key'
"Put a specific entry in the extras field of the registry entry for id."
(let* ((extra (gnus-registry-fetch-extra id))
;; all the entries except the one for `key'