(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.
+2011-05-18 Teodor Zlatanov <tzz@lifelogs.com>
+
+ * 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'.
+
2011-05-17 Paul Eggert <eggert@cs.ucla.edu>
* texinfo.tex: Sync from gnulib, version 2011-05-11.16.
@end enumerate
@menu
-* Setup::
+* Gnus Registry Setup::
* Fancy splitting to parent::
* Registry Article Refer Method::
* Store custom flags and keywords::
* Store arbitrary data::
@end menu
-@node Setup
-@subsection Setup
+@node Gnus Registry Setup
+@subsection Gnus Registry Setup
Fortunately, setting up the Gnus registry is pretty easy:
will offer the available marks for completion.
@end defun
+You can use @code{defalias} to install a summary line formatting
+function that will show the registry marks. There are two flavors of
+this function, either showing the marks as single characters, using
+their @code{:char} property, or showing the marks as full strings.
+
+@lisp
+;; 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)
+@end lisp
+
+
@node Store arbitrary data
@subsection Store arbitrary data
2011-05-18 Teodor Zlatanov <tzz@lifelogs.com>
+ * 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.
+
* nntp.el (nntp-send-authinfo): Use the "force" token for NNTP
authentication with auth-source.
;; 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
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."