From: lee <lee@yun.yagibdah.de>
To: ding@gnus.org
Subject: accessing article information
Date: Wed, 06 Jul 2011 10:17:44 +0200 [thread overview]
Message-ID: <87d3hng6vr.fsf@yun.yagibdah.de> (raw)
Hi,
how do you access information about an article from within a
`gnus-user-format-function-*' called when generating the summary buffer?
The documentation says:
,---- [ info (gnus) Summary Buffer Lines ]
| `u'
| User defined specifier. The next character in the format string
| should be a letter. Gnus will call the function
| `gnus-user-format-function-X', where X is the letter following
| `%u'. The function will be passed the current header as argument.
| The function should return a string, which will be inserted into
| the summary just like information from any other summary specifier.
`----
What does the header passed to the function look like?
What I'm trying to do is to write a function to display article marks:
(defun gnus-user-format-function-M (header)
(let ( (str "#") )
(if (equal gnus-tmp-unread gnus-unread-mark)
(setq str (concat str "U"))
(setq str (concat str "~")))
(if (equal gnus-tmp-read gnus-read-mark)
(setq str (concat str "R"))
(setq str (concat str "~")))))
This function doesn't work. When I try to enter a group that calls it via
"%uM" in `gnus-summary-line-format', gnus says "no unread news".
Remove the second "if" statement and it works. I've searched the
documentation, looked at the source and googled, and I haven't found out
what's available in the ominous header passed to the function.
next reply other threads:[~2011-07-06 8:17 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-06 8:17 lee [this message]
2011-07-19 16:16 ` Lars Magne Ingebrigtsen
2011-07-19 18:24 ` lee
2011-07-19 18:27 ` Lars Magne Ingebrigtsen
2011-07-19 22:50 ` lee
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87d3hng6vr.fsf@yun.yagibdah.de \
--to=lee@yun.yagibdah.de \
--cc=ding@gnus.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).