diff options
| author | Teodor Zlatanov | 2011-05-18 22:16:26 +0000 |
|---|---|---|
| committer | Katsumi Yamaoka | 2011-05-18 22:16:26 +0000 |
| commit | 627abcddd1c45a07d58b9c0cbfd6bb62caf256a9 (patch) | |
| tree | 12e7704c45624af3056c43627ba785b0ce1df1c1 | |
| parent | 638f517cc56fad217210d90ea853d647e14b463d (diff) | |
| download | emacs-627abcddd1c45a07d58b9c0cbfd6bb62caf256a9.tar.gz emacs-627abcddd1c45a07d58b9c0cbfd6bb62caf256a9.zip | |
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.
| -rw-r--r-- | doc/misc/ChangeLog | 7 | ||||
| -rw-r--r-- | doc/misc/gnus.texi | 21 | ||||
| -rw-r--r-- | lisp/gnus/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/gnus/gnus-registry.el | 40 |
4 files changed, 57 insertions, 16 deletions
diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index 65dcdd80bca..917ebf0d675 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2011-05-18 Teodor Zlatanov <tzz@lifelogs.com> | ||
| 2 | |||
| 3 | * gnus.texi (Gnus Registry Setup): Rename from "Setup". | ||
| 4 | (Store custom flags and keywords): Mention | ||
| 5 | `gnus-registry-user-format-function-M' and | ||
| 6 | `gnus-registry-user-format-function-M2'. | ||
| 7 | |||
| 1 | 2011-05-17 Paul Eggert <eggert@cs.ucla.edu> | 8 | 2011-05-17 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 9 | ||
| 3 | * texinfo.tex: Sync from gnulib, version 2011-05-11.16. | 10 | * texinfo.tex: Sync from gnulib, version 2011-05-11.16. |
diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi index 931a9bedb39..a6b79237f08 100644 --- a/doc/misc/gnus.texi +++ b/doc/misc/gnus.texi | |||
| @@ -25906,15 +25906,15 @@ of all messages matching a particular set of criteria. | |||
| 25906 | @end enumerate | 25906 | @end enumerate |
| 25907 | 25907 | ||
| 25908 | @menu | 25908 | @menu |
| 25909 | * Setup:: | 25909 | * Gnus Registry Setup:: |
| 25910 | * Fancy splitting to parent:: | 25910 | * Fancy splitting to parent:: |
| 25911 | * Registry Article Refer Method:: | 25911 | * Registry Article Refer Method:: |
| 25912 | * Store custom flags and keywords:: | 25912 | * Store custom flags and keywords:: |
| 25913 | * Store arbitrary data:: | 25913 | * Store arbitrary data:: |
| 25914 | @end menu | 25914 | @end menu |
| 25915 | 25915 | ||
| 25916 | @node Setup | 25916 | @node Gnus Registry Setup |
| 25917 | @subsection Setup | 25917 | @subsection Gnus Registry Setup |
| 25918 | 25918 | ||
| 25919 | Fortunately, setting up the Gnus registry is pretty easy: | 25919 | Fortunately, setting up the Gnus registry is pretty easy: |
| 25920 | 25920 | ||
| @@ -26086,6 +26086,21 @@ Call this function to mark an article with a custom registry mark. It | |||
| 26086 | will offer the available marks for completion. | 26086 | will offer the available marks for completion. |
| 26087 | @end defun | 26087 | @end defun |
| 26088 | 26088 | ||
| 26089 | You can use @code{defalias} to install a summary line formatting | ||
| 26090 | function that will show the registry marks. There are two flavors of | ||
| 26091 | this function, either showing the marks as single characters, using | ||
| 26092 | their @code{:char} property, or showing the marks as full strings. | ||
| 26093 | |||
| 26094 | @lisp | ||
| 26095 | ;; show the marks as single characters (see the :char property in | ||
| 26096 | ;; `gnus-registry-marks'): | ||
| 26097 | ;; (defalias 'gnus-user-format-function-M 'gnus-registry-user-format-function-M) | ||
| 26098 | |||
| 26099 | ;; show the marks by name (see `gnus-registry-marks'): | ||
| 26100 | ;; (defalias 'gnus-user-format-function-M 'gnus-registry-user-format-function-M2) | ||
| 26101 | @end lisp | ||
| 26102 | |||
| 26103 | |||
| 26089 | @node Store arbitrary data | 26104 | @node Store arbitrary data |
| 26090 | @subsection Store arbitrary data | 26105 | @subsection Store arbitrary data |
| 26091 | 26106 | ||
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index bb70816f298..66f30f03eff 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -1,5 +1,10 @@ | |||
| 1 | 2011-05-18 Teodor Zlatanov <tzz@lifelogs.com> | 1 | 2011-05-18 Teodor Zlatanov <tzz@lifelogs.com> |
| 2 | 2 | ||
| 3 | * gnus-registry.el (gnus-registry-user-format-function-M): | ||
| 4 | Use `mapconcat'. | ||
| 5 | (gnus-registry-user-format-function-M2): Use to see the full text of | ||
| 6 | the marks. Make "," the mark text separator. | ||
| 7 | |||
| 3 | * nntp.el (nntp-send-authinfo): Use the "force" token for NNTP | 8 | * nntp.el (nntp-send-authinfo): Use the "force" token for NNTP |
| 4 | authentication with auth-source. | 9 | authentication with auth-source. |
| 5 | 10 | ||
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 @@ | |||
| 57 | ;; You should also consider using the nnregistry backend to look up | 57 | ;; You should also consider using the nnregistry backend to look up |
| 58 | ;; articles. See the Gnus manual for more information. | 58 | ;; articles. See the Gnus manual for more information. |
| 59 | 59 | ||
| 60 | ;; Finally, you can put %uM in your summary line format to show the | ||
| 61 | ;; registry marks if you do this: | ||
| 62 | |||
| 63 | ;; show the marks as single characters (see the :char property in | ||
| 64 | ;; `gnus-registry-marks'): | ||
| 65 | ;; (defalias 'gnus-user-format-function-M 'gnus-registry-user-format-function-M) | ||
| 66 | |||
| 67 | ;; show the marks by name (see `gnus-registry-marks'): | ||
| 68 | ;; (defalias 'gnus-user-format-function-M 'gnus-registry-user-format-function-M2) | ||
| 69 | |||
| 60 | ;; TODO: | 70 | ;; TODO: |
| 61 | 71 | ||
| 62 | ;; - get the correct group on spool actions | 72 | ;; - get the correct group on spool actions |
| @@ -887,22 +897,26 @@ Uses `gnus-registry-marks' to find what shortcuts to install." | |||
| 887 | nil | 897 | nil |
| 888 | (cons "Registry Marks" gnus-registry-misc-menus)))))) | 898 | (cons "Registry Marks" gnus-registry-misc-menus)))))) |
| 889 | 899 | ||
| 890 | ;;; use like this: | 900 | ;; use like this: |
| 891 | ;;; (defalias 'gnus-user-format-function-M | 901 | ;; (defalias 'gnus-user-format-function-M 'gnus-registry-user-format-function-M) |
| 892 | ;;; 'gnus-registry-user-format-function-M) | ||
| 893 | (defun gnus-registry-user-format-function-M (headers) | 902 | (defun gnus-registry-user-format-function-M (headers) |
| 903 | "Show the marks for an article by the :char property" | ||
| 904 | (let* ((id (mail-header-message-id headers)) | ||
| 905 | (marks (when id (gnus-registry-get-id-key id 'mark)))) | ||
| 906 | (mapconcat (lambda (mark) | ||
| 907 | (plist-get | ||
| 908 | (cdr-safe | ||
| 909 | (assoc mark gnus-registry-marks)) | ||
| 910 | :char)) | ||
| 911 | marks ""))) | ||
| 912 | |||
| 913 | ;; use like this: | ||
| 914 | ;; (defalias 'gnus-user-format-function-M 'gnus-registry-user-format-function-M2) | ||
| 915 | (defun gnus-registry-user-format-function-M2 (headers) | ||
| 916 | "Show the marks for an article by name" | ||
| 894 | (let* ((id (mail-header-message-id headers)) | 917 | (let* ((id (mail-header-message-id headers)) |
| 895 | (marks (when id (gnus-registry-get-id-key id 'mark)))) | 918 | (marks (when id (gnus-registry-get-id-key id 'mark)))) |
| 896 | (apply 'concat (mapcar (lambda (mark) | 919 | (mapconcat (lambda (mark) (symbol-name mark)) marks ","))) |
| 897 | (let ((c | ||
| 898 | (plist-get | ||
| 899 | (cdr-safe | ||
| 900 | (assoc mark gnus-registry-marks)) | ||
| 901 | :char))) | ||
| 902 | (if c | ||
| 903 | (list c) | ||
| 904 | nil))) | ||
| 905 | marks)))) | ||
| 906 | 920 | ||
| 907 | (defun gnus-registry-read-mark () | 921 | (defun gnus-registry-read-mark () |
| 908 | "Read a mark name from the user with completion." | 922 | "Read a mark name from the user with completion." |