diff options
| author | Teodor Zlatanov | 2011-04-11 22:17:30 +0000 |
|---|---|---|
| committer | Katsumi Yamaoka | 2011-04-11 22:17:30 +0000 |
| commit | d515dc24ca9402a09a3bafb3a7c83681f921c2f0 (patch) | |
| tree | 0e3035a3f8238c7ddee6ebeb4fdc9b7c46782249 | |
| parent | e896f03ce08aef5fbd6b4d8de84f79a157f1422f (diff) | |
| download | emacs-d515dc24ca9402a09a3bafb3a7c83681f921c2f0.tar.gz emacs-d515dc24ca9402a09a3bafb3a7c83681f921c2f0.zip | |
gnus-registry.el (gnus-registry-action): Remove properties and simplify subject in `gnus-registry-handle-action'.
(gnus-registry-spool-action): Get subject and sender from message if they are not passed in.
(gnus-registry-handle-action): Remove properties and simplify subject consistently.
| -rw-r--r-- | lisp/gnus/ChangeLog | 9 | ||||
| -rw-r--r-- | lisp/gnus/gnus-registry.el | 16 |
2 files changed, 18 insertions, 7 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 7714068e49c..d84c40305a3 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -1,3 +1,12 @@ | |||
| 1 | 2011-04-11 Teodor Zlatanov <tzz@lifelogs.com> | ||
| 2 | |||
| 3 | * gnus-registry.el (gnus-registry-action): Remove properties and | ||
| 4 | simplify subject in `gnus-registry-handle-action'. | ||
| 5 | (gnus-registry-spool-action): Get subject and sender from message if | ||
| 6 | they are not passed in. | ||
| 7 | (gnus-registry-handle-action): Remove properties and simplify subject | ||
| 8 | consistently. | ||
| 9 | |||
| 1 | 2011-04-11 Stefan Monnier <monnier@iro.umontreal.ca> | 10 | 2011-04-11 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 11 | ||
| 3 | * registry.el: Require CL before using defmacro*. | 12 | * registry.el: Require CL before using defmacro*. |
diff --git a/lisp/gnus/gnus-registry.el b/lisp/gnus/gnus-registry.el index 9824fc26f16..8847dacd77c 100644 --- a/lisp/gnus/gnus-registry.el +++ b/lisp/gnus/gnus-registry.el | |||
| @@ -294,11 +294,8 @@ This is not required after changing `gnus-registry-cache-file'." | |||
| 294 | ;; article move/copy/spool/delete actions | 294 | ;; article move/copy/spool/delete actions |
| 295 | (defun gnus-registry-action (action data-header from &optional to method) | 295 | (defun gnus-registry-action (action data-header from &optional to method) |
| 296 | (let* ((id (mail-header-id data-header)) | 296 | (let* ((id (mail-header-id data-header)) |
| 297 | (subject (gnus-string-remove-all-properties | 297 | (subject (mail-header-subject data-header)) |
| 298 | (gnus-registry-simplify-subject | 298 | (sender (mail-header-from data-header)) |
| 299 | (mail-header-subject data-header)))) | ||
| 300 | (sender (gnus-string-remove-all-properties | ||
| 301 | (mail-header-from data-header))) | ||
| 302 | (from (gnus-group-guess-full-name-from-command-method from)) | 299 | (from (gnus-group-guess-full-name-from-command-method from)) |
| 303 | (to (if to (gnus-group-guess-full-name-from-command-method to) nil)) | 300 | (to (if to (gnus-group-guess-full-name-from-command-method to) nil)) |
| 304 | (to-name (if to to "the Bit Bucket"))) | 301 | (to-name (if to to "the Bit Bucket"))) |
| @@ -312,7 +309,9 @@ This is not required after changing `gnus-registry-cache-file'." | |||
| 312 | to subject sender))) | 309 | to subject sender))) |
| 313 | 310 | ||
| 314 | (defun gnus-registry-spool-action (id group &optional subject sender) | 311 | (defun gnus-registry-spool-action (id group &optional subject sender) |
| 315 | (let ((to (gnus-group-guess-full-name-from-command-method group))) | 312 | (let ((to (gnus-group-guess-full-name-from-command-method group)) |
| 313 | (subject (or subject (message-fetch-field "subject"))) | ||
| 314 | (sender (or sender (message-fetch-field "from")))) | ||
| 316 | (when (and (stringp id) (string-match "\r$" id)) | 315 | (when (and (stringp id) (string-match "\r$" id)) |
| 317 | (setq id (substring id 0 -1))) | 316 | (setq id (substring id 0 -1))) |
| 318 | (gnus-message 7 "Gnus registry: article %s spooled to %s" | 317 | (gnus-message 7 "Gnus registry: article %s spooled to %s" |
| @@ -326,7 +325,10 @@ This is not required after changing `gnus-registry-cache-file'." | |||
| 326 | "gnus-registry-handle-action %S" (list id from to subject sender)) | 325 | "gnus-registry-handle-action %S" (list id from to subject sender)) |
| 327 | (let ((db gnus-registry-db) | 326 | (let ((db gnus-registry-db) |
| 328 | ;; safe if not found | 327 | ;; safe if not found |
| 329 | (entry (gnus-registry-get-or-make-entry id))) | 328 | (entry (gnus-registry-get-or-make-entry id)) |
| 329 | (subject (gnus-string-remove-all-properties | ||
| 330 | (gnus-registry-simplify-subject subject))) | ||
| 331 | (sender (gnus-string-remove-all-properties sender))) | ||
| 330 | 332 | ||
| 331 | ;; this could be done by calling `gnus-registry-set-id-key' | 333 | ;; this could be done by calling `gnus-registry-set-id-key' |
| 332 | ;; several times but it's better to bunch the transactions | 334 | ;; several times but it's better to bunch the transactions |