Gnus development mailing list
 help / color / mirror / Atom feed
* accessing article information
@ 2011-07-06  8:17 lee
  2011-07-19 16:16 ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 5+ messages in thread
From: lee @ 2011-07-06  8:17 UTC (permalink / raw)
  To: ding

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.



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-07-19 22:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-06  8:17 accessing article information lee
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

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).