diff options
author | Teodor Zlatanov <tzz@lifelogs.com> | 2011-05-18 22:16:26 +0000 |
---|---|---|
committer | Katsumi Yamaoka <yamaoka@jpl.org> | 2011-05-18 22:16:26 +0000 |
commit | 627abcddd1c45a07d58b9c0cbfd6bb62caf256a9 (patch) | |
tree | 12e7704c45624af3056c43627ba785b0ce1df1c1 /lisp/gnus/gnus-registry.el | |
parent | 638f517cc56fad217210d90ea853d647e14b463d (diff) | |
download | emacs-627abcddd1c45a07d58b9c0cbfd6bb62caf256a9.tar.gz |
gnus.texi (Gnus Registry Setup): Rename from "Setup".
(Store custom flags and keywords): Mention `gnus-registry-user-format-function-M' and `gnus-registry-user-format-function-M2'.
gnus-registry.el (gnus-registry-user-format-function-M): Use `mapconcat'.
(gnus-registry-user-format-function-M2): Use to see the full text of the marks. Make "," the mark text separator.
Diffstat (limited to 'lisp/gnus/gnus-registry.el')
-rw-r--r-- | lisp/gnus/gnus-registry.el | 40 |
1 files changed, 27 insertions, 13 deletions
diff --git a/lisp/gnus/gnus-registry.el b/lisp/gnus/gnus-registry.el index 25d84b11d41..e0efbaf4f30 100644 --- a/lisp/gnus/gnus-registry.el +++ b/lisp/gnus/gnus-registry.el @@ -57,6 +57,16 @@ ;; You should also consider using the nnregistry backend to look up ;; articles. See the Gnus manual for more information. +;; Finally, you can put %uM in your summary line format to show the +;; registry marks if you do this: + +;; show the marks as single characters (see the :char property in +;; `gnus-registry-marks'): +;; (defalias 'gnus-user-format-function-M 'gnus-registry-user-format-function-M) + +;; show the marks by name (see `gnus-registry-marks'): +;; (defalias 'gnus-user-format-function-M 'gnus-registry-user-format-function-M2) + ;; TODO: ;; - get the correct group on spool actions @@ -887,22 +897,26 @@ Uses `gnus-registry-marks' to find what shortcuts to install." nil (cons "Registry Marks" gnus-registry-misc-menus)))))) -;;; use like this: -;;; (defalias 'gnus-user-format-function-M -;;; 'gnus-registry-user-format-function-M) +;; use like this: +;; (defalias 'gnus-user-format-function-M 'gnus-registry-user-format-function-M) (defun gnus-registry-user-format-function-M (headers) + "Show the marks for an article by the :char property" + (let* ((id (mail-header-message-id headers)) + (marks (when id (gnus-registry-get-id-key id 'mark)))) + (mapconcat (lambda (mark) + (plist-get + (cdr-safe + (assoc mark gnus-registry-marks)) + :char)) + marks ""))) + +;; use like this: +;; (defalias 'gnus-user-format-function-M 'gnus-registry-user-format-function-M2) +(defun gnus-registry-user-format-function-M2 (headers) + "Show the marks for an article by name" (let* ((id (mail-header-message-id headers)) (marks (when id (gnus-registry-get-id-key id 'mark)))) - (apply 'concat (mapcar (lambda (mark) - (let ((c - (plist-get - (cdr-safe - (assoc mark gnus-registry-marks)) - :char))) - (if c - (list c) - nil))) - marks)))) + (mapconcat (lambda (mark) (symbol-name mark)) marks ","))) (defun gnus-registry-read-mark () "Read a mark name from the user with completion." |