Discussion:
Showing for certain groups the number of emails instead of the number of unread emails?
Rainer M Krug
2014-09-12 07:13:03 UTC
Permalink
Hi

I am using the following gnus-groupline-format

,----
| (defvar gnus-user-format-function-g-prev "" "")
| (defun empty-common-prefix (left right)
| "Given `left' '(\"foo\" \"bar\" \"fie\") and `right' '(\"foo\"
| \"bar\" \"fum\"), return '(\" \" \" \" \"fum\")."
| (if (and (cdr right) ; always keep the last part of right
| (equal (car left) (car right)))
| (cons (make-string (length (car left)) ? )
| (empty-common-prefix (cdr left) (cdr right)))
| right))
| (defun gnus-user-format-function-g (arg)
| "The full group name, but if it starts with a previously seen
| prefix, empty that prefix."
| (if (equal gnus-user-format-function-g-prev gnus-tmp-group) ; line-format is updated on exiting the summary, making prev equal this
| gnus-tmp-group
| (let* ((prev (split-string-and-unquote gnus-user-format-function-g-prev "\\."))
| (this (split-string-and-unquote gnus-tmp-group "\\.")))
| (setq gnus-user-format-function-g-prev gnus-tmp-group)
| (combine-and-quote-strings
| (empty-common-prefix prev this)
| "."))))
| (setq gnus-group-line-format "%M%S%p%P%5y:%B%(%ug%)\n")
`----

taken from [1]. Now I would need to see of some groups (all the ones
which have the substring [Maildir] in the name) to see the number of
emails instead of the number of unread emails. How can I achieve this?

Thanks,

Rainer

Footnotes:
[1] http://www.emacswiki.org/emacs/GnusFormatting#toc8
--
Rainer M. Krug
email: Rainer<at>krugs<dot>de
PGP: 0x0F52F982
Lars Ingebrigtsen
2015-01-27 04:56:09 UTC
Permalink
Post by Rainer M Krug
I am using the following gnus-groupline-format
[...]
Post by Rainer M Krug
taken from [1]. Now I would need to see of some groups (all the ones
which have the substring [Maildir] in the name) to see the number of
emails instead of the number of unread emails. How can I achieve this?
You could create a new user-defined formatter that looks at
`gnus-tmp-group' and returns the number you want for each group...
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog http://lars.ingebrigtsen.no/
Loading...