diff options
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/gnus/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/gnus/gnus-registry.el | 40 |
2 files changed, 32 insertions, 13 deletions
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." |